Search Ubuntu life...

Custom Search

Friday, May 8, 2009

Remote login using x11vnc for Jaunty Kubuntu

Installation-configuration of x11vnc server (port 5900) to the remote desktop (RD) PC (tested using KRDC)
  • Install x11vnc:
    $sudo apt-get install x11vnc
  • Set VNC password for security (password is saved by default in ~/.vnc/):
    $x11vnc -storepasswd
  • Enable remote desktop login: open with sudo the file
    find and change the following lines of [Xdmcp] section to be:

  • Turn on VNC server after each reboot: open with sudo the file
    and append the line (see also the 4th comment(σχόλια) of "Ed" for a better solution):
    /usr/bin/x11vnc -dontdisconnect -shared -forever -rfbport 5900 -bg -o /var/log/x11vnc.log -rfbauth /home/your_login_name/.vnc/passwd
    This way you can login to the remote PC, without loosing your login session each time you disconnect your VNC client. Thus, the next time(s) that you will connect with your VNC client again, you will see your RD session (until you logout -or reboot- the remote PC).

  • Restart kdm:
    sudo /etc/init.d/kdm restart
    or (better?) reboot remote PC.


Gideon said...

I can't seem to get this to work completely. When my system boots to the login screen, I am able to connect, but as soon as I type in my login details (on the KDM login greeter) the VNC session is disconnected. Looking at the actual screen connected to the computer, it doesn't even login--it blinks and goes back to the login screen again.

Any ideas?


Gideon said...

(replying to subscribe to thread)

foo_gr said...

Hi Gideon,

in fact, I have tested this in only one remote PC running Kubuntu Jaunty (KDE 4.2). And I have to reboot it after each logout in order to login again. But I do login from KDM login greeter using KRDC as client.

Unfortunately, I have no idea about what is going wrong in your case. Maybe someone else that has read that post could help?

Ed said...


I was having the same problem as Gideon. After some research I used this line in Xsetup:

x11vnc -forever -rfbauth /home/usr_name/.vnc/passwd -bg -o /var/log/x11vnc.log -noxfixes -noxdamage

Works now. :-)

foo_gr said...

Thank you Ed...

lopan said...

in newer versions of x11vnc we have the option "-auth guess", that solves all problems with KDM, GDM, XDM. My x11vnc_sh:
/usr/local/bin/x11vnc -env FD_XDM=1 -auth guess -display :0 -http -http_oneport -inetd \
-rfbauth /home/user/.vnc/passwd -o /var/log/x11vnc_sh.log -xwarppointer -avahi -notruecolor -norc -forever -solid -permitfiletransfer -tightfilexfer -ultrafilexfer

foo_gr said...

Thanx lopan...