Screen locking in apmscript does not work properly for root. There are couple of bugs in apmscripts (incorrent version was submitted to bero). Here's the fix: 66,67c66,67 < if [ "X$Usern" = "Xroot" ]; then < su $Usern -c "xlock -display $XDisp" &>/dev/null & --- > if [ "x$Usern" = "Xroot" ]; then > xlock -display $XDisp &>/dev/null & Anyway the screen-locking is a crude hack... :)
This is fixed in 3.0final-20 (and probably -19 and -18).
The X=x test was fixed, but it seems that "su $Usern -c " fix was omitted. Xlock doesn't work without su (at least for me).