Well, the Nethack Server is gone. I know that couple of people played on it, and Anthony even ascended but it is now gone. It was actually off line for months now and I didn’t even notice. It got knocked off the network when I switched from WEP to WPA few months ago. Then it crashed hard and sat there for another month or two without a reboot. Now I have some nice dead pixels on the LCD which I guess might be sort of a screen-burn side effect or something. It was acting slow, and erratic so I nuked it. I should have saved the high scores and the bones files but hindsight is always 20/20. So big apologies to anyone who played on the server. I might resurrect it at some point, but I guess the old Presario with the flaky Wifi is just not a very reliable platform for something like that.
It is a good platform for experimenting with bare bones installations. I always wanted to set up an X-less machine and see how usable it would be. I already have a library of very useful CLI apps so really this should be a great experiment. I briefly messed around with a net install of Debian Etch but in the end I went right back to what I know and decided to give Hardy a whirl. It would be a nice test to see how the brand new system stacks up on very old hardware.
So I grabbed the mini ISO, and run it with the cli boot parameter. Why the mini iso? To make a long story short, I wasted 4 CD’s burning corrupted copies of the alternate install CD. What I wanted was a bare bones CLI system but every time I started installation some file was corrupted. I guess this will teach me to check the md5 checksums before burning next time. Either way, the minimal install ISO seemed like a good solution – weighing in at 8MB wouldn’t get corrupted during transfer.
Installation was uneventful, but tad long since a lot of packages needed to be downloaded. I ended up with a lean CLI system. Since I initially did not want to install X on it, the first thing I did was to update my tty resolution This is done by editing the grub menu like this:
sudo vim /boot/grub/menu.lst
You will see something like this:
title Ubuntu, kernel 2.6.15-20-386 root (hd0,4) kernel /boot/vmlinuz-2.6.15-20-386 root=/dev/hda5 ro initrd /boot/initrd.img-2.6.15-20-386 savedefault boot
The Compaq can only handle 800×600 with 24 bit color at most, so I add the following to the kernel line:
The like should look like this once you are done with it:
kernel /boot/vmlinuz-2.6.15-20-386 root=/dev/hda5 ro vga=789
Now how does the 789 relates to my resolution? Good question! You can find other magical values you can add to that line listed on the Ubuntu FrameBuffer wiki.
Next ting was setting up the wifi connection which was not that difficult. I ended up with a fully functional CLI system. I could browse the web with w3m, use Midnight Commander as my file system browser and etc. Btw, this takes me way back:
I sat there staring at this screen reminiscing all the good times I had working with Norton Commander back in the day. Oh man! These were the good days. I vividly remember excitement involved in unpacking a pirated copy of Wolfenstein 3D and Alone in the Dark and running it from the Norton interface. Ah, these were the days. I was young, naive and was just discovering wonders of technology. Unfortunately, I seem to be the only person with fond memories of that time. When my brother saw the screen, he made a face and exclaimed: “man, I used to hate that thing”. But how can you hate the commander? I mean, it’s a fucking commander! It commands respect! Here is a better shot of the app itself running in 800×600 mode on the tty:
My cousin had a similar reaction. She pretty much said “You know, it’s 2008 – you can use Windows Explorer now”. :cry: No, thank you – I will stick with linux and my ultra light applications that hardly take up any memory and/or CPU power to run.
But I wanted a little bit more flexibility. Swapping between TTY’s all the time is not always the optimal solution. Sometimes I would for example want to split my screen into 2 or 4 panels with different content. Screen does that, but it does not do vertical splits out of the box. You can get that functionality by applying a patch and recompiling, but I decided to get something a tad more complex. So I turned to DVTM which is labeled as a tiling window manager for the CLI. It’s not in the repositories so you have to compile it yourself:
aptitude install make build-essential libncurses5-dev wget http://www.brain-dump.org/projects/dvtm/dvtm-0.4.1.tar.gz tar -xzf dvtm-0.4.1.tar.gz cd dvtm-0.4.1/ make sudo make install
The result is pretty neat. You can see me running a split panel session with htom (upper left), aptitude doing updates (upper right), and w3m (bottom):
DVTM has two major disadvantages. First is that you loose all the neat framebuffer features – for example like the images being displayed in w3m. No drawing or image viewing utilities will work in it – just like they don’t work in screen. Seconly, DVTM is not very configurable. There is no dot file (like .dvtmrc or something) that you could use to customize settings, set default layout and etc. The author suggests changing the configuration in one of the .h files, and then recompiling the whole thing every time you want to change something. :( Not really what I want to do.
Finally I broke down, and decided that that running mimimal x configuration with Ratpoison is not much more taxing on the hardware. I still intended to use mostly CLI apps (since that’s really what Ratpoison is all about) but the possibility of actually being able to run some gui apps (such as Dillo or Kazekahese for example) was a nice touch. Installing ratpoison was easy:
aptitude install x-window-system-core ratpoison aptitude install xserver-xorg-video-vesa xserver-xorg-input-mouse
I got a lot of scrolling text on my barebones install (over 30 MB of x related packages) but installation was swift and simple. But it was not perfect. If you follow these instructions you will notice that the display is bit “gritty” and pixelated under this setup. This bothered me a bit. Running lshw told me that this system actually has NeoMagic NM2160 MagicGraph 128XD card installed on board. Quick aptitude search told me that there is a package which caters to this brand of graphic devices. To get full use out of your card you will need to do:
aptitude install xserver-xorg-video-neomagic
After that, the image was crystal clear and sharp as ever.
Now my rig starts in cli mode, but and I can continue like that. If I need X for some reason I can start it manually, and it actually takes about 2 seconds to start up. Ratpoison is rather nifty – and not much different from dvtm, only it uses X and is completely configurable. Here is a screenshot of me running htom (upper right), Midnight Commander (upper left) and opera (bottom):
Here is something that I did not expect or anticipate: Opera actually outperforms Kazehekaese on this machine. It’s bizzare but true. I guess the geko engine was choking due to limited memory or something.
I might try another windowing manager like awesome at some point in the future because of the floating window feature. Ratpoison only knows how to tile windows which is fine but not really practical in the long run. As you can see on the screenshot above, the 3 way split is already kinda cluttered. Add 2-3 more panels, and you won’t be able to see anything on any of them. With mere 800×600 resolution, the screen estate on that thing is priceless.
Anyway, for those interested my .ratpoisonrc looks like this:
bind c exec rxvt -fn "Lucida Console-8" bind b exec links2 -g wrap off escape Pause exec xsetroot -solid black -cursor_name left_ptr exec xli -onroot -fullscreen /home/luke/eva.jpg
Note that I remapped the escape key from Ctrl+T to Pause mainly because of the keyboard layout. On the laptop keyboard the Ctrl+T becomes a two hand salute due to the weird positioning of the keys. Pause on the other hand is strangely withing the reach of my right hand. Go figure.
One thing that did not work well under Ratpoison was Midnight Commander. Something about rxvt and mc not agreeing on the locale settings. It was easily resolved by adding the following line to my .basrc:
I’m also bound a key for links2 since it is really the faster, and more responsive browser on this machine. If needed I can always launch opera, but for quick lookups links2 is more than enough.
So there you have it – it’s a minimalistic system, which runs mainly CLI apps. It does have X but it does not need to be running. And when it does it uses ultra light window manager that is also stripped down for simplicity and performance. What do you think?
[tags]hardy, ubuntu hardy, midninght commander, dvtm, screen, ratpoison, opera, x, linux[/tags]