Tuesday, August 29, 2006

More Tests

On those boring evenings I like doing Internet tests just for fun (see previous postings).

A few days ago I did some Mindviz tests:

This one is quite true:

I'm 45.0% nerdy!
My computer appears to be my best friend!

Take the Nerd Test at MindViz


And I'm kinda proud of this one ;):

I have an IQ of 156!
I am in the 99th percentile!
This means that I did better than 99 percent of the people who have taken this test!

The average score for this test is 100.
The maximum score is 167.
The minimum score is 66.

Take the IQ Test at MindViz


Also proud about this one:

I'm 47.7% lazy!
I may want to consider removing that youatloaf from my shirt

Take the Lazy Test at MindViz


Not so proud...

I'm 48.0% pure!
I'm on my way to a healthy existence, keep up the good work!

Take the Purity Test at MindViz


No news here:

I'm 50.0% freaky!
Wow calm down, I'm starting to freak you out!

Take the Freak Test at MindViz

Now This Is A Game I Am Looking Forward To

Introversion Software presents its third title, DEFCON, a stunning online multiplayer simulation of global thermonuclear war.

You play the role of a military Commander hidden deep within an Underground bunker. Your mission - to successfully exterminate your enemy's civilian population whilst disabling their ability to attack your own. Start by launching your battleships, subs and bombers in order to decimate your opponent's defences. Scramble together your alliances but remember only one can stand victorious.

Prepare your pre-emptive strike before one of your supposed allies gets the same idea. Choose the perfect moment for betrayal, obliterating your opponents with an apocalyptic thermonuclear barrage, but get it wrong and their devastating counter attack will bring you to your knees!

That really sounds cool. Remembers us of the movie Wargames of course. Check the videos on their website. Uplink and Darwinia were such great games too, try the demos if you haven't altready.

Linux Games

I've been checking out some games for my Linux machine recently (that almost sounds like an oxymoron). I'm not going to go all whiny on you with a "Linux does have games!"-post, but will just review a few of them (the most popular ones).
  • Planet Penguin Racer (a fork of Tux Racer): I never wanted this game, when all those Linux-sites/posts/magazines said: "hey look we have a racing game with a penguin" it just looked too kidish. However: it is quite entertainable, and making some maps is quite fun. This is a nice quickie-game for the people with direct 3d rendering enabled ;).
  • Neverball: a game where you tilt the play field to make a ball roll and pick up coins. It's fun and looks quite nice but I suck at it.
  • Freecraft: it's an RTS, with poor graphics (sorry), I didn't like it that much and wish there was a good RTS game for Linux. I don't have anything against sprites (I loved Age of Empires 1 and 2, Age of Wonders, Starcraft, Kohan, etc...), but this can look better.
  • Globulation 2: also an RTS. Also not bad but I don't like it that much.
  • Tuxkart: fun for a while but not fantastic.
  • Frozen Bubble: the game everyone knows, and still great fun too!
  • Pingus: a Lemmings clone. Well done game, will keep the oldskool puzzlers really entertained!
  • Rocks And Diamonds: an all-in-one Boulderdash clone. Which I absolutely love because I can even play the Supaplex levels.
  • Wesnoth: another instant-classic, hexgrid fantasy strategy game, well done graphics and great tactical fun both online and offline.
  • Crimson Fields: Battle Isle clone, not bad but the graphics aren't that great.
  • Advanced Strategic Command: also a Battle Isle clone: better (traditional) graphics and AI, but the interface/polishing could be better.
  • SCUMMVM: absolute favorite. Grab this program together with some fat old-Lucasarts-adventures torrents and relive all those classics... A fantastic game for those long train-trips. Ah... the memories of playing Broken Sword 2 and really diggin' the characters and story. They don't make such games anymore since Grim Fandago[1].
That's it. It's not F.E.A.R., no Civilization 4, no GTA and no Age of Empires 3, but it is enough to kill a few minutes. After all, my Linux computer is my work machine, so the less I play, the more work I get done...

[1]: Actually I'm lying: Dreamfall, Fahrenheit (a.k.a. Indigo Prophecy) and others are great recent adventure games.

Tuesday, August 22, 2006

Visiting AIGLX/Compix And Back Again

Here it is, as promised...

