Skip to content

Instantly share code, notes, and snippets.

@dergachev
Last active December 16, 2015 19:18
Show Gist options
  • Save dergachev/5483770 to your computer and use it in GitHub Desktop.
Save dergachev/5483770 to your computer and use it in GitHub Desktop.
VNC forwarding with Ubuntu Lucid

My notes from setting up VNC access from OS X 10.8 (client) to Ubuntu 10.04 lucid (server)

First, install x11vnc:

sudo apt-get install x11vnc

Then run it as follows:

# this will prompt you for a password, and store it to ~/.vnc/passwd
x111vnc --storepasswd 

# run the VNC server
#  -once                    listen for only a single connection
#  -noxdamage               dramatic speedup, necessary if x11vnc outputs "XDAMAGE is not working well"
#  -display :0              otherwise doesn't seem to detect default display
#  -auth /var/gdm/:0.Xauth  fixes xauth errors
#  -rfbauth .vncpasswd      ensures that password is read (??)
x11vnc --localhost -display :0 -auth /var/gdm/:0.Xauth -rfbauth .vnc/passwd -once -noxdamage

Installing VNC client

Then install "Chicken of the VNC" viewer:

brew update # pulls in the latest formulae
brew cask install chicken

Connecting

First establish an SSH tunnel to forward port 5900:

ssh user@vnchost -L 5902:localhost:5900

Then open Chicken:

open -a ~/Applications/Chicken.app

Then put in the following settings:

Screenshot

Tips

Note that I disabled the "CopyRect" setting to work around "unknown rectangle encoding" bug

Also note that at this point I get stability + acceptable speed with x11vnc/chicken reporting the following:

Using ZRLE encoding for client 127.0.0.1

Also on connecting I temporarily change the resolution to 1024x768 or something small.

Resources

Some resources I found:

On the OS X side, you can also either use the hidden "Screen Sharing.app":

  • Open Finder
  • CMD-K (connect to server)
  • vnc://localhost:5092 (it'll only ask for password; if also username then check x11vnc args)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment