Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

hello all i am asking once again for a little help. here is my question

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

    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" 

it would also need to use the root user for the greeter display so using the lightdm session is there anyway to make it run something like

   ME=`whoami`
   as_user() {
   if [ $ME == $USERNAME ] ; then
   bash -c "$1"
   else
   su - $USERNAME -c "$1"
   fi
   }

where username = root

if anyone can help me figure this out please let me know. and thanks for your time.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.