Saturday, May 9, 2009

Remote login using x11vnc for Hoary (Xubuntu) Server

Installation of x11vnc server (port 5900) to the remote desktop (RD) PC (tested using KRDC)
  • Install x11vnc and set VNC password for security, as it is described here.
  • Enable remote desktop login: open with sudo the file
    /etc/gdm/gdm.conf
    find and change the following lines of [xdmcp] section to be:
    [xdmcp]
    Enable=true
    MaxPending=4
    MaxWait=15
    DisplaysPerHost=2
    Port=177
    Willing=/etc/gdm/Xwilling
  • Turn on VNC server after each reboot: open with sudo the file
    /etc/gdm/Init/Default
    and append the line:
    /usr/bin/x11vnc -dontdisconnect -shared -forever -rfbport 5900 -bg -o /var/log/x11vnc.log -rfbauth /home/your_login_name/.vnc/passwd
    before
    exit 0
    line. 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).

  • Turn up VNC server after each login: open with sudo the file
    /etc/gdm/PreSession/Default
    and append the line:
    /usr/bin/x11vnc -dontdisconnect -shared -forever -rfbport 5900 -bg -o /var/log/x11vnc.log -rfbauth /home/your_login_name/.vnc/passwd
    before
    exit 0
    line. This is a workaround to the known problem of gdm, which kills x11vnc server after login. Note however that, in order to login to remote PC using this workaround, you have to connect twice with your VNC client:
    • the first one to give login and passwd and
    • the second to use your remote Xubuntu Desktop.

  • Restart gdm:
    sudo /etc/init.d/gdm restart

2 comments:

Anonymous said...

I really like when people are expressing their opinion and thought. So I like the way you are writing

Anonymous said...

I do not even know the way I finished up here, but I thought this post used to be great.
I do not know who you are but certainly you are going to a famous blogger in the event you aren't already.

Cheers!

Also visit my website :: Ricky Salvador

Installation of MySQL(MariaDB) and phpMyAdmin on Ubuntu LTS focal (20.04)

Coming back again, "ten years after", trying to cope with this incredible mess that has resulted from the -admittedly- very good e...