X11 Forwarding and VNC

A Brief Brief on Windowing Systems

I’ve been playing around with X11 a lot recently. This is one of the great things about Mac OS X; with its Unix (well, actually FreeBSD) underpinnings, Macs can now use the plethora of programs written for the X windowing system by running Apple’s X11 for Mac OS X or one of the various ports for it.

This is also one of the first times I’m getting a chance to play with a window manager (semi-)directly. It’s awe-inspiring to think of how integral window managers are to modern day desktop computing and how far personal computing has really come.

You could say that a windowing system is a lot like a language. It provides a way for you to tell your computer what you’d like it to do for you. To give some perspective, one alternative “language” to a windowing system is a textual user interface where you need to type commands at a textual prompt. DOS is a well known example of this sort of textual environment. The Unix command line is another.

Gnome and KDE for Linux, Quartz for Mac OS X, and Windows for (not surprisingly) Windows, in contrast, are all examples of graphical windowing systems.

The Productivity of X11 Forwarding

So I’ve been looking around for as many different X programs as I can find. OpenOffice is the first set of programs that came to mind. (By the way, can anyone recommend a good directory or repository of some sort for X programs? I seem to have temporarily forgotten about Freshmeat.net) I should get myself a completely separate box and install a Linux distro on it, and I will when I get the space in my new apartment. For the time being, however, I’m just putting all the programs I want on my old iMac.

By far the coolest thing about the X window manager is that you can run a server and client on different machines and they are still able to talk to each other over a network. This means I can be sitting in front of computer A and run an X-compatible program off computer B while having computer B send that program’s display over to computer A. For any user using computer B, there is no visual indication that I’m using their workstation.

For example, let’s say I need to edit my résumé which is on my Mac at home in Word document format, but I’m at Saint’s Alp Teahouse all the on Bleeker Street. I only have my Windows laptop with me. I can start an X-server, say Cygwin-X on my laptop, SSH into my Mac with X11 forwarding turned on and open up my résumé in OpenOffice’s Writer. Even though Writer will be running off my Mac at home, its display will be forwarded through the SSH tunnel to my laptop’s screen. As an aside, this is one of the most useful applications of SSH that I’ve ever personally encountered.

Thinking Out of the Application

But that’s doing things one program at a time, and I don’t really have full GUI access to the remote computer’s desktop environment. For that, there’s VNC.

Virtual Network Computing is a lot like X11 forwarding on steroids. It gives you a large window on your local machine (the VNC client) inside of which is a picture of the entire screen of the remote computer (which has to be running a VNC server). You may be familiar with programs like Symantec’s PCAnywhere, Windows Remote Assistance, or Apple Remote Desktop. These are all basically proprietary, platform-specific VNC implementations with a few added bells and whistles. Frankly, I never saw the point of shelling out any money for something I can get free-of-charge.

For my Mac, I installed OSXvnc and Chicken of the VNC. Ever since we got Danica’s Windows XP laptop working again after the insane, avoidable delays caused by Best Buy’s horrendous Geek Squad disaster I installed RealVNC servers and clients on each of our machines.

RealVNC has got a slick, very well-integrated interface with Windows, and easy-to-understand settings and dialouges. It does a good job of giving the native Windows feel, and the VNC server can be run like an NT service (called service-mode) or like any other user-initiated program (called application- or user-mode). I do wish there was a built-in way to encrypt the VNC traffic travelling over the network, not just the password, but I suppose that’s what an SSH tunnel is for. Using an SSH tunnel also prevents me from having to punch open some holes in several different firewalls to get it working. On the other hand, if you don’t have access to SSH and you’re paranoid, you can configure RealVNC to use some other port than the default one (which is 5900) to make intrusion a little harder for a would-be cracker.

VNC via SSH Resources:

This screen shot shows what the reality of VNC is actually like. Here, I’ve set up an SSH tunnel with PuTTY to connect securely from my Windows XP laptop to my iMac at home. Screenshot of my Windows laptop connecting to my iMac desktop.

The Network is Half-Full

I’m still getting started with all this remote computing, but in the short time I’ve experimented, I’ve had a lot of fun. There are many benefits to productivity with this technology, and for me they are doubly important because I absolutely hate to work at home, in my cramped and tiny apartment. With X11 forwarding and VNC on my side, I can pick up my laptop and go anywhere with an Internet connection, and still feel like I’m at my home workstation. What a convenience!

Also, I can leave love notes on Danica’s laptop even when I’m out of the house and she’s not looking. ;)

3 replies on “X11 Forwarding and VNC”

  1. Amazingly, most “users” can not even form the wish to be able to do that, let alone to utter the benefits of remote computing. Even most of the savvy users leave one desktop only to get on another one using discs, external drives or some other fancy ways to haul data files from one desktop/platform/office to another (mostly web accessible storage). Damn, that’s what I do. This is an incredible niche. but, mind you, not for a long time…

Comments are closed.