Jump to content

x11vnc start at bootup on Ubuntu 11.10


wildweaselmi
 Share

Recommended Posts

Okay, now there are several options for VNC Server for Ubuntu 11.10, okay well maybe three (Vino (default for gnome), x11vnc, krfb (default for KDE).



So issue with vino or krfb is that you have to be logged into the session with an id for those to be active so that leaves only one (use to be two options with tightvncserver was available on Ubuntu but no longer on 11.10). The one option is x11vnc but super complicated on getting to work on bootup for Ubuntu 11.10



First pick out a desktop if you don't have one installed yet.


GNOME


sudo apt-get install ubuntu-desktop

sudo apt-get install x11vnc



KDE

sudo apt-get install kubuntu-desktop

sudo apt-get install x11vnc tk8.4[/code]




Then create the VNC password that will be used when you connect with a VNC Client to the server

sudo x11vnc -storepasswd /etc/x11vnc.pass






Now create the code that will go under the user you are logged in with

nano  ~/.kde/Autostart/x11vnc






Paste the following




#! /bin/sh

x11vnc -rfbauth ~/.vnc/passwd -bg -forever -noxdamage -shared &






Make the new file executable by running

chmod 700 ~/.kde/Autostart/x11vnc



Now test by rebooting the server.



NOTES:


All the instructions I find on just about every website all reference the same thing.. Add the command to




The name of the display manager startup script file depends on desktop used and seem to be:




The name of the display manager startup script file depends on desktop used and seem to be:



GDM (GNOME) /etc/X11/gdm/Init/Default /etc/gdm/Init/Default


KDM (KDE) /etc/kde*/kdm/Xsetup


XDM /etc/X11/xdm/Xsetup (or sometimes xdm/Xsetup_0)


CDE /etc/dt/config/Xsetup




I also found someone mention


X11vnc as boot loaded service Try this:


/usr/bin/x11vnc -bg -reopen -forever



But that doesn't seem to work either



Does anyone know how to get x11vnc server to load during bootup not requiring anyone to log into Gnome or KDE or anything. Just startup as soon as the Login screen pops up. It has to be for 11.10 which every piece of instructions I have found so far is for versions prior to 11.10


Link to comment
Share on other sites

If you log into your server via ssh



ssh root@10.6.0.135










You need to create and store a vnc password



x11vnc -storepasswd yourpasswordhere/etc/x11vnc.pass










If you are using kubuntu then edit the Xsetup



nano /etc/kde4/kdm/Xsetup










At the end of the file add



/usr/bin/x11vnc -noxrecord -noxfixes -noxdamage -rfbauth /etc/x11vnc.pass -bg -o /var/log/x11vnc.log -forever -rfbport 5900





Then reboot your server and you should have x11vnc started upon a reboot before anyone logs in.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...