#!/bin/sh ## author: parv, parv UNDERSCORE AT yahoo DOT com ## date: jan 30 2003 ## ## license: free to use as you please w/ proper credit given ## ## name: xf ## ## purpose: to keep log of errors & other events, and to minimize ## need of remembering often used options to xinit (in background to ## free up console) ## ## usage: ## xf ## ## to specify other arguments, say display :1 ... ## xf :1 ## #set -x # directory to keep log in x=${HOME}/log/x # create log directory; otherwise exit mkdir -p $x || { echo "could not create ${x}, exiting..." ; exit 1; } # file name to keep log in x=${x}/x.log # remove old log file rm -f $x # default xinitrc xinitrc="${HOME}/bin/xinitrc" # pass wm option to run if -wm is $1 ($2 is the wm) wm="" case $# in 0 | 1) ;; *) case $1 in -wm) shift wm="$1" shift ;; esac ;; esac printf "xinitrc: $xinitrc\n" printf "wm: $wm\n" # start xinit # ---- # "wm" needs to be 1st positional parameter (for the custom script) # ---- #xinit "$xinitrc" "$wm" -- "$@" -nolisten tcp 1>"$x" 2>&1 & xinit "$xinitrc" "$wm" -- "$@" 1>"$x" 2>&1 &