[Tfug] headless systems

Matthew Shucker mshucker at arizona.edu
Fri Jun 22 12:24:21 MST 2007


On 6/22/07, Andrew Ayre <andy at britishideas.com> wrote:
>
>
> You can install a desktop and then use VNC to connect to it remotely.
> Also I think KDE has a remote desktop feature built in. I've yet to
> investigate vnc4server which I believe starts the desktop on demand when
> a VNC connection is made.


You can also do VNC over an SSH tunnel, so you don't have to leave the VNC
port open.  Connecting from a Linux box (or OS X with X11.  Not sure about
Windows, but Cygwin might do X11), I do this:

ssh -L 5902:localhost:5901 <server ip>

That forwards port 5902 (vnc localhost:2) on the local/client box through
the ssh tunnel to port 5901 (vnc :1 on the server).  It also opens a normal
interactive session, giving me a terminal to run "vncserver" in to start up
vnc :1.

Then on the local/client box again, I run:

vncviewer localhost:2

(or I use the Chicken of the VNC client on the Mac - chosen 100% for its
name.)

And that gives me a full desktop on the headless box in the closet.

If I just want one app, like a browser on the headless box, instead of a
whole desktop, I'll run "xhost +" on my local/client box, ssh to the server,
export DISPLAY=<clientbox IP> on the server, then run whatever I need, and
it'll show up on the local/client box.

Matt



More information about the tfug mailing list