Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: Start x11vnc on startup

  1. #11
    Join Date
    Jan 2011
    Beans
    1

    Re: Start x11vnc on startup

    Hi,
    A solution that works for me on Kubuntu 10.04 (done this 3/4 times), Gnome should be similar, but I've never tried it.

    Install x11vnc as normal on your to be headless machine
    In a terminal window type

    x11vnc -storepasswd

    enter your password (I use the same as the user I'll login as, though that's not compulsory)
    confirm your password
    Accept the default location for storing the password (usually /home/username/.vnc/passwd)
    Go to System Settings > Advanced > Autostart > Add Program
    Navigate to X11VNC Server, & highlight it, click OK
    In the Properties box that opens, switch to the Application tab, delete everything in the Command box, then insert the following

    x11vnc -usepw -forever >/dev/null

    Click OK to finish, close System Settings.
    To make things simpler at this stage, set your user to auto-logon.
    You can alter that after its working, to ake it more secure.
    To test, start System Monitor, and sort by name in reverse order, then restart the machine.
    Once it's up & running again, the top entry should be x11vnc, running as your user.
    Now try to connect from your other machine using its VNC client.
    Should be working ok.
    HTH
    Dave

  2. #12
    Join Date
    Jun 2008
    Location
    Up state NY Southern Tier
    Beans
    266
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Start x11vnc on startup

    Quote Originally Posted by justicelaw View Post
    Hi,
    A solution that works for me on Kubuntu 10.04 (done this 3/4 times), Gnome should be similar, but I've never tried it.

    Install x11vnc as normal on your to be headless machine
    In a terminal window type

    x11vnc -storepasswd

    enter your password (I use the same as the user I'll login as, though that's not compulsory)
    confirm your password
    Accept the default location for storing the password (usually /home/username/.vnc/passwd)
    Go to System Settings > Advanced > Autostart > Add Program
    Navigate to X11VNC Server, & highlight it, click OK
    In the Properties box that opens, switch to the Application tab, delete everything in the Command box, then insert the following

    x11vnc -usepw -forever >/dev/null

    Click OK to finish, close System Settings.
    To make things simpler at this stage, set your user to auto-logon.
    You can alter that after its working, to ake it more secure.
    To test, start System Monitor, and sort by name in reverse order, then restart the machine.
    Once it's up & running again, the top entry should be x11vnc, running as your user.
    Now try to connect from your other machine using its VNC client.
    Should be working ok.
    HTH
    Dave
    Thank you Dave, but it didn't work for me.
    Ubuntu 10.04 LTS is a little different than Kubuntu 10.04, I guess.

    First let me explain that I'm not using a headless machine to setup X11vnc.
    I don't think that matters, but I realized that you may be giving advice
    to me or someone based on the original post in this forum.
    I apologize if that's the case. I've only posted here because I wanted
    a method to startup x11vnc without my intervention,
    on two of the machines in my home network, and then be able to connect to either of them remote
    when I'm OOT on business, or whatever.

    You did help me, even so. I forgot about checking the system monitor
    all this time and decided to do that. I use Htop for that, but I can sort it by
    command and see if x11vnc is listed.
    I tried your sequence of steps but I got a little bit different setup in Ubuntu 10.04 LTS, as I said.
    I stored the password and verified it. That was the same.
    However, my Autostart is different.
    the path is: System -> Preferences -> Startup Applications
    Then I added an item & called it: x11vnc startup
    I removed the command I had there and edited that item's command line with what you suggested.
    I first, tried the x11vnc -usepw -forever >/dev/null
    saved it, and clicked close. Restarted my machine.
    Once it was finished restart, I saw no evidence that x11vnc had started.
    I opened an Htop session and sorted the command column and found
    no instance of x11vnc.
    I went back, and changed the command line you gave,
    to: x11vnc -usepw -forever >/home/rick/.vnc/passwd
    I thought that pointing it to the specific password path would help.
    It did not work.
    Thank you for your help and thanks for reminding me that I can use
    Htop to check if x11vnc is running.
    I have other issues though, yet to resolve.

    Thanks again,
    Rick (Shobuz99)

  3. #13
    Join Date
    Jun 2008
    Location
    Up state NY Southern Tier
    Beans
    266
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Start x11vnc on startup

    Karl, Dave et al,

    Thanks to you, I got it working basically the way I want.
    I discovered one weird thing about x11vnc that may not be the reason;
    but when I used it everything started to work.
    The command that I ended up using in the "Startup Applications"
    in my x11vnc startup item is:

    x11vnc -rfbversion 3.6 -rfbport 5907 -rfbauth /home/rick/.vnc/passwd -forever -bg

    Prior to this, I did not use rfbversion and the 3.6 argument.
    I could not get x11vnc to load with the following command:

    x11vnc -rfbauth /home/rick/.vnc/passwd -forever -bg

    It never worked.
    I added in the rfbport 5907 switch but it would not connect.
    Then I began looking at a saved xsession-errors log and discovered
    that when I was using the /.x11vncrc file while using the GUI, that
    it always loaded the version 3.6. In some cases it would load it twice.
    I don't know why.
    So I went back to my command line and added the -rfbversion 3.6
    and -rfbport 5907 switches and it connected.
    I checked my Htop command, sorted so x11vnc was on top, and there it was.
    Next I went to my other machine and tried the SSL/SSH VNC Viewer
    to connect to the first machine. It worked.
    I'm still not sure why it won't connect unless I use the -rfbversion 3.6 switch.

    Anyway, thank you all for all your help.
    My next question would be is there a switch that would put the icon or the tray symbol up so I know it's connected? No big deal, I just wondered.
    I can still check it out using the other machine or make sure it loaded
    by viewing Htop and sort the commands so that x11vnc is on top.
    If it's there, it means I'm all set.

    Update/Edit: I also needed to add the -ultrafilexfer switch so i could transfer files. The whole command is now set as follows:
    x11vnc -rfbversion 3.6 -rfbport 5909 -ultrafilexfer -rfbauth /home/rick/.vnc/passwd -o /home/rick/.vnc/x11vnc.log -forever -b

    Thank you once again for all your help.
    Rick (Shobuz99)
    Last edited by Shobuz99; January 18th, 2011 at 02:01 PM. Reason: Add switch to command string

  4. #14
    Join Date
    Jun 2011
    Beans
    2

    Re: Start x11vnc on startup

    Rick, thank you very much for following up with what worked for you. I also needed to add the -rfbversion flag to get it to work.

    The flag to add the icon is "-gui tray" (without the quotes). When I use that flag starting x11vnc at bootup, I get an error message "Error: tail: cannot watch '/tmp/x11vnc.tray.******'" where ****** is a random string. However, x11vnc still works fine, and if I launch it manually (not in the autostart) I do not get the error.

    Karl, thank you very much for the great software, and for your ongoing involvement and help here in the newbie forums.

    Best regards and thanks again,
    Dave

  5. #15
    Join Date
    Dec 2006
    Beans
    810

    Re: Start x11vnc on startup

    I believe the problem "Error: tail: cannot watch '/tmp/x11vnc.tray...." is fixed in the development version of x11vnc (0.9.13)

  6. #16
    Join Date
    Jun 2011
    Beans
    2

    Re: Start x11vnc on startup

    Thanks Karl, I will give that a try when I get a chance.

  7. #17
    Join Date
    Nov 2012
    Beans
    15

    Re: Start x11vnc on startup

    Folks this is a really cracking thread, Thanks.

    In the end this is what worked for me: x11vnc -rfbversion 3.6 -rfbport 5907 -rfbauth /home/rick/.vnc/passwd -forever -bg

    One problem is when I set the command in 'Startup applications' it does not work, the only way to make it work is to manually sudo su and try again.
    I followed a guide to run x11vnc as root (sudo visudo) but it did not work. Any idea?

  8. #18
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Start x11vnc on startup

    If a post is older than a year or so and hasn't had a new reply in that time, instead of replying to it, create a new thread. In the software world, a lot can change in a very short time, and doing things this way makes it more likely that you will find the best information. You may link to the original discussion in the new thread if you think it may be helpful.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

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