webbooks in Woking

October 10th, 2008

Yesterday was the Woking Means Business trade show, we had a stand there so we could show local businesses how they could save money by using Free and Open Source software. Here is a (bad) photo of our computer laden stand. (Alan Bell on the right, Alan Lord is on the left)

on the stand from left to right is a Novatec laptop (they are one of the few suppliers who will sell you a computer without operating system), an Elonex webbook, an OLPC XO laptop, the pink Elonex ONE and on the shelf is a monitor attached to another Novatec laptop and a little Elonex ONEt. All running Free and Open Source software.

We had internet access on all the computers, thanks to another webbook hidden in the cupboard below. The other webbook had an Orange 3G dongle plugged in and was connected to a standard wireless ADSL router (not plugged in to ADSL of course). With a bit of messing about with the settings we got the webbook to act as a NAT router and internet gateway for all the others. We were connected for about 8 hours doing all sorts of things, demonstrating updates and installation of software and using our web based vtiger CRM system. It worked flawlessly and is a really great setup for anyone who wants internet access for a bunch of computers.

To get it working there are a couple of magical incantations required on the webbook, specifically,
sudo sysctl -w net.ipv4.ip_forward=1
to allow it to forward packets from the wireless interface to the mobile broadband interface, and then
sudo iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -o hso0 -j MASQUERADE
to set up a firewall rule to do network address translation (NAT) for the 192.168.0.0 subnet (the local network) with the external interface being called hso0 (if you have the Orange dongle the network card is called hso0, if it is 3 or T Mobile then substitute hso0 for ppp0). Finally on all the other computers we had to set their default route to point to the IP address of the webbook with the dongle and also edit their /etc/resolv.conf dns settings to point to the Orange DNS servers, if I had set the webbook up as a DHCP server this could all have been automatic.

Other webbook bloggers

October 10th, 2008

I have noticed a few others providing information and doing interesting projects with the webbook, John Voisy is blogging his experiences with Arch Linux on the webbook, Craig Jump has a page of useful webbook resources and the geeksquad have a wiki with quite a lot of information about the webbook. I will try to find room for a blogroll, are there other interesting webbook related sites I should be linking to?

Booting the webbook from USB or SD cards

October 10th, 2008

There is a trick in the BIOS to booting from USB or SD cards, it is a bit counter-intuitive, but it can be done.

Plug in the USB/SD card and power up the webbook,  press del straight away to enter the BIOS.

On the Boot tab don’t go into the tempting looking Boot Device Priority section, go to the Hard Disk Drives bit.

Swap the order so that the USB device is the 1st drive and the SATA drive is the 2nd drive.

F10 to save and exit

now it will boot from the USB.

When you are done, remove the USB and power down.

If you switch on and try to boot now it won’t do it, you will get a scary sounding error message saying Base-code ROM ID structure was not found., reboot and select proper Boot device.

Don’t Panic!

Power down and up and go back into the BIOS and back to the Hard Disk Drives bit. For some reason the 1st drive is listed as disabled, change that to enable the SATA drive and then you will be able to boot from it again.

That error message was because it was attempting to do a network boot, but the network boot ROM was turned off. If you want to boot from the network you have to go back into the Boot section of the bios and enable the PXE Configuration Execute bit. If you don’t know what PXE and TFTP are then you don’t need to worry too much about this!

Keystroke guide to a factory reinstall

October 10th, 2008

Some people have been asking about the exact factory configuration of the webbook, so here it is, keystroke by keystroke guide to building a webbook.

Insert the Ubuntu 8.04 or 8.04.1 Alternate CD into a USB CDROM drive

return (to select English)

F4, down cursor, return (to select OEM mode)

return (to select English)

up, return to select United Kingdom

right, return to not detect the keyboard

return, return to select UK keyboard

down to select eth1 the wired network card

return to cancel the search

return to continue

down return to not configure the network at this time

change the host name to webbook (not sure this was always done for every batch – some probably  have ubuntu as the hostname)

select guided-use entire disk

return to do the partitioning

left return to write the partion to disk

oem return, oem return to set the password of the oem user

make a cup of coffee.

return, to finish the installation

