3 # 2004, Sylvain Fourmanoit <syfou@users.sourceforge.net>
5 # Shell script that starts an interactive adesklets session
6 # with the debug (stderr) output in another xterm.
9 END_MESSAGE
='--- End of session ---'
10 FIFO
=/tmp
/debug_$$.fifo
12 # Termination function
17 read -p 'Kill debug console (Y/N)? ' -n 1 ANSWER
19 echo $ANSWER |
grep -i 'y' &>/dev
/null
&& kill $XTERM_PID &>/dev
/null
22 # Initial program check
25 for PROG
in mkfifo xterm adesklets
; do
26 test -z `which $PROG 2>/dev/null` && {
27 echo Program
$PROG could not be found
in path. Aborting.
1>&2
32 # Set up exit trapping
45 xterm
-e "cat<$FIFO;echo $END_MESSAGE;echo Press a key to kill console;read" &