Monthly Archive for March, 2006

Breathing new life into a very old laptop

We need another computer, but can’t afford one right now.

So I thought I’d try and make use of an old laptop that was going spare - a Toshiba Tecra 8000. It had Windows98 on it, but was so slow as to be unusable. I don’t have a copy of Windows98 to do a clean install from, so I thought I’d try some Linux… Ubuntu seemed like it might be a good bet for a newbie like me - I’ve run Ubuntu and SuSE from ‘live’ CDs, but never attempted an installation before.

Installing Ubuntu was okay, I spose. Couple of false starts - first go I plugged a serial mouse in druing installation and that crashed the installer out to a command-line, and the second time I tried to repartition the drive - that caused it to hang. But with wiping the drive and just doing as I was told, it was ok, took about an hour to install… then I reboot to log in for real… and I should have gone to bed. The machine was in configuration hell for another hour or so - no human intervention required, it just tweaked and configured every damn bit of software on the installer.

Next morning I had a machine that worked - just about. I was very impressed that getting on the internet was so easy. The Tecra8000 doesn’t have built-in ethernet, but I did have an old 3com PCMCIA ethernet card, and Ubuntu just got on and worked with this. My router has DHCP enabled, and again Ubuntu just talked to my router and it worked without me having to tweak any settings either on the laptop or my router.

But the screen would only work at low resolution, 800×600 or something, but filling the screen in a yucky, blocky way. Quick look at the Bugzilla for Ubuntu revealed a fix, but this would mean diving into the command line… well, I’m up for that. Only, could I get it to work? Could I feck. More lost sleep and frustration.

linux on an old laptop

Got it sussed now, though. Obviously the Ubuntu bugzilla guys aren’t writing instructions for newbies, they’re trying to make Ubuntu better, and the next release is intended to offer insanely great laptop support…

If you have a Toshiba Tecra 8000 and want to run Ubuntu, here’s how to get the screen to work at 1024×768 pixel resolution:

Run the Terminal (Applications > Accessories > Terminal)

Type

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

Note that X11 has a capital letter X. You’ll be asked for a password, use the one for the account you created when you installed Ubuntu. (This line of code makes a backup of the config file - if you mess things up you can rename the backup to xorg.conf and you should be up and running again.)

Then you need to edit this config file, so type

sudo pico /etc/X11/xorg.conf

This opens it up in a text editor, page down until you find the monitors section which should look like this:

Section "Monitor"
     Identifier     "Generic Monitor"
     Option         "DPMS"
EndSection

Edit it adding two new lines so it looks like this:

Section "Monitor"
    Identifier      "Generic Monitor"
    Option          "DPMS"
    HorizSync       36-52
    VertRefresh     36-60
EndSection

You need to press the tab key to get the text to line up.

Then press ctrl-o and enter to save the file, and ctrl-x to exit. Then reboot. All being well, Ubuntu will start up its graphical environment in lovely 1024×768 pixels.

As I say, it works for me - but it’s very very slow, espcially if you try to do more than one thing at once. I tried writing this in Firefox, cutting and pasting from other tabs or the terminal, and it was so sluggish that I gave up, and am now typing it in a simple text editor - gedit - instead. Maybe more memory would help, or perhaps there are other tweaks to strip Ubuntu down a bit… maybe another browser? Although Firefox is happy enough to do plain browsing and I’m posting this in Firefox ok - without any other tabs or apps open, though.

Sony Bravia TV TV ad

Got a free CD-ROM with the newspaper yesterday, advertising Sony Bravia TVs. You know the one with the cool ad with all the colourful bouncing balls bouncing down hills in San Fransisco.

The CD-ROM said Windows-only, but I looked at it anyway in case it had an MPEG of the advert and I also wanted to know what the dreamy music was.

Funnily enough, the CD-ROM plays just fine in OS X, it has its own Mac part of the disc - so it’s a bit weird the disc says Windows only…

The other odd thing is that I thought that some of the bouncing balls were real but most we’re CGI’d. They’re not. They’re all real. Amazing.

(The music by the way is ‘Heartbeat’ by Jose Gonzales)

People Say the Darndest Things

Overheard snippet of mobile phone conversation on the train this evening:

“Of course the thing that he hates is the marriage proposal that comes with every cup of coffee…”

Obviously I’ve been going to the wrong branch of Starbucks.

Objective C for rest and relaxation

Trying to teach myself some programming again, I thought I’d give Apple’s XCode a whirl. After all, last week I found myself bemoaning the fact that when I were a lad all computers came with a programming language built-in or bundled for free, and generations of youngsters grew up capable of writing simple but useful software. Nowadays, I grumbled, you don’t get that nowadays, you have to spend shed loads of cash on programming environments.

Not true, of course. Apple bundle XCode with their OS. Trouble is, it’s not exactly Sinclair Basic. Or even RealBasic.

Take the usual first step - get your program to say “Hello World!” on the screen. In RealBasic this would go something like:

MsgBox"Hello World!"

In XCode’s Cocoa (Objective C) environment, however, it looks a bit like this:

- (void)drawRect:(NSRect)rect
 {
  NSString*               hws = @"Hello World!";
  NSPoint                 p;
  NSMutableDictionary*    attribs;
  NSColor*                c;
  NSFont*                 fnt;

  p = NSMakePoint( 10, 100 );

  attribs = [[[NSMutableDictionary alloc] init] autorelease];

  c = [NSColor redColor];
  fnt = [NSFont fontWithName:@"Times Roman" size:48];

  [attribs setObject:c forKey:NSForegroundColorAttributeName];
  [attribs setObject:fnt forKey:NSFontAttributeName];

        [hws drawAtPoint:p withAttributes:attribs];
 }

Yikes. Not quite a fair comparison, I admit. And it is free, and although it won’t compile Windows or Linux apps like RealBasic will, I’m guessing it’ll generally make leaner, faster code.

The example of code above comes from a rather good tutorial for beginners:
http://en.wikibooks.org/
wiki/Programming_Mac_OS_X_with_Cocoa_for_beginners

Oh well, they say brain-stretching work is good for you. Beats Sudoku.

The Flip-side of Giles Booth

In a, frankly rare, moment of solipsism, I googled myself and discovered that there was a settler in a place called Southold in colonial New York called Giles Booth. (There was also an Obadiah Booth and a Mehitophel Booth too - I bet they were just a couple of crazy guys.)

Then the other night the good people at BBC Four showed a Play for Today called The Flip-side of Dominic Hide, which I first saw when I was precisely one third the age I am today. It made a big impression on me all those years ago, and evidently made a big impression on the composer Michael Tippett too, as he pinched the plot for one of his operas.

It’s a lovely story about a man who travels back in time to the present (1980) to collect information on London Transport. But he discovers that there was a man in London in 1980 with the same name as him - Dominic Hide - and he resolves to find him. It turns out that he fathers a child in 1980, the Dominic Hide of 1980 is in fact his son.

So as I fell asleep I wondered if I, or my descendents, be travelling back to colonial New York to trace the other Giles Booth..?