Yesterday I decided to "quickly give AIGLX/Compiz a go". I use AIGLX because I do this on my Thinkpad and it has an Intel card. AIGLX gives better performance with these cards.

There are already nice how-to's at this and this location, but I just wanted to share my experience, but also add some additional remarks. And: we will even revert back to the normal Gnome desktop...

1. Add the following to your sources list:
sudo gedit /etc/apt/sources.list

and add:

## AIGLX + COMPIZ...
deb http://ubuntu.compiz.net/ dapper aiglx
deb http://ubuntu.compiz.net/ dapper main
deb http://xgl.compiz.info/ dapper main aiglx
deb-src http://xgl.compiz.info/ dapper main aiglx
deb http://www.beerorkid.com/compiz dapper main aiglx
deb http://media.blutkind.org/xgl/ dapper main aiglx

You might be wondering why I add a lot of repos here. In my configuration, apt-get complained about some missing packages when I used the repos mentioned in the wiki/docs.

The following steps are exactly the same as the docs/wiki...

sudo apt-get update sudo apt-get dist-upgrade

3. Install the latest dri modules:

sudo apt-get install linux-dri-modules-common linux-dri-modules-`uname -r`

4. First purge Aiglx/Compiz:

sudo aptitude purge compiz-aiglx compiz-aiglx-gnome

5. Then install (I installed the Quinn packages, because I randomly read somewhere they were better):

sudo apt-get install compiz-quinn-aiglx compiz compiz-gnome

6. Now let's
sudo gedit
/etc/X11/xorg.conf

Edit the Screen section to 24bit mode:
DefaultDepth 24

Make sure your Modules section has the following loaded:
Section "Module"
# Load "GLcore"
Load "bitmap"
Load "ddc"
Load "dbe"
Load "dri"
Load "extmod"
Load "freetype"
Load "glx"
Load "int10"
Load "type1"
Load "vbe"
EndSection

If you happen to have other modules: you may probably leave them in (I had one).

Make sure there is only one option in the Device section:
Section "Device"
Identifier "Intel Corporation Intel Default Card"
Driver "i810"
Option "XAANoOffscreenPixmaps"
BusID "PCI:0:2:0" EndSection

Add Aiglx to your server layout:
Section "ServerLayout"
Option "AIGLX" "true"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "Synaptics Touchpad"
EndSection

Uncomment the DRI section:
Section "DRI"
Mode 0666
EndSection

Finally, you must have:
Section "Extensions"
Option "Composite" "Enable"
EndSection

7. Configure gdm:
sudo
gedit /etc/gdm/gdm.conf-custom

It must contain the following:
[servers]
0=aiglx
[server-aiglx]
name=aiglx server
command=/usr/bin/Xorg-air :0
flexible=true

And restart gdm (pray):

sudo /etc/init.d/gdm restart

Note: my gdm restart did not seem to work (it just gave me the cli). If this happens to you, just do a simple sudo gdm, it will work when you reboot of course.

The following information is not in the docs/wiki:

Yes! It seems to boot. But my windows have no borders... see that new Compiz icon in the "taskbar" (top right), it looks like a red cube. Right click it, edit preferences, plugins, and enable most of them (test it out which ones work fine on your system). Make sure the first ones (gconf) are enabled. Save. Right click again and choose Restart Compiz. Your windows will now show borders and be wobbly and so (if you enabled the plugins).

Now let's fix Totem. I had gstreamer so:
totem-gstreamer
And then select on default video playback "XWindow (NoXv)" in video tab.

Now for some themes, make sure the following is installed:
sudo apt-get install gcompizthemer
sudo apt-get install cgwd
sudo apt-get install cgwd-themes

Note, you might also need to edit /usr/bin/compiz-start and replace all instances of gnome-window-decorator with cgwd (I had to do this). And restart Compiz.

Now right click the Compiz-cube again and choose Themes. You will now see: themes. Use them.

Some of the following information is in the docs/wiki...

After playing with it a few days I notices I liked old ways better. My system was performing well but the idea of using these experimental packages on my work laptop was a bit scary... let's go back now.

Let's revert all we did. Speed style.

