3 CONSOLE_NUMBER=`fgconsole`
5 if [ -S /tmp/.X11-unix/X0 ]; then
7 # user=$(who | grep "pts/$CONSOLE_NUMBER" | awk '{ print $1 }')
8 # if [ "$user" = "" ]; then
9 # logger "Could not verify user for X:"
11 # logger "Falling back to XUSER: $XUSER"
14 # logger "Found X session user: $user"
16 XAUTHORITY=/home/$user/.Xauthority
17 [ -f $XAUTHORITY ] && export XAUTHORITY
19 logger "X not probably running, lets launch the command anyway"