I have moved to a lowlatency 256kbps broadband connection and this gives me enough joy to run VNC and resume my desktop session from home. Previously, I was restricted to running console apps via screen only.
See http://www.realvnc.com/ for more details.
Contents |
I am using FreeBSD6 on my office workstation and also on my temporary loaned ancient AMD-K6 based laptop at home. usr/ports is always at latest -CURRENT.
$ sudo portinstall net/vnc # Install from ports
I use packages on my laptop since its too slow to compile from ports
$ sudo pkg_add -rv vnc
Install VNC Free Edition 4.1 from http://www.realvnc.com/. Don't use TightVNC Windows viewer, there is a protocol mismatch causing bad performance.
To export the native display via VNC, add the following to xorg.conf (or XF86Config if you are on Xfree86) and restart the X server.
Section "Module"
[...]
Load "vnc"
EndSection
Section "Screen"
DefaultColorDepth 24
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
#Option "SecurityTypes" "None"
Option "SecurityTypes" "VncAuth"
Option "UserPasswdVerifier" "VncAuth"
Option "deferUpdate" "0" # redraw the screen immediately
Option "PasswordFile" "/home/shanker/.vnc/passwd"
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024"
EndSubSection
EndSection
Set your vnc password.
$ vncpasswd Password:
As yourself, start vncserver to allow connections in addtion to the root desktop display (:0)
[buffy] ~> vncserver
Check if VNC is listening on port 5901
[buffy] ~> telnet 0 5901 Trying 0.0.0.0... Connected to 0. Escape character is '^]'. RFB 003.008 ^] telnet> Connection closed.
You are all set connect now.
Setup port forwarding for port 5900/TCP via SSH. I need to go via a proxy SSH host before I can reach my workstation in office. The below ssh config will setup a tunnel to buffy via the "proxy" host.
$ cat ~/.ssh/config User shanker Compression yes Cipher Blowfish Host proxy LocalForward 5900 buffy:5900
From the home machine start a SSH session to "proxy".
$ ssh proxy
Telnet to localhost:5900 on the home machine after sshing to proxy host.
$ telnet localhost 5900
You will receive a "RFB blah" response.
On the home machine, run vncviewer inside X and use "localhost" as the hostname to connect to. In the options menu, choose the color settings depending on the bandwidth available. At 256kbps, I find medium (64K) color quiet usable.
$ vncviwer localhost