return to select UTC

return to reboot

remove CDrom

let the system boot up.

Ctrl+Alt+F1 to get to a console

oem, oem to log in

wget http://webbookblog.com/buildscript.sh

chmod +x buildscript.sh

sudo ./buildscript.sh

oem (the password for the oem user)

y to download a load of updates

y to install the ppa stuff without verification

agree to the SUN Java license

now it goes through another bunch of updates

oem-config-prepare

halt

Now it should restart with the first user wizard. The only difference is that Virtual Box is not installed, this is because there seems to be a problem right now with the version of the VirtualBox kernel module so it won’t install without errors. After doing the above procedure I ran <code>apt-get clean</code> to save some space used partimage to take a compressed image of the drive, this just about fits on a 1GB USB wristvault which should end up being the recovery media which you will be able to get from Elonex. We could do recovery media for different operating systems too, so you plug in the USB key and boot from it to reimage the drive as OpenSuse/Fedora/Debian/Gentoo etc. Would you be interested in that?

Compiz Beta – Part 4

October 1st, 2008

After a little pause for breath, here is part 4 of the Compiz series, focussing on the compiz config manager. You should by now have a working webbook with a few slightly fancy effects, switching between desktops will now slide the screen across and the menus fade in and out. You can also change the screen resolution to 1024×768 and have it compress onto the webbook native 1024×600 screen.

There are loads and loads of different settings you can mess with if you install the compiz configuration manager. Start the Synaptic package manager (System-Administration-Synaptic Package Manager) and install compizconfig-settings-manager. Once installed this will be in System-Preferences-CompizConfig Settings Manager.

I will tell you which settings I like, but don’t be afraid to play with others and leave a comment about ones you like/dislike.

  • Right down the bottom of the list is the Move Window setting (you can only see this running at 1024×768, you can just about click on it at1024×600). In this section untick the “Constrain Y” checkbox. This allows you to alt-drag windows off the top of the screen which is rather important when running at 1024×600.
  • In General Options (at the top) click the Desktop Size tab and change the Horizontal Vertical Size to 4. This is the number of sides of the cube (you can have 3 to make it a triangle or whatever shape you like really)
  • Enable Rotate Cube, this will enable Desktop Cube and turn off Desktop Wall (the sliding between desktops thing) Go into the Rotate Cube options and change the zoom slider to about 0.5, this zooms out a bit when the cube is rotating.
  • Enable Shift Switcher
  • There are fun things to play with in Animations and you can turn on or off wobbly windows to suit your taste.

Magic keystrokes:

  • Hold Ctrl+Alt then Click and drag to rotate the cube.
  • Ctrl+Alt+ left, right or down cursor moves the cube about from the keyboard
  • Windows+e to zoom out and see your desktops on a wall (you can drag applications about when zoomed out)
  • Windows+Tab to flick through windows in the shift-switcher

Software Freedom Day Cambridge

September 24th, 2008

Last Saturday was Software Freedom Day, a day to celebrate Free software and educate people about it. I arranged a loan of a couple of webbooks to each of the UK teams who were in their own ways telling people about the benefits of Software Freedom.
Here are a couple of pictures from the Cambridge event run by Robert Schumann

Compiz Beta – part 3

September 17th, 2008

OK, so with luck you now have the via drivers installed. You can do a few funky things already, for example go to System-Preferences-Screen Resolution and change it to 1024×768. This will compress the display onto the 1024×600 screen which allows some of the overly tall dialog boxes to fit (like the Evolution setup wizard for example). If you plug in an external monitor or projector the display should fill the screen nicely. In fact if you are into that kind of thing you can go to the synaptic package manager and install the openoffice.org-ogltrans package and get a bunch of fancy 3d transitions in the Impress application. I will have a go at posting some screenshots of that later.

Lets move on to enabling Compiz. To do this we are going to have to tell Compiz that the VIA driver actually is plenty good enough to use. Go to Applications-Accessories-Terminal and lets try to start Compiz just to see what happens.

