hello all. i have a quick question for everyone. i am trying to run a x11vnc the thing is i want it to be launched with a service command but not at startup and as well i want it running inside a screen session when it does start. i also want it to be able to view the root screen for the greeter. i am running ubuntu 13.04 with lightdm is there any way i can make this happen. the command i am trying to run is
Code:
screen -S "x11vnc" -d -m &&
screen -r "x11vnc" -X "/usr/bin/x11vnc -once -rfbauth /home/passwd -xkb -rfbport 5900 -auth /var/run/lightdm/root/:0 -display :0 -bg"
i have found that to run the root desktop for the greeter i have to run as su root so i was wondering if there was a way to pass something like
Code:
ME=`whoami`
as_user() {
if [ $ME == $USERNAME ] ; then
bash -c "$1"
else
su - $USERNAME -c "$1"
fi
}
in the script that would be passed into the screen session. please help me and let me know.