Please subscribe to RSS Feed! :)

Dear readers,
I’ve uploaded Windows XP driver for Winbond W89C35 driver as it can enable the use of Winbond USB wifi dongle (VID:0416 PID:0035) under Ubuntu Lucid Lynx.
Follow the step-by-step instruction as outlined in the Ubuntu Wiki page, in order to use the driver with ndiswrapper.
p/s: I’ve uploaded this driver because I find a lot of websites out there that offers fake Winbond W89C35 drivers.
p/s 2: Of course I would recommend the rest of the users out there to buy a more Linux-friendly USB wifi dongle, such as from TP-LINK, Netgear or TrendNet which I found to be very portable across operating systems.

Selenium is quite a famous testing tool and has a lot of documentation (so I
wont bother to repeat stuff from there). I'll just focus on the bits where I
feel the documentation could improve.
STEP#0.After downloading selenium remotecontrol
change to the directory. {to install selenium on you local machine, download selenium from here.}
~$ cd selenium-remote-control-1.0.3/
~/selenium-remote-control-1.0.3/selenium-server-1.0.3$ sudo java -jar
selenium-server.jar
09:03:05.618 INFO - Java: Sun Microsystems Inc. 1.6.0_0-b11
09:03:05.638 INFO - OS: Linux 2.6.24-28-generic i386
09:03:05.722 INFO - v2.0 [a2], with Core v2.0 [a2]
09:03:06.304 INFO - RemoteWebDriver instances should connect to:
http://192.168.1.5:4444/wd/hub
09:03:06.307 INFO - Version Jetty/5.1.x
09:03:06.311 INFO - Started
HttpContext[/selenium-server/driver,/selenium-server/driver]
09:03:06.324 INFO - Started
HttpContext[/selenium-server,/selenium-server]
09:03:06.324 INFO - Started HttpContext[/,/]
09:03:06.381 INFO - Started
org.openqa.jetty.jetty.servlet.ServletHandler@12d15a9
09:03:06.382 INFO - Started HttpContext[/wd,/wd]
09:03:06.399 INFO - Started SocketListener on 0.0.0.0:4444
09:03:06.400 INFO - Started
org.openqa.jetty.jetty.Server@228a02
I wanted to run the python script from the console and each time it would
stop here and I'd be waiting and nothing would happen.....How do I run the
script without a command prompt. So then, I'd interrupt it with 'ctrl C' to get
a "09:03:17.439 INFO - Shutting down...12:39:08.573 INFO - Stopping
Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=4444]
That "shutting down" message was odd -- how would you run a process if it
was shutting down? What the logs above dont say is "The selenium server must be
running so keep that process open. Open ANOTHER terminal window and run your
python script there". The documentation didnt explicitly mention that localhost
must keep the server running in the background-- Its one of the most basic
client-server concepts but when you are running stuff on localhost, your client
and server are one and the same. Being explicit with this trivia in the
documentation would have helped me not waste hundreds of hours searching the
selenium website and reading irrelevant blogs which google threw up, irc,
emails, etc... So, in TerminalOne,
:~/selenium-remote-control-1.0.3/selenium-server-1.0.3$ sudo java -jar
selenium-server.jar
09:03:05.618 INFO - Java: Sun Microsystems Inc. 1.6.0_0-b11
09:03:05.638 INFO - OS: Linux 2.6.24-28-generic i386
09:03:05.722 INFO - v2.0 [a2], with Core v2.0 [a2]
09:03:06.304 INFO - RemoteWebDriver instances should connect to:
http://192.168.1.5:4444/wd/hub
09:03:06.307 INFO - Version Jetty/5.1.x
09:03:06.311 INFO - Started
HttpContext[/selenium-server/driver,/selenium-server/driver]
09:03:06.324 INFO - Started
HttpContext[/selenium-server,/selenium-server]
09:03:06.324 INFO - Started HttpContext[/,/]
09:03:06.381 INFO - Started
org.openqa.jetty.jetty.servlet.ServletHandler@12d15a9
09:03:06.382 INFO - Started HttpContext[/wd,/wd]
09:03:06.399 INFO - Started SocketListener on 0.0.0.0:4444
09:03:06.400 INFO - Started org.openqa.jetty.jetty.Server@228a02
09:03:17.439 INFO - Shutting down...
mom@drga:~/selenium-remote-control-1.0.3/selenium-server-1.0.3$ sudo java -jar
selenium-server.jar
09:03:36.248 INFO - Java: Sun Microsystems Inc. 1.6.0_0-b11
09:03:36.252 INFO - OS: Linux 2.6.24-28-generic i386
09:03:36.270 INFO - v2.0 [a2], with Core v2.0 [a2]
09:03:36.486 INFO - RemoteWebDriver instances should connect to:
http://192.168.1.5:4444/wd/hub
09:03:36.489 INFO - Version Jetty/5.1.x
09:03:36.491 INFO - Started
HttpContext[/selenium-server/driver,/selenium-server/driver]
09:03:36.493 INFO - Started
HttpContext[/selenium-server,/selenium-server]
09:03:36.493 INFO - Started HttpContext[/,/]
09:03:36.523 INFO - Started
org.openqa.jetty.jetty.servlet.ServletHandler@12d15a9
09:03:36.523 INFO - Started HttpContext[/wd,/wd]
09:03:36.533 INFO - Started SocketListener on 0.0.0.0:4444
09:03:36.533 INFO - Started org.openqa.jetty.jetty.Server@228a02
09:04:30.236 INFO - Checking Resource aliases
09:04:30.260 INFO - Command request: getNewBrowserSession[*firefox,
http://localhost:4444, ] on session null
09:04:30.283 INFO - creating new remote session
09:04:30.614 INFO - Allocated session 7cba6a7dadb243618c046ee7fb6c6bc9 for
http://localhost:4444, launching...
09:04:30.778 INFO - Preparing Firefox profile...
09:04:34.676 INFO - Launching Firefox...
09:04:38.697 INFO - Got result: OK,7cba6a7dadb243618c046ee7fb6c6bc9 on session
7cba6a7dadb243618c046ee7fb6c6bc9
09:04:38.715 INFO - Command request:
open[/selenium-server/tests/html/test_click_page1.html, ] on session
7cba6a7dadb243618c046ee7fb6c6bc9
09:04:38.854 INFO - Got result: XHR ERROR: URL =
http://localhost:4444/selenium-server/tests/html/test_click_page1.html
Response_Code = 404 Error_Message = Not+found on session
7cba6a7dadb243618c046ee7fb6c6bc9
09:04:38.863 INFO - Command request: testComplete[, ] on session
7cba6a7dadb243618c046ee7fb6c6bc9
09:04:38.863 INFO - Killing Firefox...
09:04:38.933 INFO - Got result: OK on session
7cba6a7dadb243618c046ee7fb6c6bc9
09:09:28.085 INFO - Command request: getNewBrowserSession[*firefox,
http://www.irian.at, ] on session null
09:09:28.086 INFO - creating new remote session
09:09:28.088 INFO - Allocated session 97dec9f0b53545acbc9ca3624fc6cbd4 for
http://www.irian.at, launching...
09:09:28.165 INFO - Preparing Firefox profile...
09:09:31.873 INFO - Launching Firefox...
09:09:35.599 INFO - Got result: OK,97dec9f0b53545acbc9ca3624fc6cbd4 on session
97dec9f0b53545acbc9ca3624fc6cbd4
09:09:35.604 INFO - Command request:
open[http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_test.html,
] on session 97dec9f0b53545acbc9ca3624fc6cbd4
09:09:41.698 INFO - Got result: XHR ERROR: URL =
http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_...
Response_Code = 404 Error_Message = Not Found on session
97dec9f0b53545acbc9ca3624fc6cbd4
09:09:41.707 INFO - Command request: testComplete[, ] on session
97dec9f0b53545acbc9ca3624fc6cbd4
09:09:41.707 INFO - Killing Firefox...
09:09:41.740 INFO - Got result: OK on session
97dec9f0b53545acbc9ca3624fc6cbd4
10:18:38.252 INFO - Command request: getNewBrowserSession[*firefox,
http://www.google.com/, ] on session null
10:18:38.253 INFO - creating new remote session
10:18:38.254 INFO - Allocated session c4b9c7f35ea34d428b50f2f31a6181c2 for
http://www.google.com/, launching...
10:18:38.322 INFO - Preparing Firefox profile...
10:18:41.921 INFO - Launching Firefox...
10:18:45.741 INFO - Got result: OK,c4b9c7f35ea34d428b50f2f31a6181c2 on session
c4b9c7f35ea34d428b50f2f31a6181c2
10:18:45.800 INFO - Command request: open[http://www.google.com/, ] on session
c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.204 INFO - Got result: OK on session
c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.211 INFO - Command request: type[q, hello world] on session
c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.277 INFO - Got result: OK on session
c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.282 INFO - Command request: click[btnG, ] on session
c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.334 INFO - Got result: OK on session
c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.340 INFO - Command request: waitForPageToLoad[5000, ] on session
c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.359 INFO - Got result: OK on session
c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.365 INFO - Command request: getTitle[, ] on session
c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.411 INFO - Got result: OK,hello world - Google Search on session
c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.416 INFO - Command request: testComplete[, ] on session
c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.417 INFO - Killing Firefox...
10:18:48.434 INFO - Got result: OK on session
c4b9c7f35ea34d428b50f2f31a6181c2
ALL this happens on TerminalOne, so keep that window open to check for the
above while you are doing steps below.
STEP#1. In TerminalTwo, Change directory to the
'python-client' to run your scripts. Lets test the selenium.py script first.
Btw, note that your bash file must contain the PYTHONPATH for all the
directories that you run .py scripts from.
:~/selenium-remote-control-1.0.3$ ls
README.txt selenium-php-client-driver-1.0.1
selenium-dotnet-client-driver-1.0.1
selenium-python-client-driver-1.0.1
selenium-java-client-driver-1.0.1 selenium-ruby-client-driver-1.0.1
selenium-perl-client-driver-1.0.1 selenium-server-1.0.3
:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ python
selenium.py
If it returns silently (read, No errors), it means your selenium server is
working.
STEP#2. Try testing another script, test_google.py
or test_default_server.py
:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ ls
doc test_ajax_jsf.py test_google.py~
selenium.py test_ajax_jsf.pyc test_google.pyc
selenium.pyc
test_default_server.py test_i18n.py
selenium_test_suite_headless.py test_default_server.pyc
test_i18n.pyc
selenium_test_suite.py test_google.py
:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ python
test_default_server.py
Using selenium server at localhost:4444
E
======================================================================
ERROR: testLinks (__main__.TestDefaultServer)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_default_server.py", line 36, in testLinks
selenium.open("/selenium-server/tests/html/test_click_page1.html")
File
"/home/me/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1/selenium.py",
line 764, in open
self.do_command("open", [url,])
File
"/home/me/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1/selenium.py",
line 215, in do_command
raise Exception, data
Exception: XHR ERROR: URL =
http://localhost:4444/selenium-server/tests/html/test_click_page1.html
Response_Code = 404 Error_Message = Not+found
----------------------------------------------------------------------
Ran 1 test in 8.852s
FAILED (errors=1)
:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ python
test_ajax_jsf.py
Using selenium server at localhost:4444
E
======================================================================
ERROR: testKeyPress (__main__.TestAjaxJSF)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_ajax_jsf.py", line 39, in testKeyPress
selenium.open("http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_test.html")
File
"/home/me/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1/selenium.py",
line 764, in open
self.do_command("open", [url,])
File
"/home/me/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1/selenium.py",
line 215, in do_command
raise Exception, data
Exception: XHR ERROR: URL =
http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_...
Response_Code = 404 Error_Message = Not Found
----------------------------------------------------------------------
Ran 1 test in 13.663s
FAILED (errors=1)
:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ python
test_google.py
.
----------------------------------------------------------------------
Ran 1 test in 10.190s
OK
When you are running the above scripts you would see Selenium
throw a browser with messages but this is too fast and disappears. In the
second terminal, run your scripts from the directory you've stored
them in.

sgx535 drivers in today's Meego kernel tree: 3 (GMA600, CE4100, N900)
sgx535 drivers submitted upstream: 1 (Tungsten GMA500 driver, submitted March 2009, rejected due to significant chunks of functionality there purely to support closed userspace)
To be fair, the rest of the Moorestown support code seems to be shaping up fairly nicely. But the lack of a coherent story about what graphics support is going to look like isn't hugely reassuring.


[PHORONIX] Baru saja mengumumkan kabar baik mengenai GPU Intel, terutama i8xx. Seperti yang kita ketahui bersama, Lucid "dianugerahi" dengan galat pada driver GPU Intel. Hal ini karena memang Intel sedang merestrukturisasi driver-nya. Dimulai dengan penggabungan driver -i910 dan -i810 menjadi satu -intel. Lalu kemudian, Intel berusaha mengembangkan GEM/UXA untuk mendukung KMS. Sayangnya, hal ini menyebabkan regresi terhadap GPU lama seperti seri i8xx.
Baru kemarin [PHORONIX] memberitakan bahwa pengembang Ubuntu menambal driver mereka dengan versi lama. Saya sudah mencobanya dan memang sistem menjadi stabil. Silakan kunjungi [RAOF] untuk info lebih lanjut. Intinya, berikut yang dapat dilakukan.
$ sudo add-apt-repository ppa:raof/aubergine
$ sudo apt-get update
$ sudo apt-get dist-upgrade
Ya, ada beberapa langkah yang dilewati, seperti misalnya mengimpor kunci. Tapi, intinya, driver Intel akan ditatar.
Referensi:
[PHORONIX] Phoronix. http://www.phoronix.com/scan.php?page=news_item&px=ODQzMQ
[UBUNTU] Ubuntu Mailing https://lists.ubuntu.com/archives/ubuntu-x/2010-July/000905.html
[RAOF] https://edge.launchpad.net/~raof/+archive/aubergine

And now it is back to normal, doing its job well and I am a happy man. In a retrospection:
keyword : mountall: plymouth command failed, ubuntu wifi adhoc server.

So I was hit by this brasero bug. No way to burn a CD on any of my Lucid computers. gnomebaker is not working either. Hmm.
If found a workaround in andrew.46′s tutorial on ubuntuforums:
$ sudo cdrdao scanbus Cdrdao version 1.2.2 - (C) Andreas Mueller <andreas@daneb.de> SCSI interface library - (C) Joerg Schilling Paranoia DAE library - (C) Monty Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables. Using libscg version 'ubuntu-0.8ubuntu1' 0,1,0 : PIONEER , DVD-RW DVR-K16RS, 1.35
Please read Andrew’s tutorial for the details.
/etc/cdrdao.conf file$ sudo touch /etc/cdrdao.conf
#---- cdrdao.conf ----# write_buffers: 128 write_device: "0,1,0" write_driver: "generic-mmc" read_device: "0,1,0" read_driver: "generic-mmc" read_paranoia_mode: 3 write_speed: 8
The write_device and read_device lines should match your own drive(s) specification(s). I only have one. The other parameters are explained in Adrew’s post.
$ sudo cdrdao copy
When necessary, cdrdao will prompt you to remove the original CD and insert a blank one in the drive.
I do not know when this bug will be fixed, when the appropriate packages will hit the repositories, but in the mean time, I’m not left without any burning option.. Many thanks Andrew :)
Howto: Duplicate Audio CDs using cdrdao

So I was hit by this brasero bug. No way to burn a CD on any of my Lucid computers. gnomebaker is not working either. Hmm.
If found a workaround in andrew.46′s tutorial on ubuntuforums:
$ sudo cdrdao scanbus Cdrdao version 1.2.2 - (C) Andreas Mueller <andreas@daneb.de> SCSI interface library - (C) Joerg Schilling Paranoia DAE library - (C) Monty Check http://cdrdao.sourceforge.net/drives.html#dt for current driver tables. Using libscg version 'ubuntu-0.8ubuntu1' 0,1,0 : PIONEER , DVD-RW DVR-K16RS, 1.35
Please read Andrew’s tutorial for the details.
/etc/cdrdao.conf file$ sudo touch /etc/cdrdao.conf
#---- cdrdao.conf ----# write_buffers: 128 write_device: "0,1,0" write_driver: "generic-mmc" read_device: "0,1,0" read_driver: "generic-mmc" read_paranoia_mode: 3 write_speed: 8
The write_device and read_device lines should match your own drive(s) specification(s). I only have one. The other parameters are explained in Adrew’s post.
$ sudo cdrdao copy
When necessary, cdrdao will prompt you to remove the original CD and insert a blank one in the drive.
I do not know when this bug will be fixed, when the appropriate packages will hit the repositories, but in the mean time, I’m not left without any burning option.. Many thanks Andrew :)
Howto: Duplicate Audio CDs using cdrdao

Meego 1.0 was released last month. Predictably enough, it lacks any form of support for the GMA500 graphics chipset[1], which is reasonably in line with Intel's placing of US15W as an embedded product for MID-type devices rather than having anything to do with netbooks. Of course, the market pretty much ignored that detail, so we're left with the release of a netbook experience that's incompatible with a large number of netbooks.
There's been hints that there might be some sort of new driver coming, though, and Intel's rapidly heading towards the release of Moorestown - their new MID platform that's x86 but not a PC, that replaces Poulsbo (unless you want to run Windows) and which has the same SGX 3D core[2] as Poulsbo. Moorestown support has started landing in the mainline Linux kernel and Intel are talking about devices shipping with it this year, so we ought to see the graphics driver soon, right?
Well, kind of. Digging through the Meego kernel git tree reveals an updated driver with Moorestown support. The blob is too big for gitorious to display, so I've put up a copy here. Things to note - this isn't a new driver (it's clearly derived from the PSB one), it includes a huge blob of Imagination's platform-independent code, the front end of the driver is still pretty much the i915 driver with a small number of PSB-specfic changes and despite the cheerily optimistic "Patch-mainline: 2.6.35?" at the top it stands pretty much no chance whatsoever of going mainline given that it's even more offensive than the previous version and that one got rejected out of hand.
So it's not clear what Intel's doing here. If this is the driver that Intel are developing for upstream then there's been a pretty serious breakdown in communication over what their driver has to look like. If it's not, Intel have another and presumably better driver somewhere that they're developing entirely behind closed doors despite having shipped millions of units of hardware that people would dearly love to be able to run mainline kernels on. Neither case looks especially good, so the continuing perception would seem to be that only a subset of the company understands the Linux development model - we'll see how this ends up interacting with Meego as a whole.
(Huh. I was about to hit "Post" on this, and then found that another and entirely different driver was submitted for the Meego kernel last week. A copy of it's here. "IVI" in this context appears to stand for "In-vehicle interface" and is aimed at those contexts rather than generic ones. It includes much the same Imagination glue code as the Moorestown driver, appears to be derived from a driver that has support for other Intel chipsets, was written to be at least partially OS-independent given that it abstracts things like PCI and stands even less chance of going upstream than the other driver - as acknowledged by "Patch-mainline: Never". Hilariously, if we include IEGD, that makes three different drivers for the same hardware from the same company, each having no chance to go upstream. Thintel.)
[1] Weirdly, it includes the kernel DRM for Matrox cards. No X driver though.
[2] It's clocked higher, though

Part of the problem that we face in providing Linux hardware support is that we're lucky if there's a spec, and even if there's a spec there almost certainly isn't a test suite. Linux still isn't high on the list of things that vendors test with, so as a result hardware and firmware tend to be written to work with Windows rather than some more ideal notion of what a spec actually says.
This can lead to all kinds of problems. If the spec says we can do something and Windows never does that, we'll often find that there's at least one piece of hardware out there somewhere that breaks in response. But sometimes there'll be several different workarounds, and picking the wrong one may break some other system instead. It's helpful to know what Windows is actually doing, if only because that's the only configuration most systems have been tested with.
The problem is that doing this at the hardware level is next to impossible. I'm sure there are people out there who salivate at the possibility of working out i8042 initialisation sequences by hooking up oscilloscopes to their mouse, but I'm not one of them. There's a much easier alternative involving qemu.
The qemu source base is reasonably large and complex, but that's ok - we don't need to care about most of it. For our purposes we really only want to trace accesses to given bits of hardware. There's three main types of hardware access we're likely to care about: io ports, memory mapped io and pci configuration space. io ports are easy. Each piece of qemu that performs hardware emulation will call register_ioport_read or register_ioport_write. Just grep for those, find the ports that correspond to your hardware and then edit the functions to dump the information you want. PCI configuration space will be handled via pci_default_read_config or pci_default_write_config unless the driver overrides them. Finally, for PCI devices mmio will be handled via pci_register_bar - the last argument is the function called when the memory region is accessed.
All of which makes it pretty easy to watch register reads and writes performed by Windows when it's starting up. Suspend/resume is also an interesting problem, but sadly one that's harder to work with. First of all, you need at least version 0.6c of vgabios in order to indicate to Windows that it's possible to suspend at all. Secondly, for Vista or later you'll also need a WDDM driver for the graphics. Sadly there isn't one for the Cirrus that qemu emulates, which is unsurprising given how ancient it is. So I've had to perform my testing under XP, which was enough to give me an indication as to what Windows does with the SCI_EN bit on resume (answer: Ignores both the bit of the spec that says it should already be enabled and the bit of the spec that says it should never be written by hand). Nice, but if someone would like to write a WDDM driver for Cirrus it'd make my life easier.
The other thing I've been testing is keyboard controller probing. Some Macs deal badly with you banging on the keyboard controller, which is dumb but on the other hand they don't claim to have one. Linux will look at your ACPI tables and use any keyboard controllers it finds there, but if there isn't one it'll go on to try probing the legacy locations. Adding some debug code to the read and write functions of the keyboard driver in qemu and then editing the DSDT in Seabios to remove the declarations for the keyboard showed that Windows will only probe if there's a device with a recognised keyboard PNP ID. No keyboard for you if that's missing. So we probably need to emulate that behaviour as well.
The main reason to do this work is to try to reduce the number of DMI tables in the kernel. These are cases where we alter the kernel's behaviour based on the identity string of the hardware, allowing us to work around functional differences. The problem with this approach is that Windows generally works fine on these machines without knowing anything special about them, and chances are that the tables aren't exhaustive - there may well be some other piece of hardware that's also broken, but the user just gave up and went back to Windows instead of ever letting us know. Using qemu to work out how Windows actually behaves gives us the opportunity to fix things up in a way that will (with luck) work on all machines.

When comparing operating systems people tend to roll out the same old reasons every time. I think those of us who use Ubuntu are already aware that we have less viruses than Windows, less malware, it’s free of cost and so on. I’m sure we’ve pointed out plenty of times that you’re legally entitled to copy the CD and even create your own remix.
However I wanted to look at some of the things I’ve done recently on Ubuntu that under Windows would be costly, difficult or impossible. So without further ado here’s my:-
Snappy title huh?
Hardware support is better than you think
In the last year I have added the following hardware devices to my system and they were all fully supported out of the box with zero driver installations, no reboots, no 3rd party downloads. Truly plug and play.
Of course it’s not perfect, there are still some hardware manufacturers who fail to support Ubuntu, but the point stands, it’s better than most people think. Your mileage may vary, I don’t doubt that, but this is my blog outlining my experience.
Access more than 4GiB RAM on a 32-bit install out of the box
Many 32-bit operating systems including Windows XP, Vista and 7 support a maximum of around 3GiB RAM. With Ubuntu 9.10 the 32-bit install detects how much RAM the machine has and if it’s more than 3GiB you should get a ‘PAE-enabled’ Linux kernel. With no additional work required on your part, you get access to all the RAM in your PC. So you don’t have to switch to 64-bit Ubuntu if you don’t want to, and still access all your RAM. If you’re already running Ubuntu and you upgrade your RAM you can just manually install the above named kernel to get access to all that lovely memory. Om nom nom.
Easily create a bootable, functional operating system on a USB stick
Ubuntu ships with “USB Live USB Creator” which takes an ISO image and creates a bootable USB stick from it. Simply download an Ubuntu ISO image from http://ubuntu.com/download and start the USB creator application on Ubuntu from System -> Administration -> USB Creator.
Tell USB creator where the ISO image is, and it can prepare and write the contents of the ISO image a USB stick of at least 1GB in size. If you have a CD already and not an ISO image then you can use mkisofs to make an ISO image, and then make a USB stick from that, which will save a 700MiB download.
Find out where each file comes from
The typical desktop PC has many thousands of files on the boot disk. Much of this will be your own data in your home directory, but there’s a lot that’s required by the system to boot up and function. Sometimes you might want to know where a file came from.
It may be that you’re a curious user, wanting to know how things got onto your machine, or perhaps you’re diagnosing a problem with an Ubuntu installation. Either way it’s trivially easy to find out where files came from – if you stick to installing packages either from repositories or manually downloaded .deb files.
For example I might be diagnosing a problem with my system – maybe a program is eating CPU – and I want to know where the culprit came from. Knowing which package the process lives in is a good way to find out why you have it (because the name and package documentation may describe it well enough). Also if I wanted to file a bug against that program, I’d need to know what package it’s in. Lets say in this example that my system is sluggish. I might use the System Monitor to identify the process eating up CPU time.

Note: In the above screenshot Skype happens to be idle, but this is how I might discover the process name if it was chewing up my CPU.
I can use the command line to discover where that file is located on the file system using the which command:-
$ which skype
/usr/bin/skype
I can then use the dpkg command to find out which package installed this program:-
$ dpkg -S /usr/bin/skype
skype: /usr/bin/skype
We can even combine the two commands:-
$ dpkg -S `which skype`
skype: /usr/bin/skype
So this tells us that the ’skype’ package installed the ‘/usr/bin/skype’ program. Not surprising really, but you get the idea. Also worth knowing is dpkg -L which lists all files installed by a package.
Email me when system updates are available
I have an Ubuntu PC behind my TV which I use to watch streamed video via Boxee. More often than not the TV is switched off, and when it’s on it’s showing the Boxee user interface and not the Ubuntu desktop. So I don’t tend to see any update notifications – in fact I don’t want to see them – especially if I’m watching telly.
I’d like to know when there are updates pending on that system, so I have configured it to send me an email when there are updates available. Installing a package called apticron. Just edit /etc/apticron/apticron.conf and maintain the “EMAIL” setting, placing your own email address in the quotes, and remove the # from the start of the line:-
EMAIL="alan@example.com"
Then wait. Each day apticron will run and you’ll get an email telling you what packages need updating.
root@revo1 to me
show details 9 Mar (2 days ago)
apticron report [Tue, 09 Mar 2010 21:12:09 +0000]
========================================================================
apticron has detected that some packages need upgrading on:
revo1
[ 127.0.0.1 127.0.1.1 10.10.10.124 ]
The following packages are currently pending an upgrade:
gnome-screensaver 2.28.0-0ubuntu3.5
micromiser-beta 2.1.2-0karmic1
========================================================================
Package Details:
Reading changelogs...
--- Changes for gnome-screensaver ---
gnome-screensaver (2.28.0-0ubuntu3.5) karmic-security; urgency=low
* SECURITY UPDATE: information disclosure via monitor hot-plugging
- debian/patches/11_CVE-2010-0285.patch: make sure to show windows that
are added in src/gs-manager.c.
- CVE-2010-0285
* SECURITY UPDATE: locked screen bypass via monitor hot-plugging
- debian/patches/12_CVE-2010-0422.patch: improve window handling logic
in src/{gs-grab-x11.c,gs-manager.c,gs-window-x11.c}.
- CVE-2010-0422
-- Marc Deslauriers Tue, 02 Mar 2010 16:48:56 -0500
--- Changes for micromiser-beta ---
micromiser-beta (2.1.2-0karmic1) unstable; urgency=low
* Initial release
-- btbuilder Thu, 04 Mar 2010 19:18:06 -0500
========================================================================
You can perform the upgrade by issuing the command:
aptitude full-upgrade
as root on revo1
--
apticron
Note: You may need to some basic configuration of the mail system on the machine sending the mail. The default mail transfer agent is ‘postfix’ and it can be configured with:-
sudo dpkg-reconfigure postfix
Once that is done you can look forward to receiving mail whenever your system needs to be updated with details of the updates required.
Go from blank disk to fully installed in under an hour
On most moderate hardware these days a standard installation of Ubuntu takes around half an hour. Getting all the apps you need for daily use might take a little longer. However if you take note of what apps you use regularly the additional applications can be installed pretty quickly, and in one big hit.
Whenever I’m installing Ubuntu 9.10 whether for myself or friends, there’s a set of things I tend to do post-install that rarely changes from one machine to another. This usually consists of installing audio/video codecs, fonts, updated video driver, flash, java and a few other bits and pieces. Some of that comes from the standard Ubuntu repositories, and some from 3rd party repositories or PPAs. Once the installation of Ubuntu is complete and all updates have been installed there’s just a few lines to paste in and then I leave it to run for a while.
# Add repo for Lifesaver screensaver
sudo add-apt-repository ppa:cmsj/lifesaver
# Add repo for chromium daily build
sudo add-apt-repository ppa:chromium-daily/ppa
# Update local package lists
sudo apt-get update
# Install all the stuff!
sudo apt-get install ubuntu-restricted-extras \ # Installs flash, codecs, java, fonts
chromium-browser \ # Installs daily build of Chromium
lifesaver \ # Install lifesaver screensaver
gtk-recordmydesktop \ # Install app for recording screencasts
gnome-do \ # Install Gnome-Do
vlc \ # Install VLC media player
openssh-server \ # Install SSH server for remote access
smbfs \ # Install samba client for accessing Windows shares
gwibber # Install microblogging client
Building a list like this can significantly reduce the amount of time taken to get up and running with Ubuntu. What’s especially cool about this is there is no need to visit any third party websites or download external installers. Those applications listed above are the ones I use regularly, you will have your own set of “must have” packages. What are they?
Move a hard disk
Ubuntu has no direct equivalent to “Windows Genuine Advantage” fortunately. This is the tool that seeks to reinforce the Microsoft End User License Agreement for Windows users by causing havoc when system hardware changes. Windows also has quite a fit when you move a hard disk from one system to another as it detects and installs new drivers for all the newly found devices.
Ubuntu does most of its hardware detection automatically at each and every boot-up with no user interaction. As a result you can take a hard disk containing a standard install of Ubuntu from one system and put it in another and expect it to work without much effort. The only time I have had an issue is when I have made some manual configuration changes for the specific hardware in the computer.
For example if you have installed and enabled the nVidia binary driver and configured it in /etc/X11/xorg.conf and the target computer doesn’t have an nVidia graphics card then it might fail to start the graphical environment due to it being forced to load the ‘wrong’ driver. In this instance probably the easiest thing to do is backup and remove the /etc/X11/xorg.conf and restart the machine. At that point it will automatically detect the video hardware and should work much the same as a standard install.
Compiling and packaging applications for older OS releases
With the 6-month release cycle some people can feel left behind if they don’t upgrade to the next release promptly. Ubuntu has a Long Term Support (LTS) release every two years to cater for many users who wish to stay with one stable release. Ubuntu 6.06, 8.04 and the upcoming 10.04 are all LTS releases, with all other releases being non-LTS.
There will always be some users who are not on an LTS release, but have still chosen to stick with their currently working system rather than upgrade. There is nothing wrong with this approach, but it can lead to users wanting a newer version of a package to be ‘backported’ to their release of Ubuntu, whilst the rest of the development community have moved on. There are developers who backport applications from newer releases to older ones, but they don’t backport everything, and there is a finite resource of developers available to do this task. The good news is that with a little time and effort, you can do this yourself.
I recently had a friend who was using Ubuntu 9.04 with an nVidia graphics card using the driver supplied, but he wanted to try the newer driver from Ubuntu 9.10. It’s generally not recommended to take a package built for one version of Ubuntu and just install it on an older release. It may work, but there’s no guarantee, and it can break the system in unpredictable and catastrophic ways.
So I took the ’source’ code from Ubuntu 9.10 and used the tools provided in Ubuntu to rebuild the driver for 9.04. This was a trivial thing to do. The really cool thing is that I’m running Ubuntu 9.10 64-bit and was able to build the driver for Ubuntu 9.04 64-bit on my local PC. Once I was confident that it worked I uploaded it to my launchpad Personal Package Archive (PPA) where it was built for Ubuntu 9.04 32-bit and 64-bit architectures.
So not only was I able to backport a driver to an older release, but I also built it for an architecture that I don’t even run myself. The observant among you may have noticed that the package I built is not open source – the nVidia driver is proprietary code. Yet I was still able to take the packagable parts and in only a matter of minutes have it rebuilt for another release.
All the commands I used (dch, debuild, pbuilder-dist, dput) are well documented tools for managing, building and uploading Debian packages (.debs) and their contents, and of course, they’re all freely available in the Ubuntu repositories. The Ubuntu Masters of The Universe (MOTU) are a helpful bunch and their pages can be found at https://wiki.ubuntu.com/MOTU and on irc in #ubuntu-motu.
Fixing a bug
Whilst it’s easy to dismiss this as an advantage only if you’re a coder, let me first say that I’m not a developer at all. I can just about read someone elses very simple code with some help and google, but I don’t really ever write anything myself. So if I can fix a bug, anyone can!
I recently discovered a very simple bug in the ifdata command which I filed in launchpad – the Ubuntu bug tracker . With a little help from some of the Ubuntu developers – who were keen to help me – I was able to create a patch, test it and submit it to Ubuntu and upstream to Debian. The critical step that really made me consider even trying to look at this bug was that the source was available and easily installable. I was able to identify the package containing the buggy command:-
$ dpkg -S `which ifdata`
moreutils: /usr/bin/ifdata
Once I knew the package name I could download and unpack the source code for that package very easily with one simple command:-
$ apt-get source moreutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
NOTICE: 'moreutils' packaging is maintained in the 'Git' version control system at:
git://git.kitenet.net/moreutils
Need to get 37.8kB of source archives.
Get: 1 http://gb.archive.ubuntu.com karmic/universe moreutils 0.35 (dsc) [822B]
Get: 2 http://gb.archive.ubuntu.com karmic/universe moreutils 0.35 (tar) [37.0kB]
Fetched 37.8kB in 0s (191kB/s)
gpgv: Signature made Tue 05 May 2009 20:19:33 BST using DSA key ID 788A3F4C
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./moreutils_0.35.dsc
dpkg-source: info: extracting moreutils in moreutils-0.35
dpkg-source: info: unpacking moreutils_0.35.tar.gz
The tricky part for me is then actually finding the incorrect code in the program. With a lot of help from a good friend and after asking on-line I was able to create a patch. I tested my patch and submitted it to the developers for review. That process is all well documented and I was supported through the process by Ubuntu developers.
All in all it took me a few hours to get this done, spread over a week or so. Not a massive investment of time, and I’ll certainly be quicker next time, now I have learned how to handle bugs like this. Plus I now have a better understanding of the packaging system which helps me with other great things.
Re-install the OS and Applications without losing your data
A default installation of Ubuntu wil place all the operating system files and user data in one partition on the disk called the ‘root partition’ or /, and a second partition for swap. Many users like separating their OS/apps from their user data, so they create a separate partition for /home. This is useful for a number of reasons including allowing you to reinstall the OS on the root partition without touching your data in the /home partition. One little-known feature of the installer on the Live Ubuntu CD is that you can do this – reinstall the OS and not wipe your data – even if you dont have separate partitions for / and /home.
Ok, so you want to reinstall the OS but keep your data in /home. Perhaps you want to upgrade but prefer a clean install, or maybe you’ve played with the system a bit too much and it’s become damaged, and you’d like to quickly ‘reset’ everything with a reinstall. Simply boot from the Live CD and run the installer. When you get to the partitioning step, choose ‘manual partitioning’ which takes you to the more advanced partitioning tool. Select your root partition for installation but don’t tick the “format” checkbox. Continue with the installer as normal.
The installer will recursively delete all files (except those in /home) before copying the new install files onto the disk. Create the same first username during the installer and it will re-use the /home/username folder as your home directory, with all your files intact.
Note: Some user data files (such as mysql databases which are in /var) may be stored in other folders than /home, so you will probably want to back the system up before hand in case there are any files you need to recover.
So those are 10 things I do with Ubuntu that I’d have a hard time doing on Windows. It’s arguable whether you’d need to be able to do some of this stuff, and that I accept.
I realise that there are Windows-based tools that can replicate/emulate some of these tasks, or maybe Windows Vista or 7 can do some of the above tasks. I kinda stopped bothering with Windows after XP, so my knowledge may be lacking. Feel free to correct me in the comments, or suggest what you can’t live without.