1. Uncomment all the repos you added in /etc/apt/sources.list.
2. Open the totem properties again and set the Video back to auto.
3. Open /etc/gdm/gdm.conf-custom and remove everything you added, it will probably just contain:
[servers]
4. Open xorg.conf and uncomment/revert all your changes.
5. Uninstall Compiz:
sudo apt-get remove compiz-quinn-aiglx compiz compiz-gnome
sudo apt-get remove cgwd cgwd-themes
sudo apt-get remove xserver-xgl compiz compiz-gnome gset-compiz
Yes there are doubles. Yes it will complain about downgrading, just choose yes... don't worry.
6. Make a file in /etc/apt/preferences and put the following in it:
Package: *
Pin: release o=Ubuntu
Pin-Priority: 1001
save it.
7. Run:
sudo aptitude update
sudo aptitude upgrade
It will downgrade all your packages.
8. Open /etc/apt/preferences again and remove the lines from step 6.
9. Open synaptic, go to Status: Local or Obsolete and remove all Compiz or Quinn or Aiglx related packages.
Note: synaptic doesn't load? Probably a libcairo problem if I remember correctly (I had the same problem after installing Compiz Quinn). Make sure you followed the above steps correctly and do:
sudo apt-get install libcairo2-dev libxft-dev libfontconfig1-dev
10. Reboot and hope that all goes well :).

Wasn't that fun? And it only took 10 minutes...

Does anyone however know a similar alt-tab feature and the "I move my mouse to the upper right and get a nice window overview" feature for Ubuntu without using Ubuntu? Because I liked those two...

Didn't have the time for screenshots or screencasts. There are enough of them already. And you really have to experience it for yourself to really enjoy the full power. Compiz will be great when it's fully stable and in the main repos and easy installable...

Close Call

Latest Ubuntu xorg-core update breaks X. Oh boy...

If you are already in trouble are want some general info: head over to this thread. The package itself has been fixed (already). Be sure to download the point 4 and not the point 3 release.

So what's this all about? There was a main Dapper update which crashed X for a lot of people. These people (some of them) then became mad and started bitching about Ubuntu, X, or Linux in general.

Me too would like to comment on some of these aspects:
  • Yes, something was wrong. Luckily I didn't install the broken update (didn't get an update notification in time, phew).
  • Some people use the "you didn't pay for Ubuntu so you have no reason to blame them if something goes wrong" argument. I don't agree with this. It is the goal of Ubuntu and Linux in general to provide a stable and better alternative. Maybe you don't pay for Ubuntu, but in order to introduce Linux into the desktop and enterprice environment for heavy daily use, it should first strive for maximum control, security and stability. This situation would have been unacceptable for corporations who do pay for these products, thus: it is better to avoid it.
  • This is no reason however to start complaining. It's situations like this that really show of the power of the developers and the community. There was a fix up in the forums almost immediatly. And the package has been fixed already.
  • Of course it's difficult to search forums when you have to do it from the command line. So it never hurts to have Lynx or equivalent installed. And look at it this way: what if there was no cli? At least in Linux you always have a working bare environment in which you can fix things.
Just my two cents. Let's hope this does not have to happen again.

I was just working on my post regarding my AIGLX/Compiz experience, I will publish it soon.

Sunday, August 20, 2006

Moved a long time ago...

Just to let you know in case you didn't know already: I've moved my blog location. New address is http://bedagainstthewall.blogspot.com.

Saturday, August 19, 2006

Combat, New Blogger And A Farewell...

