Ubuntu Hardy on Compaq Presario 1240 (Living Without X)

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

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:

Compaq Presario 1240 Running Hardy

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:

Midnight Commander on Hardy

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/
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 Running in a TTY

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]

This entry was posted in sysadmin notes and tagged , , , . Bookmark the permalink.

9 Responses to Ubuntu Hardy on Compaq Presario 1240 (Living Without X)

  1. gp ARGENTINA Mozilla Firefox Windows says:

    I recommend using the Terminus font for the console, its included in the “console-setup” package in debian (so i think it may be the same for ubuntu).

    Reply  |  Quote
  2. Luke Maciak UNITED STATES Mozilla Firefox Ubuntu Linux Terminalist says:

    I think on unbuntu it’s in a package of it’s own. I’ll check it out though. Thanks!

    Reply  |  Quote
  3. dawn SWITZERLAND Opera Linux says:

    I have a Compaq Presario 1200 with a similar config, but I only start X if I realy need to see something in Opera.

    What bothers me the most is the screen resolution. Not because it’s 800×600, but because it’s 800×600 on a 12 inch screen (I think). Graphic elements and anti-aliased fonts don’t look great on that kind of resolution.

    That’s why I stick with screen with a tab bar. My philosophy is one task per tab. If I need to have centerim and elinks in the same tab, I use dvtm.

    Programs such as mplayer don’t behave in screen, though, as you mentioned. Do you happen to know why by any chance?

    Reply  |  Quote
  4. Luke Maciak UNITED STATES Mozilla Firefox Windows Terminalist says:

    [quote post="2497"]What bothers me the most is the screen resolution. Not because it’s 800×600, but because it’s 800×600 on a 12 inch screen (I think). Graphic elements and anti-aliased fonts don’t look great on that kind of resolution.[/quote]

    Have you tried installing the xserver-xorg-video-neomagic package? It really improved things for me. But yeah, the screen size make the resolution painful.

    Reply  |  Quote
  5. dawn SWITZERLAND Opera Linux says:

    Actually it’s the trident package for me. It didn’t improve anything but I guess I exagerated. Now that I’m on the little old machine, I realise the resolution is fine with both the vesa and the trident driver. It’s not like I’m going to do graphic manipulation on a 800×600 px screen anyway. As long as video playback is smooth… (and I don’t even need X for that).

    I also realise the old machine boots faster and starts X faster than my “regular” computer. Ah well, Crux beats Arch in some ways.

    Reply  |  Quote
  6. Luke Maciak UNITED STATES Mozilla Firefox Ubuntu Linux Terminalist says:

    Heh… Do you use Ratpoison on your regular machine? Bare bones X usually starts very fast on any machine. It’s the window manager that usually bogs it down. Ratposion on the Compaq pops up much faster than the KDE on my 2.6 GHz dual core laptop for example. :P

    Reply  |  Quote
  7. dawn SWITZERLAND Opera Linux says:

    I use dwm. All ligthweight window managers start within a fraction of a second on both machines.

    The delay is in the “black screen” while X is initialised. On my old computer, the screen turns black for 2-3 seconds and then the window manager pops up. On my newer machine there is some flickering between deep black and a lighter shade of black before X spits the stuff in .xinitrc. I suppose some auto-detection mechanism is delaying the process.

    Reply  |  Quote
  8. ExxonValdeez UNITED STATES Mozilla Firefox Linux says:

    Very interesting. I have been wanting to try something similar myself but haven’t gotten around to it. I did recently install Arch on my laptop with Openbox which I am going to play around with for a while. However, I am considering using xmonad, which is similar to ratpoison. Overall, very neat what you can do with an old system like this.

    Reply  |  Quote
  9. Pingback: New Toy: Compaq Presario 1800 « Terminally Incoherent WordPress

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>