Wednesday, August 01, 2007

» VNC+SSH on an existing display

I frequently use this trick to connect to a remote X display:
ssh -L 5900:localhost:5900 remotehost \
   'x11vnc -localhost -nolookup -nopw -display :0'
where remotehost is.. well, the hostname or IP address of the remote server. Once you see "The VNC desktop is...", open another terminal and type the following command (still on the client):
vncviewer localhost:0
What it actually does is open a ssh tunnel that forwards from port 5900 on your local client to the port 5900 on the remote server, into x11vnc. x11vnc connects to an existing X display and exposes it through the VNC protocol. The second command is just to connect your favourite VNC client to the local port 5900 (which then goes through the encrypted ssh tunnel and is forwarded to x11vnc on the server). All you need to do is to enable ssh on the server (which is probably already the case) and install x11vnc on the server. You can find my openSUSE RPMs of x11vnc in the X11:RemoteDesktop repository in the openSUSE Build Service (choose the appropriate subdirectory, depending on the openSUSE version you're using). More information about Karl Runge's brilliant x11vnc here:

Labels: ,


Anonymous Anonymous said...

IIRC vncviewer chooses to disable compression in this case because it thinks it connects to localhost.

Anonymous Anonymous said...

X2Go (NoMachine NX Core libs based remote X):

NoMachine NX Core libs (GPL) and NX Commercial Server:

FreeNX (based on the NoMachine NX Core libs:

All the NX-based stuff has many advantages over VNC. The only disadvantage is: some people find it more difficult to get it to work.

X2Go seems really nice. And it has a rocking KDE integration. Check out the screenshots!

<daydreaming>(and i soooooo would like to see openSUSE RPMs appearing for X2Go...</daydreaming>


Post a Comment

Links to this post:

Create a Link

<< Home