Recently, I put out a call on freecycle for an old computer (I’d like a laptop to, as well, but . . .) and I got one Sunday. Why did I do this?

SSH Window Forwarding finally got the better of me. What is window forwarding? Well, its a simple enough concept, if you know what you are doing. The concept is that you enable X11 Forwarding and then whenever you open an application with an window interface, like Xterm or Geany, it is opened on your local computer.

This means that if have a remote server with X11 Forwarding and you open Firefox on the commandline, you will be browsing with firefox window forwarded from that computer! You can set this up, then check it out be visting perhaps ipchicken. It will show the ip of the remote computer.

Enough concept, let’s get our fingers dirty!

The first thing you need is a computer. You could also use a Virtual Machine in VBox to do this, but I don’t really have any computers powerful enough to run virtual machines. That was why I requested a old computer. Boy, was it old. Its a HP XE743. Designed for Windows 98. Computer stats: 600 mhz Intel Celeron, and 64 megs of RAM. I was really, really lucky and had a extra stick of RAM that fit the computer (no reason). Now I have 128 megs of RAM.

I mention this for two reasons: 1)to show the power of linux. This is a computer that should be in the graveyard by window’s standards, and yet it is alive and very well by running a slightly outdated copy of Ubuntu Server. 2) Windows forwarding doesn’t take that much power. Running it over my local LAN, my experiences are that even with the low power, it still acts pretty snappily.

The second thing is Linux. I’m sure that there are ways to do this with windows, but linux works. Its also free. My choice was Ubuntu Server 8.10. Yes, I need to update but this was the disc I had handy. I wasn’t expecting to have to do a whole lot with it, though that might change.

Install Ubuntu Server on the machine. Something you really need to be aware of with this machine is that you need to change a few settings in the BIOS. First of all, turn off the quick boot and such. Make it do the full tests to insure everything is correct. Then set the disk access to other, so it knows its using linux. Otherwise, it will act like a turd and not boot at all. Install everything, and when it asks for services, install the sshd. If you forget it, you can install it later. I would recommend using a static ip for all servers. It can be a pain when your server’s ip address changes constantly and you have to find it in the DHCP loan list.

Now, you need to install Xorg. I remember install Xorg, then installing a window manager. It should be sufficient to run something like sudo apt-get install fluxbox. That should pull all dependencies, including xorg for fluxbox. Fluxbox isn’t the best, but it gets the job done, which is what I am concerned about. It also isn’t a resource hog. On this machine, there isn’t a whole lot to hog!

You’ll need to configure Xorg. Run xorg -configure, then copy the config file to the proper location: sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old
cp /home/user/xorg.conf.new /etc/X11/xorg.conf

Edit the sshd conf file to allow window forwarding, and the ssh to try to do window forwarding. These should be in /etc/ssh/sshd_config and /etc/ssh/ssh_config respectively. Run startx and again, then pull up xterm and do ssh localhost. This will ssh to yourself. Run Xterm on the commandline, and you should have a new xterm window popup. You may need to install Xterm first, however. Close out the ssh windows.

Now, head over to your windows machine (cause this is where it gets really cool). Install Xming and start it up. Then start putty. I’m also starting to use Kitty now, which is a port of putty with more features, with some really nice features that make me like it more then putty.

For putty, enter the ip address of the server (I chose 192.168.1.5, and yes that’s a local ip). Go to Connection, then SSH, then X11. Check the box to enable forwarding. Then click connect. Enter login and password. Then, type xterm. If you’ve done everything right on the windows side, Xterm will run and you will have a graphical shell.

*UPDATE*

I installed Ubuntu 10.4, which seems to be a bit friendlier on the resources side of things.  Anyway, I didn’t install or configure xorg.  I simply did <code>sudo apt-get install xterm</code>.  After running Xming on my windows machine and connection, everything ran fine.  So, you’ll need the dependencies (one of which I believe was X11 common) but you don’t have to setup Xorg if you don’t want to.