so that didn’t go so well. Press ctrl+c to get back to a command prompt. So it has no whitelisted driver and is refusing to start. Fortunately I know where it stores it’s whitelist :-) The compiz command is just a script file that starts off some other things and this script contains the whitelist of approved graphics drivers, so lets go edit it

sudo nano /usr/bin/compiz

now go and find the line that starts with WHITELIST, add via to the end of the list inside the quotes as shown below:


now save and close with

Ctrl+X
y
return

now lets try starting compiz again (starting from the 4th line in the screenshot below)

lots of screen flicker then it seems to have started. Don’t worry too much about the error message on the last line. You should now see a few fancy fades and effects happening. Try switching desktops and they will slide across. Open and close a few windows. Nice isn’t it! Compiz will start automatically when you log on now that you have whitelisted the via driver.

There are lots and lots of effects to turn on, for that you need the CompizConfig Settings Manager, which I will talk about in part 4

Please let me know if the instructions work!

Compiz Beta – Part 2

September 17th, 2008

This only works on Hardy Heron 8.04 kernel version 2.26.19 if you have upgraded beyond that, i.e. if your webbook is currently up-to-date then the download on this page will not do anything useful and you will need to restore the backup of your xorg.conf to get it working again.

So now you know how to unbreak your webbook graphics, lets have a go at installing and using the via drivers.
First download this file Elonex Via Drivers.
This contains the binary drivers patched for the webbook and compiled against kernel 2.26.19 which is the current kernel at the time of writing this. When the next kernel upgrade happens there is a reasonable chance you will boot to a black screen. If that happens go to the recovery console and copy back your xorg.conf for the openchrome drivers.
So having downloaded the file start up a terminal window. I am assuming that you downloaded the file to the desktop (the default place if you just clicked on the link in Firefox), if you put it somewhere else then you may have to adjust the commands accordingly.

cd Desktop
ls
tar -zxvf elonexviadrivers.tar.gz
cd ElonexViaDrivers
sudo ./vinstall

so step by step
cd Desktop changes the current directory to the Desktop directory where you downloaded the file
ls lists the content of the current directory, it will show you everything on your desktop. I put this in just to confirm you are in the right place and to help you forget the dir dos command:-)
tar -zxvf elonexviadrivers.tar.gz
this one is a bit more complex the zxvf bit is 4 commands or flags we are passing to the tar program. z means uncompress the file using gzip (that is the .gz part of the filename). x means extract the files from the archive. v means verbose, so it will tell you what it is doing as it extracts them. f means the next parameter is the filename to work on.
cd ElonexViaDrivers
the extracted archive created a new folder on your desktop, we now change directory into that folder
sudo ./vinstall
sudo means run the next command as the super user. The single . means “the current directory” just as .. means the parent directory. cd . does nothing cd .. goes up a directory. ./vinstall means run the vinstall script that is located in the current directory. Now if you are familiar with the workings of other popular operating systems you may be a bit puzzled by this, why can’t you just type vinstall because you are in the right directory? Well this is a security feature, the current directory is not on the search path for applications to execute, you have to be explicit. Imagine if there was a script called “ls” in a directory, you go into that directory and use ls to list the contents but instead of doing that you just ran a script that does who knows what!
You can have a look at the contents of the vinstall script if you like. Just type
gedit vinstall
and the editor will open up so you can see what it does. It is always good practice to have a look at scripts before you run them. It is a great way to learn, and you can check that it is doing what you expect it to do.
So now you should have the via drivers installed, if you restart you will find the login window a bit stretched (not quite sure how to fix that yet) and you can log on to your desktop. Some things might be a bit smoother, but nothing dramatic is visible. For that we need Part 3 – Enabling Compiz, which I will crack on with right now . . .

Please shout if the instructions don’t work, there might be some typos in there

Compiz Beta – Part 1

September 15th, 2008

OK, before we rush in to installing the drivers now is the time to prepare the exit strategy and learn how to fix things when they go wrong. So we are going to deliberately break, and then fix the graphical user interface. First lets explain a bit about how things work in Linux.

