/home/$USER/.config/xfce4/mcs_settings/mouse.xml
Now, that is hardly exciting.
What is exciting: I then wanted to set up x11vnc so that I could see what the users were experiencing. I've used x11vnc often on the same desktop, but my first attempt at doing it with LTSP failed. So I go on #LTSP to complainlook for a solution, which turned out to be -noshm.
They first complained that LTSP-4 (which I'm using) is far to archaic (which it is). They then got me on track for the next little bit of bash:
#!/bin/bash
USER=$1
error () { echo "$*" >&2; exit 5 }
if [[ ! $USER ]] ; then
error "Usage: $0 user"
fi
userpid="$(pgrep -u $USER xfwm4)"
if [[ ! $userpid ]] ; then
error "User $USER isn't logged in"
elif [[ $userpid =~ ' ' ]] ; then
error "User $USER is probably logged on several times: $userpid"
fi
userenv="$(tr '\0' '\n' < /proc/$userpid/environ | egrep '^DISPLAY=|^XAUTHORITY=')"
eval "$userenv"
if [[ ! $XAUTHORITY ]] ; then
XAUTHORITY=/home/$USER/.Xauthority
fi
export DISPLAY XAUTHORITY
echo DISPLAY=$DISPLAY
echo XAUTHORITY=$XAUTHORITY
exec x11vnc -noshm -nopw
All the error checking might be hiding the really interesting bit: I'm pulling DISPLAY and XAUTHORITY from the user's environment, via /proc. Something I'd never thought of doing before.
No comments:
Post a Comment