2 # This script starts LyX, and restarts LyX if it is closed
3 # it logs all output, including backtraces to development/keystest/out/GDB
5 #Setting the following may give better screen shots
6 #gconftool-2 /apps/metacity/general/compositing_manager -s -t bool true
8 DIRNAME0=`dirname "$0"`
11 #rename other windows to avoid confusion.
12 wmctrl -N __renamed__ -r lyx
13 wmctrl -N __renamed__ -r lyx
14 wmctrl -N __renamed__ -r lyx
15 wmctrl -N __renamed__ -r lyx
22 KEYCODE=$OUTDIR/$SEC.KEYCODE
23 ( sleep 20 && python $DIRNAME0/test.py | tee $KEYCODE) &
29 #You may want to use the following to simulate SIGFPE
30 #(sleep 90 && killall -8 lyx) &
37 shell import -window root '$GDB.png'
40 shell kill -9 $CHILD_PID
41 shell wmctrl -r __renamed__ -b add,shaded
42 shell wmctrl -r term -b add,shaded
43 shell wmctrl -r term -b add,shaded
45 shell import -window root '$GDB..png'
46 " ; yes q) | gdb src/lyx 2>&1 | strings| tee $GDB
48 #sleep 2 kill -9 $CHILD_PID
49 grep " signal " $GDB || (
51 rm $OUTDIR/*KEYCODE*.bak
52 mv $KEYCODE $KEYCODE.bak
54 mv $GDB.png $GDB.png.bak
55 mv $GDB..png $GDB..png.bak
56 #rm $OUTDIR/KEYCODE.$SEC
60 ) 2>&1 |tee $OUTDIR/log