The graphical user interface (X Windows or X.org) looks up a little configuration file stored at /etc/X11/xorg.conf this tells it a bit about the screen size and layout (you can have multiple graphics cards and monitors) plus a bit about keyboards and mice and so on. You can take a look at this by going to Applications-Accessories-Text Editor, then press the Open button and go up to the root of the filesystem, then into etc then X11 then open the xorg.conf file. If you go down you will find the Device section, it looks like this:

Section "Device"
	Identifier  "Device1"
	Driver      "openchrome"
	VendorName  "VIA Technologies, Inc."
	BoardName   "CX700M2 UniChrome PRO II Graphics"
	Option	    "ForcePanel"
	Option	    "EnableAGPDMA" "true"
	Option	    "SWCursor" "true"
	Option	    "NoAccel" "true"
	BusID       "PCI:1:0:0"
EndSection

in bold I highlighted the driver name, here it is using the OpenChrome driver. Have a quick look round the rest of the file, but don’t worry if most of it is gobbledygook. Lets leave the pretty graphical user interface behind now and get comfortable with the command line.

Press Ctrl+Alt+F1. This should take you to a black screen with white writing on it asking you to log in. You can use your normal username and password here. Press Ctrl+Alt+F7 and you will be back at your graphical user interface. Try Ctrl+Alt+F1 again. Now try Ctrl+Alt+F2, you get another login prompt. You can also log on here if you want. In fact Ctrl+Alt+F1 through to Ctrl+Alt+F6 are text mode consoles, Ctrl+Alt+F7 is the graphical console.

OK, back to the first text mode console.

The above bit doesn’t work when the OpenChrome drivers are actually running, but it works find if X is broken, or if you have the VIA drivers running. When you power up the webbook go to the grub menu and select the recovery option and go to a root shell.

webbook:~$ cd /
webbook:/$ cd etc/X11
webbook:/etc/X11$ ls
webbook:/etc/X11$ sudo cp xorg.conf xorg.conf.openchrome
webbook:/etc/X11$ ls

So these few lines above took us first to the root of the filesystem, then into the etc/X11 directory. The ls command listed the files in the directory, one should have been xorg.conf. Next we used the cp (copy) command as the superuser to make a backup copy of the xorg.conf file and call it xorg.conf.openchrome. Finally we used ls again to list the files and we should see that the new xorg.conf.openchrome file is present.

Now lets break things!

$ sudo nano xorg.conf

this launches nano, a little text editor, like gedit, but not as pretty. Now lets go wild! Find something and tweak it, maybe change the driver name, maybe go down to the screen section and change the resolution from 1024×600 to 1598×543! It doesn’t matter because we have a backup. Press Ctrl+x to quit nano and press y to save your changes. Ctrl+alt+F7 will take you back to the graphical console, it is still running. If you then log out it will restart X windows and re-read your modified xorg.conf and probably not start again. Power off and power on and it will still be broken. The fix is simple though. Ctrl+Alt+F1 to get to a console. Now log on

webbook:~$ cd /etc/X11
webbook:/etc/X11$ sudo cp xorg.conf.openchrome xorg.conf

this will take your backup configuration file and copy it over the top of the one you broke. Now if you restart the webbook (or restart the X Windows with Ctrl+Alt+F7 then Ctrl+Alt+Backspace) you should get back to the graphical login prompt.
So there we have it, from working, to broken, to mended again, and you are all prepared for the next installment . . .

Hands up everyone who wants Compiz on their webbook!

September 12th, 2008

Sadly we are not yet ready to push out the improved drivers for the graphics card to all the webbooks, however for those willing to tinker with the command line you will be having wobbly windows and a spinning cube of desktops very soon. There is a chance that the next kernel upgrade will leave you booting to a black screen, but I will show you how to fix that from the command line. That is why we can’t push the drivers out through the repositories yet. I will write up a couple of articles over the next few days on this and give you some downloads to install. To wet your appetite a little here is a screenshot of me switching between desktops on my webbook:

It is probably best if you have another computer so that if you break the webbook you can still get to the internet to find out how to fix it. Consider this a beta test of the graphics drivers, unsupported, except by me. If that scares you then just wait until we put it in an automatic update and you won’t have to do anything. I would love to get this on by default right now and push it out through the repositories, but I just can’t wait any longer to share it with some of you at least!