A farewell to Windows that is. Which I removed now from my laptop (since I'm so pleased with Ubuntu).

Of course I still have Windows on my gaming-slash-desktop machine. Playing a bit of Flatout 2 lately. I tried to download the F.E.A.R. Combat installer (multiplayer component of F.E.A.R. which is now released for free). But after installing and trying to run it quit with a nice ugly error... so no Combat for me until I sort this out.

I've been reading about the new Blogger and their closed beta. Pity for me. Until today: I accidently logged in with my Google account name and password and *poof*: it gave me an option to migrate. I picked a new template to try some things (I actually like this one now). The new templating system is quite cool: it is really easy to arrange items and pick fonts and colors.

I see that there is now an option set labels too for a post (which is a fancy name for "tags") which means I don't have to use the Technorati ones anymore...

That was all folks... more later.

Monday, August 14, 2006

Thinkpad Stories (5 already): "Bluetooth and Nokia phones."

Story number 5 already.

Here is the background talk: now that I finally have bluetooth support (I never had an USB dongle) I could finally copy my pictures over from my Nokia phone (since I don't want to invest in an expensive non-standard USB cable).

I followed some advices from the forums and other Internet resources... here is how I did it.

Make sure the following packages are installed on your system:
sudo apt-get install gnome-bluetooth
sudo apt-get install obexserver
sudo apt-get install bluez-utils

Then load the following modules into the kernel (I could skip this step).
sudo modprobe l2cap
sudo modprobe rfcomm

Also, start your bluez-utils:
sudo /etc/init.d/bluez-utils start

Since I am using my Thinkpad, I active the integrated bluetooth device:
sudo su
echo enable > /proc/acpi/ibm/bluetooth

Activate bluetooth in your phone. Make sure it is visible to other devices.

Now do:
hcitool scan
You should see something like this:
Scanning ...
00:11:22:DD:EE:FF YOUR_PHONE_NAME
Copy the address to the clipboard, you'll use it later.

Now we edit a simple configuration file:
sudo gedit /etc/bluetooth/rfcomm.conf
And save this (use your own address, leave the channel to 10):
rfcomm0 {
device ADDRESS_OF_YOUR_PHONE;
channel 10;
comment "Your description";
}

You may wonder how we got this channel, you can find out by entering this command:
sdptool browse ADDRESS_OF_YOUR_PHONE

Somewhere in the output you find the following:
Service Name: OBEX File Transfer
Service RecHandle: 0x1000f
Service Class ID List:
"OBEX File Transfer" (0x1106)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 10
"OBEX" (0x0008)
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"OBEX File Transfer" (0x1106)
Version: 0x0100

See?

Now add the Nokia channel to communicate with the phone:
sudo sdptool add --channel=10 OPUSH

And bind it with rfcomm:
sudo rfcomm bind /dev/rfcomm0 ADDRESS_OF_YOUR_PHONE 10

You're all set up... now you can:
  • Send a file from your phone:
    (1) Start the obexserver with
    (stores files in /tmp, you must enter this command after every file send):
    obexserver
    or (stays open, should store in your home dir, but didn't work with me):
    gnome-obex-server

    (2) Use your phone, select a picture or video file, then Options -> Send -> Via Bluetooth, it should find your PC.
  • Send a file to your phone:
    (1) gnome-obex-send /path/to/file
    It should find your phone and prompt you.
Don't forget that you must use these commands every reboot again (or you could make a script):
sudo modprobe l2cap
sudo modprobe rfcomm
sudo /etc/init.d/bluez-utils (re)start (if necessary)
echo enable > /proc/acpi/ibm/bluetooth
sudo mknod /dev/rfcomm0 c 216 0
sdptool add --channel=10 OPUSH
sudo rfcomm bind /dev/rfcomm0 YOUR_PHONE_ADDRESS 10

When you're done, I find it neat the disable the integrated bluetooth device (let's conserve power) this is easy as pie:
echo disable > /proc/acpi/ibm/bluetooth
and you could also stop bluez-utils:
sudo /etc/init.d/bluez-utils stop
if you want.

This was one of my reasons why I kept a Windows partition. Now that I have figured out how to do this in Ubuntu, one partition has a greater change of being wiped and merged...

Happy bluetoothing ;).

Tags: , , , , , .

Saturday, August 12, 2006

Realtime Monitoring With PHP

If you're a Digger, you'll probably know the Digg Labs: the site where you can track how users are digging stories. In realtime.

Most of you will know that Digg is programmed in PHP. The two Flash applications provided in Digg labs have to get their data from somewhere. I was wondering how to achieve a similar type of result within one of my own Intranet applications I am writing.

Of course, it would not be an exact copy, this is what I wanted to do:
  • User tracking in realtime.
  • Query execution tracking in realtime.
  • Making an interface for administrators to see this, not using Flash.
So no digging stories, and no Flash. Because Flash is heavy and I am not a very experienced Flash programmer.

Of course, this functionality can be split up into three parts:
  1. The main "server": the page or piece of software which tracks all the incoming messages, and sends them to all the monitoring users.
  2. The monitor: the ones who view all the activity and receive messages from the server.
  3. The sender: the page or function or class or whatever which sends the actual messages to the server. E.g.: "User 123 has logged in into the system."
How would I achieve this. One possible way would be using files. But that's a big no-no because yo have to implement file locking and all kinds of timestamp-magic to quickly retrieve the latest messages to make it realtime-ish.
Another way is using a database. Databases are fine for logging stuff but this would also not work because the amount of inserts and selects would quickly become too large (slowing down the user experience) and it would also be not really realtime.

Why would these two options not be realtime? Consider that all your visiting clients are putting messages into the database. These are given a timestamp. Now consider your monitoring application. You would have to retrieve all the latest messages every X seconds (only retrieving the ones you haven't retrieved before of course). So it would not be realtime, but "intervalled".
Of course: this can be a valid solution too, but I wanted something real-realtime.

So I decided I would be using a real client/server system. Using PHP's socket support.

The first script I wrote was the main server. This process would continue forever and handle all the incoming connections and commands. You can run this script in a browser on the server, but I advise running it from the command line (convert all the
's to \n for extra commandline-ness).

I downloaded some chat server script a while ago and edited that. You can find the complete source code here.

Then I wrote a small function for connecting, authenticating and sending messages. You could also write this as a class of course.
I used this function in every important event I wanted to log and monitor e.g. when loading a page I sent "User X has entered page {$_SERVER['PHP_SELF']}".

You can download that function here.

To finish of, you can download the monitoring script, using Javascript and output buffering, you can see all the messages in real time. The interface is very crude but provides a good starting point for more neat looks and ideas. You could even connect using telnet and see the messages there.

Now: start socketserver.php on your server, you'll see "Running" if everything is OK.
Then, include the function from socketsender.php and sprinkle it all over your scripts...
Then use socketmonitor.php to see stuff happening in realtime.

Tags: , , , , .

Friday, August 11, 2006

Thinkpad Stories 4: "Render it dammit!"

i810... glxinfo | grep direct nothing. Not enabled because it has problems. (Something about 1.5.0 expected but 1.4.? found. I cannot remember it anymore but you will find users with similar problems on the forums).

Anyhow: I could not get it to work. It seemed fine however, but glgears proved otherwise: slow as hell.

I was giving up on it and decided to try and install AIGLX, so I followed the first steps on the forums: add this to /etc/apt/sources.list:

deb http://xgl.compiz.info/ dapper aiglx
deb http://xgl.compiz.info/ dapper main

then do an

sudo apt-get update

I was reading on what to do now when suddenly the "There are updates" notifier came up: I looked at it and it showed some ATI and Intel driver updates for my i910...

Why not? Install.

Then someone on the forums said doing an dpkg-reconfigure xserver-xorg could help. I did and followed all the steps (answering default, 1024x768 and 24bit, leaving everything else like it was). But pay extra attention when it asks you about kernel frame buffering (it is a yes or no question). It seems sometimes it works without it and sometimes with it. I went with what looked best and choose yes.
Then I restarted my x-server (ctrl-alt-backspace). Did a glxinfo | grep direct again and ("what the hell?") direct rendering is enabled. Glgears goes really fast now too ;).

All this without really installing AIGLX nor manual editing my xorg config. You should try it too.

Now I'm completely happy, ACPI works like it should too, with a nice icon in the taskbar and all.

I also installed SciTE (use apt-get) and Aptana as my favorite editors.

Be warned when you use Aptana in Ubuntu (see their docs). I wrote a script like this:
#!/bin/sh
export MOZILLA_FIVE_HOME=/usr/lib/mozilla
./aptana
And execute that when I want to start Aptana.

Simple stuff - I know, but as a Linux/Ubuntu noob (well, not a complete noob but fairly noobish) I am proud that I have accomplished all this. It looks and runs nice and fast now, playing music in the background, a nice theme, a nice login screen... I'm loving Ubuntu in general and looking at my Windows desktop on my other computer just looks... ugly...

I should still install Flash Player tho. But I'll probably wait until Player 8 (or was that 9 already?) finally gets released (hurry up guys).

Well there it is: my "switching" story. That's right, this will be the first time I actually will use Linux for a desktop pc for more than a few days... I'm looking forward to it.

Tags: , , , , .

Thinkpad Stories 3: "Now for some colours..."

Ubuntu's finished installing. It all looks nice.

I picked a nice wallpaper, set my workspaces to 8, and installed gnome-art (sudo apt-get install gnome-art). Picked some nice decorations (I like the Human theme but not that much) and sat back for a few seconds to admire my new desktop.

Then: I installed Automatix. Automatix had a reputation of being intrusive and all, but is very well maintained these days and I hadn't had the slightest problem. (Easyubuntu gave an error, and less options to install. Don't want to flame though: it's good too and my previous favorite.)

This took a while.

There were to other things I wanted to solve before being completely satisfied.

The first was WPA support since my home network uses that.
I found a lot of information on the forums, configure this and write that, but here is the most easy way to do it:
  • Make sure wpa-supplier and gnome-network-tools are installed.
  • sudo gedit /etc/network/interfaces. Uncomment everything except local loopback entries.
  • Note: you can use commands like
    /wpa_supplicant -w -i eth1 -c /etc/wpa_supplicant.conf -D wext
    and write a configuration as following in /etc/wpa_supplicant.conf:
    network={
    ssid="TYPEHERE"
    scan_ssid=1
    proto=WPA
    key_mgmt=WPA-PSK
    pairwise=TKIP
    group=TKIP
    psk="TYPEHERE"
    }
    (It didn't work for me without the pairwise and group settings.)
    But you do not have to. Read on...
  • sudo gedit /etc/default/wpasupplicant and just enter this:
    ENABLED=0
  • Reboot probably (or re-init).
  • I now see an eth0 icon in my Gnome taskbar. I also see an icon were I can choose from available wireless connections. I pick mine, enter my WPA password and set type to TKIP. I also have to enter a keyring password for gnome.
    Waiting... authenticating... assigning address... done! I disconnect my network cable.
See next post for my second problem.

Tags: , , , , .

Thinkpad Stories 2: "Partitioning woes."

It was getting late when I finally figured out how to properly boot. Now: it was time for the actual install...

Of course: I had to partition, but I wanted to keep Windows XP (on a smaller partition) and my Recovery partition. I was happy to see a resize option for my Windows XP drive, I picked it and try to execute.

Nothing happens...

Again? Nothing! Oh well, I had expected this. NTFS always gives me headaches in Linux (reading, writing, resizing, the works...).

So I want to boot back into Windows and try some resizing tool.

No operating system

Great, the partition is messed up. Ah well, back to Ubuntu installer and execute plan B, I partition my harddrive as following:

First - 40 GB, FAT32: Windows XP, no mount point, bootable.
Second - 50 GB, ext3: Ubuntu, mount point /, bootable.
Third - MAX GB (around 4 GB), swap.
Last - remaining size, my recovery partition: remains untouched.

Save and format / and swap. Exit installer, and press the ThinkVantage button.

Yes: the recovery partition still works. File recovery, back to factory settings ("oh no it is going to wipe my partitions"), keep nothing.

"Do you want to install on C:\ and format. Or do you want to format the whole hard driver?"

Yes! Only C:\ of course (the FAT32 partition I made in Ubuntu installer).

Okay: this takes a lot of time. Really a lot. The first steps go fast (I was happy) but after that it has to perform a truckload of post-installation installs (that bullshitware again). It's passed midnight...

Done: I wipe the crapware and go back to Ubuntu.

boot:

I type "server" and press enter. I'm tired and fetching all that stuff now over the Internet will take too long. It installs. Grub's being nice and detects both my Windows XP and Recovery partition.

I went to bed (2 am). And did a

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ubuntu-desktop

this morning.

Tags: , , , , .

Thinkpad Stories 1: "So ya wanna boot Ubuntu?"

After quickly setting up Windows XP and removing all the unnecessary bullsh...soft-ware (who wants Symantec for God's sake?) it was time to think about booting the Ubuntu installer.

This would be a non-trivial task for me, because my CD/DVD-burner/reader has not arrived yet and I could not wait (who could), I would have to do a PXE or network-install.

Logically, you need a client (the PC you want to install Ubuntu on), and a server. In my case, the server would be my Windows XP x64 machine.

This Ubuntu Wiki entry gives a good starting point for setting up your server. But some things could be a bit clearer... let me drill down the steps:
  1. Is your client able to do a PXE boot? My Thinkpad is (most of them are). (When showing the splash screen, press F12 to show a boot device list, pick the network PXE one.) So no floppies needed here.
  2. On your server: create a folder like C:\cp or C:\ubuntu to store all the needed server stuff.
  3. Download Tftpd32.exe and place it in the folder you just created.
  4. The Wiki entry advices to download a netbootkit, but since I already had my Dapper ISOs, I did it myself: go to the Dapper CD you want to use (this actually doesn't matter, but I picked the alternate-install CD). (You don't need to burn it: WinRAR can open ISO images or you can mount them with DaemonTools.)
    Then go to the folder CD:\install\netboot\ubuntu-installer\i386\ (replace CD with your drive letter) and copy all the contents to FOLDER\netboot\ (replace FOLDER with the folder you created in step 2, and create the netboot folder). You may also use another location to put these files, but it's neat to put them in one spot under our working directory.
    Note: don't be stupid (as I first was). Do NOT copy CD:\install\netboot! Yes, there is a pxelinux.0 file in that folder, but it will not work (it is 0 bytes large), you must copy the files from the location above.
    Update: it seems you have to be extra careful. Apparently, you do not only have to copy the contents of CD:\install\netboot\ubuntu-installer\i386\, but also the directory itself CD:\install\netboot\ubuntu-installer\ (the directory itself, not the contents!) to FOLDER\netboot\. This is probably not the best method, but works...
  5. That was easy, right? Now open Tftpd32.exe. Here is were it got a bit tricky...
    - Click the DHCP server tab. Yes we will configure this. I was wondering if this was necessary because my router-slash-firewall already has a DHCP server built in. The answer is: yes you have to do it!
    - Set up the following fields:
    • IP pool starting address: I picked 192.168.111.5. (My gateway is at 192.168.111.1.) Figure out what your gateway is, you can do that by running ipconfig from a Windows Command Line.
    • Size of pool: 5, more than large enough.
    • Boot file: in this example, I picked \netboot\pxelinux.0, but you could have placed it at another location.
    • WINS/DNS Server: your gateway, in my case: 192.168.111.1.
    • Default router: also your gateway.
    • Mask: probably 255.255.255.0.
    • Domain Name and Additional Option: leave all as is (blank).
    - Press Save to save.
    - Then press the Settings button. Make sure PXE Compatabilty, Translate Unix file names and Allow '\' As Virtual Root are enabled. Also, I had to enable Use Tftpd32 only on this interface: 192.168.111.2 because I have two network adapters (just to be safe).
    - Press OK.
  6. Done, restart Tftpd32.exe if that is necessary (it warns you).
  7. Now: I had to disable my second network adapter. I went to Network Connections, right clicked and choose disable. This might not be necessary but better be safe...
  8. Tutorials say you have to disable your router's DHCP server. This might be true! I did not have to do it but I advice to do it anyway so the network boot will surely use your server for DHCP/PXE booting. I cannot explain this process here, as it differs from router to router and from firewall to firewall. Consult your manuals or Google if you need to.
  9. You're all set: boot your client into network boot. If you're lucky and did everything correctly, it gets assigned a DHCP address (you will see this in the Tftpd32 event list on your server). Then Tftpd32 will sent a few files over (you will see the process bars) and Ubuntu will splash. Press enter to begin install.
  10. Important: a few users have had problems on the Ubuntuforums with the following. After the Pick a mirror step Ubuntu will not be able to connect. Here's how to solve it: when you are in the first installer steps (before setting up network with autodetect!) you must close Tftpd32 on the serverside. You must also again enable your router's DHCP server. Then let Ubuntu discover the network settings. It will not get an address from your router and go out on the Internet: the mirrors will be resolved now, and you can continue installation.
    You don't need Tftpd32 anymore unless you want to start over. Just start Tftpd32 again and disable the router's DHCP server (again: I did not have to do this).
    I hope that solves some of my fellow Ubuntu-ers' problems...
Up next: partitioning woes.
Tags: , , , .

Welcome Thinkpad X60

Good news everyone: yesterday my Thinkpad X60 arrived. I toyed a little bit but had already decided I wanted to put Ubuntu on it.

I encountered some (small) problems on my way to my perfect Ubuntu setup, but I've been able to solve them. In the following posts I will tell you a little bit about my Thinkpad setup.

First things first: the security of this machine is very tight. I've set up a bios supervisor password coupled to the fingerprint reader. So nobody can boot the machine except me: I love it.

Be warned though: when you forget your supervisor password you are, in fact, doomed. Lenovo will have to replace your main board (quoting the documentation) and whatnot and it will cost you...

I'm also loving the IBM-logo. Now that the Thinkpad production is outsourced to Lenovo it won't be very long until the Lenovo logo starts showing up on the laptops themselves (which is already the case with the power adapters). I love IBM and their products so it's nice to have a "last-generation" machine.

Read on for more Thinkpad stories.

Tags: , , , .

Monday, August 07, 2006

Tests

A few days ago on Digg (and still a bit slow): http://www.likebetter.com/, a website where you click on pictures you like better (as the name suggests), and after a while, it will try to figure out your personality (click the brain icon).

Here's mine:
  • You're a guy. Correct.
  • You like to plan things in advance. I like to think so, but probably not in all cases. But I consider this one correct too.
  • You are fine with fuzzy or incomplete facts. Certainly not.
  • You're the kind of person who thinks first and acts later. Again: most of the time: indeed.
  • You often employ emotion in your decision-making. What is "often"? I would say yes, but again: not always.
  • You're a night person. Certainly correct...
  • You study/work better with music playing in the background. Since I have DI.fm or some of my own MP3s running in the background all the time: correctomundo.
  • You're not very religious. Correct. I have a certain interest in religion and spirituality but I do not believe it (in do believe in believing tho).
  • Your desk is a complete mess right now. I try to avoid it, but at the moment: indeed.
  • I bet you find it easy to empathize with other people. Sometimes.
  • When it comes to politics, you're liberal. Since I do not live in America and we have a more diverse system than liberal vs. conservative here, I can not really answer this question. However, I consider myself more conservative so: incorrect.
  • You're a teenager. Slightly incorrect (20).
  • You communicate best one-on-one. Most of the time: correct, but I like speaking to groups too.
  • You feel energized by meeting lots of new people. Correct.
  • You are right-handed. Correct.
If you vote more you will get more results, you can also send the test to your friends and compare the results.

A user on Digg commented on the site and gave the following link: http://www.colorquiz.com/. Another site which tries to guess your personality. Without asking 200 questions like others do. You just pick colors. I was amazed at the results:
Your Existing Situation
Acts calmly, with the minimum of upset, in order to handle existing relationships. Likes to feel relaxed and at ease with his associates and those close to him.
Wow! Already correct.
Your Stress Sources
Suppresses his innate enthusiasm and imaginative nature, for fear that he might be carried away by it only to find himself pursuing some will-o'-the-wisp. Feels he has been misled and abused and has withdrawn to hold himself cautiously aloof from others. Keeps a careful and critical watch to see whether motives towards him are sincere--a watchfulness which easily develops into suspicion and distrust.
I don't like to admit it... but this thing is close again.
Your Restrained Characteristics
Feels that he cannot do much about his existing problems and difficulties and that he must make the best of things as they are. Able to achieve satisfaction through sexual activity.
That's me.
Trying to calm down and unwind after a period of over-agitation which has left him listless and devoid of energy. In need of peace and quiet; becomes irritable if this is denied him.
Amazing!
Your Desired Objective
Feels the situation is hopeless. Strongly resists things which he finds disagreeable. Tries to shield himself from anything which might irritate him or make him feel more depressed.
Not completely correct (I think). I don't feel any situation is hopeless (or do I?). I do resist disagreeable things.
Your Actual Problem
Disappointment and the fear that there is no point in formulating fresh goals have led to anxiety, emptiness, and an unadmitted self-contempt. His refusal to admit this leads to his adopting a headstrong and defiant attitude.
This might be true. I do have a headstrong attitude. But I don't (didn't) know that was the cause...
Your Actual Problem #2
His natural ability to examine everything with critical discrimination has been distorted into an attitude of harsh disapproval, which opposes and denigrates without regard to the real facts.
Ah this is certainly true again. I do love to examine everything. I my disapproval can be very harsh indeed. On the other hand: I think my approval can be very rewarding and caring...

Aah, these tests are a nice way to kill some time. It was certainly more correct and more fun than that Scientology test I took online: 300 boring questions with a crazy result: I'm an unstable depressed nervous aggressive irresponsible critical accord-lacking and withdrawn non-believer... Attention urgent, unacceptable state. Hehe...

More posts coming...

Tags: , , .