Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    X11vnc at startup on near-minimal debian

    Hello everyone,

    I recently began to set up a dedicated server intending to host a minecraft server. It started with just SSH and i put on a gnome desktop environment along with X11VNC for ease of use.

    It seems i can't manage to actually get X11VNC to run at startup, that is, before actually logging in. I've been spending a few days on this issue now and tried a few different things:

    First, i found some people had used a "nohup" command to run X11VNC once manually over SSH , and leave it running after the SSH until the next reboot. It works, but dies anyway when you close the SSH connection.
    nohup x11vnc -usepw -display :0 -forever -auth guess &
    Second, i tried to set up a startup script for root, hoping that'd be activated as soon as the login environment was ready. This didn't have any result either.
    in /etc/init/x11vnc.conf:
    start on login-session-start
    x11vnc -usepw -display :0 -forever -auth guess
    end script
    Lastly, same as the first i found this as an option to run the command once per boot, using the "at" command to run a script as a user. It works... until you kill the current connection, then vnc appears to ignore the set "-forever" flag and stop.
    sudo at -f /home/turiko/ now + 1 min
    in /home/turiko/
    x11vnc -usepw -display :0 -forever -auth guess
    Since nothing i'm finding online seems to work, i figure i'm either missing something or doing something wrong, but i would definitely appreciate if someone can figure out how to make this work for me.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Put the nohup command in /etc/rc.local - that way it will be started automatically at boot time. Since you want it to link to DISPLAY :0, it may not work until you have X running, and I am not sure whether rc.local is run before the X11 server is started. Worth trying though. If it doesn't work, then you may need to write a script that is run from rc.local in the background, and does a sleep/retry loop testing for the X11 server to be running before it runs the nohup x11vnc command. There may be better ways to do this - this is something of a kluge, but it would work.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts