I use
x11vnc to do it. On the client, a Windows laptop in my case, I use
plink to make the connection. I have a shortcut on my desktop that just runs the following:
Code:
"C:\Program Files\Putty\plink.exe" -L 5900:localhost:5900 hammer@192.168.1.2 `runx11vnc`
On the server, this is what runx11vnc consists of:
Code:
#!/bin/sh
x11vnc -rfbauth $HOME/.vnc/passwd -display :0
After entering the password, you should see something like this:
Code:
11/03/2005 16:48:03 setting up 32 cursors...
11/03/2005 16:48:03 done.
11/03/2005 16:48:03 Autoprobing TCP port
11/03/2005 16:48:03 Autoprobing selected port 5900
11/03/2005 16:48:03 created 32 tile_row shm polling images.
11/03/2005 16:48:03 screen setup finished.
11/03/2005 16:48:03
11/03/2005 16:48:03 The VNC desktop is corvette:0
At that point, you can just exit that window, it's no longer needed. Then on the client, use your vncviewer to log in as normal. I like
Tightvnc personally, but Realvnc will work as well.
There are several different ways of doing it, but this is what works for me. Good luck.
Note: If you use the "runx11vnc" script above, you'll need to make it executable and place it in your PATH. I have it at /usr/local/bin/runx11vnc. You'll also need to already have set a vnc password if you use the password auth.