Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

   as_user() {
   if [ $ME == $USERNAME ] ; then
   bash -c "$1"
   su - $USERNAME -c "$1"

where username = root

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

share|improve this question

Your Answer


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

Browse other questions tagged or ask your own question.