Category Archives: nerd

Weekly Head Voices #8: Uninterruptible Fun Supply

Dear readers,

Due to a small accident with a friend’s quantum entanglement device, I briefly got stuck in a high pressure reality vortex. The headaches have subsided, but I do still seem to be suffering from slight time compression artifacts. In any case, that’s why there’s only this one edition of the Weekly Head Voices to cover weeks 43 to 45. As is always the case, please make use of the bolded phrases to guide you through this post. In other words, the fat words tell you what you you might find interesting so that you can skip the rest.

Week 43 was for a large part about re-learning a lesson that I’ve learned and forgotten more times than I care to count, but it was mostly about joining Superbly Cool Extraordinarily Lovely People (hi there y’all!) and going here:

YouTube Preview Image HEAD ASPLODE!

Now how about that lesson? Let’s go:

On the Importance of Not Getting Interrupted.

During these past weeks I’ve been hard at work completing a mini-thesis (some call it a teaching portfolio) documenting my teaching activities, meaning that I had to spend a significant amount of Contiguous Time(tm) producing a significant body of text. In order to supplement the scarce supply of said Contiguous Time, I spent two mornings working at home. Furthermore, I for some or other vague reason decided not to check email before I started early in the morning and of course also not to keep my e-mail client running whilst working.

My word, what a difference!

Who woulda thunk it, it turns out that that habitual and reflexive email checking really breaks one’s speed and, in my case, causes unnecessary stress as each time the inbox piles up with even more remotely injected work. Bottom line: I’m going back (for the umpteenth time) to 3 fixed email checks and inbox emptying sessions per day: one before the early morning daily review, one just after lunch when my brain is too busy coping with digestion anyway and one in the late afternoon.

Operating Systems all-you-can-eat Buffet

During wind-down time in these past three weeks, I installed and tried out the following operating systems:

  • Moblin 2.1 preview on my netbook: Oh my it boots really fast and is very pretty. It would take some getting used to, my experience was too much mobile internet device and too little computer.
  • OSX 10.5.7 on my Q9450 quad-core: First: No, I have no idea how that got there! Second: Meh. Looks nice, not my thing though. Third: Eventually I’m going to port DeVIDE to OSX, when either wxCocoa or pySide is ready. I’m only doing this for my goateed, turtle-necked and beret-wearing apologist friends and definitely not for the OS or the company behind it.
  • Ubuntu 9.10 Netbook Remix on my, err, netbook: My jotted down thoughts at the time: Very slick, clutter interface (including maximus) is great for netbooks. It seems the ath9k wlan adapter still has minor problems connecting / staying connected at full speed.
  • Windows 7 on my netbook: Yes, the TU does in fact give us all licenses for this type of stuff, it’s a cool perk. Wow, it went on there quite easily, I simply ran “setup.exe” from the unpacked ISO and installed it to an extra 70G partition. After installing the usual suspects (truecrypt, 7zip, avira, vim, asus stuff [Super Hybrid Engine, Hotkey, Asus Update, Touchpad driver], fastcopy, chrome), I was up and running. Looooong battery life seems to be intact.

The End, My Friend

In week 44 a number of us went to defend the whole TU Delft Computer Science research programme at an international research evaluation. Besides leading to my recent PowerPoint post, this occasion surprisingly turned out to be great fun (probably thanks to the 5-star evaluation committee and their interviewing style) and we seem to have done quite well in the evaluation.

Preparing for the evaluation and finishing my teaching portfolio took up much of my time, so much so that I have not been giving the people around me all the time and attention that they deserve. People around me, I am acutely aware of this and I will make it up to you!

Your GMail account CAN be hacked over insecure WiFi

Today The Next Web posted an episode of BBC Watchdog where it was demonstrated how a GMail account was hacked through insecure (WEP) WiFi.

https_gmail_url

For those of you still wondering, I’d like to confirm that it is indeed possible to hack a GMail account over insecure WiFi: GMail does indeed always send your password through secure HTTP (SSL) so that this can’t be directly hacked, BUT, by default, the rest of your session happens through normal clear-text HTTP.  The Watchdog episode of course gives absolutely no technical details, but it’s most probably the “sidejacking” attack first published by Robert Graham, where the attacker reads the cookies of the post-authentication HTTP traffic and uses them to fool GMail into thinking that they are in fact the legitimate owners attacked GMail account.  This attack works on other webmail and -service providers too.

In short, if you EVER use a network connection that you don’t trust, simply change the “http:” in your URL bar to “https:”, or, even better, change your browser connection to “Always use https” on the GMail Settings – General page.   With both of these solutions, the whole connection will use secure HTTPS (SSL), and cookies can’t be sidejacked.

The drawback of the secure setting is that your GMail access will be slightly slower than usual:  The encryption costs more compute time at both ends, and the transmission of data is slightly less efficient.

Python 2.6 enabled VTK 5.4 Windows binaries

You can always check my Latest VTK Windows binaries page to make sure you have the latest blog posting and hence the latest binaries.  It also links to the “old” Python 2.5 VTK 5.4.1 binaries.

I’ve made available my home-baked VTK 5.4.2 Windows binaries.  These have the new-and-improved version of my python-exception-patches integrated (more about this in a future post; a serious dead-lock has been fixed and as a side-effect, you can now run multiple VTK pipelines in different threads!) and have been built with Visual Studio 2008 (9.0) SP1 on Windows XP SP3 with full Python 2.6 support.  Get the binaries (or my patched source) from the two links below.  You want the binaries if you want to use VTK from Python.

IMPORTANT: you might have to install the MS VS2008 SP1 vcredist_x86 package (free!) if you want to use these DLLs (thanks Jelle for pointing this out).  This might not be necessary if you already have one or more of the MS development environments installed.

Please leave a comment on this blog posting if you use these or just hate them. It’s almost like postcard-ware, but with blog comments. Please also link to this page and not directly to the download location, thanks!

To use this from Python, you need to add the following to your PATH:

  • d:\opt\VTK\bin

You also need to add all of the above to PYTHONPATH, as well as the following:

  • d:\opt\VTK\lib\site-packages

… where d:\opt is the drive and directory where you unpacked the ZIP file.

Once you’ve done this and logged out and in again, “import vtk” should work at the Python prompt. Shameless plug: you can use my free envedit software to do the environment editing. It beats the default XP editing thingy.

Python 2.5 enabled VTK 5.4 Windows binaries

You can always check my Latest VTK Windows binaries page to make sure you have the latest blog posting and hence the latest binaries.

I’ve made available my home-baked VTK 5.4 (actually build from a CVS VTK-5-4-1 tag checkout) Windows binaries.  These have the new-and-improved version of my python-exception-patches integrated (more about this in a future post; a serious dead-lock has been fixed and as a side-effect, you can now run multiple VTK pipelines in different threads!) and have been built with Visual Studio 2005 (8.0) SP1 on Windows XP2 with full Python 2.5 support.  Get the binaries (or my patched source) by going here.  You want the binaries if you want to use VTK from Python.

IMPORTANT: you might have to install the MS VS2005 vcredist_x86 package (free!) if you want to use these DLLs (thanks Jelle for pointing this out).  This might not be necessary if you already have one or more of the MS development environments installed.

Please leave a comment on this blog posting if you use these or just hate them. It’s almost like postcard-ware, but with blog comments. Please also link to this page and not directly to the download location, thanks!

To use this from Python, you need to add the following to your PATH:

  • d:\opt\VTK\bin

You also need to add all of the above to PYTHONPATH, as well as the following:

  • d:\opt\VTK\lib\site-packages

… where d:\opt is the drive and directory where you unpacked the ZIP file.

Once you’ve done this and logged out and in again, “import vtk” should work at the Python prompt. Shameless plug: you can use my free envedit software to do the environment editing. It beats the default XP editing thingy.

a critical look at ubuntu feisty beta on an hp nc8430 laptop

I’ve been running Linux since 1993 (kernel 0.99-pl13 if I remember correctly) on most of my workstations and servers. I’ve had my idiot-zealot phase (“nothing but Linux is good enough”), but fortunately have left that far behind me. Now I like teasing idiot-zealots with comments about that shareware Loonix thing.

So for the past few laptops, I’ve been running Windows XP, mostly because this Just Works(tm) on modern laptop hardware. Linux really didn’t cut it when compared to XP: yes, you could install it without too much trouble, but getting 100% out of your laptop (suspend/resume, good power management, full support for modern GPUs, etc) is a different story.

Because XP is getting more scary by the day (WGA things, licensing issues) and Vista promises to be even more scary (binding itself to your motherboard) and because I’ve been hearing many good things about Ubuntu Feisty (the soon-to-be-released 7.04), I decided to give this a shot on my HP NC8430 laptop (Core Duo 2GHz, ATI X1600, 2G RAM, etc.). Initially I was determined to do this like a “normal” user, i.e. no tweaking config files and especially no script writing. I wanted to see how far your average user could get with a state of the art Linux installation on a laptop.

Installation

This was quite impressive: I defragmented my NTFS filesystem, booted from the Ubuntu Feisty live CD and did the install. Without getting all cocky about it, the installer resized my NTFS partition, created a new EXT3 partition and installed itself. Colour me impressed.

General configuration

After the first boot, I was greeted with a VESA-driven x.org and an incorrect resolution. My laptop screen supports 1680 x 1050. The Gnome Preferences | Screen Resolution applet couldn’t go higher than 1280 x 1024. I had to break my first rule and edit the x.org configuration file to add the higher resolution. Why is this still necessary? A novice user shouldn’t need to have to do this!

I also installed the Ubuntu packaged fglrx ATI drivers with the Synaptic package management software, as I depend on good 3D graphics support for my work. The new Restricted Driver Manager helps one to complete this configuration in a user-friendly fashion.

By running “aticonfig –set-powerstate 1″, the GPU can be set to a lower-power mode, leading to a cooler-running laptop, meaning the fans don’t spin up as often. This command can be added to the gnome startup by adding it to System | Preferences | Sessions. With “aticonfig –lsp” one can query the available powerstates. One can only change the powerstate if a single display is active.

I removed “quiet” (but left “splash”) from the GRUB config for the default kernel in order to be able to see boot-up messages. These are helpful, especially when things take longer than they should.

Wireless networking support

This is the part that really impressed me: With Ubuntu 6.10 (Edgy Eft), I had to jump through all kinds of very user-unfriendly hoops to connect to my WPA wireless network. Feisty Beta simply popped up a pretty dialog box showing me the detected wireless networks and prompted me for the network key when I selected my WPA access point. I was online… colour me even more impressed!

Power management

This is when my jaw dropped ever so slightly (I’ll get to the “critical” part of this look a bit later): I selected suspend to RAM, which the laptop promptly did. When I pressed the power button to resume, I expected the typical black-screen-crashed-laptop syndrome. Instead, my desktop came back and I could continue working. This is a quantum leap in user-friendly Linux!

However, I soon saw that at every third resume (on average) all my keyboards would be dead.

It turns out something similar to this bug applies to my laptop. By adding the necessary suspend/resume hooks as documented in the bug report (so that the i8042 module is removed before suspend and re-installed after resume), the problem seems to have been solved.

Often after resume, my laptop gets stuck in the text console. I have to switch manually to X with Alt-F7. Another suspend/resume glitch is that the CPU Frequency Scaling Monitor gnome applet is stuck on 2GHz for my second core, although the core is running at half that most of the time. In general, things get a bit flaky after resume; often I need to restart X to get back to normal. I could potentially deal with this.

Another disappointing issue is the terrible battery life under Ubuntu Feisty. On Windows, I get more than 4 hours of battery life with average use (wireless network, web browsing, text editing). With Feisty, even after enabling LAPTOP_MODE in /etc/default/acpi-support and putting the GPU in low-power mode as explained above, I get only 2 hours and 40 minutes. This is almost a show stopper.

Out of the box ACPI monitoring support is well-done. With just a few clicks, I could various temperatures and fan speeds on my panel. See the panel at the top of the screen in the screenshot below:

 

This also shows the Deskbar applet in action.

Dynamic multi-monitor support SUCKS

My laptop has a docking station with an external LCD monitor, resolution 1280 x 1024. The laptop is 1680 x 1050, as I’ve mentioned. With Windows, (hot) docking / undocking always Just Works. It automatically activates the correct resolution without me having to configure anything. So whenever I resume, I have a working display.

Feisty does not quite get this yet. In fact, Feisty needs some serious clue-bat-based attention… When I dock or undock and then resume, I have no display, and no way of getting my display back, besides power-cycling the laptop at every dock / undock. I ended up writing this Python script and binding it to Alt-F5 (for example) so that I would always have a way of activating the next display in the list of connected displays. Oh jeez, even assigning an arbitrary shell command to a global hot key in Gnome is not straight-forward. You have to use gconf as explained on this page. You can query connected and enabled displays with “aticonfig –query-monitor” and activate any subset with “aticonfig –enable-monitor=name1,name2,…,nameN”.

Desktop effects with XGL and Beryl

Wobbly Windows, you know, these are immensely useful and result in a more productive computing experience. NOT!

They are really very nice though. Most of the desktop effects are more nice to look at than actually useful, except for one: The Exposé-like functionality, called “Scale” by Beryl, scales and fits all windows on the current screen so that one can select the window that one wants to select easily.

Because fglrx doesn’t support the XComposite extension, I could not install AIGLX (Ubuntu default) and had to go for XGL and Beryl. After following this guide and making sure to use the external Beryl package repository as explained here (the Ubuntu packages won’t work in this case, they don’t have XGL support), I got the whole shebang to work. MAN this is pretty! Check out the screenshot below for Scale in action (there are non-desktop-effect ways of doing this, e.g. kompose or skippy, but none of them are as slick as the desktop effects version):

 

As with most other things in Ubuntu, this functionality is not without its caveats. This is even more flaky with suspending and resuming: after resuming, logging out and in will give you a garbled display. I have to restart X at the GDM login screen to get XGL to work again. There are also some focus issues, especially with the Gnome Deskbar (very useful utility, by the way): pressing the hotkey activates the deskbar, but you can’t begin to type, as the current window still has the focus. I managed to fix this by setting the Beryl “Level of Focus Stealing Prevention” (under general settings) to None. Changing to a higher resolution with the “Display Resolution” applet whilst running XGL+Beryl, results in only part of the screen being usable.

Miscellaneous issues

  • Palm Pilot synchronisation seems to work out of the box with my Tungsten C, but hangs forever on ToDo synchronisation. Seems it’s due to this bug.
  • The built-in Texas Instruments SD card reader works out of the box, but does not automount like other removable media. This is either due to the fact that it’s not seen as removable, or that the driver forgets to assign its parent bus. See this mail thread. I ended up applying this workaround, involving adding rules to the udev system to pmount the SD card.
  • Gimp doesn’t understand SMB: URIs, whereas the Gnome Image Viewer does, and gthumb pretends to but doesn’t.

Conclusion

All in all, I’m positive but not quite convinced yet. The Ubuntu people have done a marvellous job, but Feisty Beta (up to date as of 2007-04-10) doesn’t quite Just Work(tm) on the HP NC8430. I had to break my rule of editing config files or writing scripts more than once to get it to work to my satisfaction, and still there are problems that would make it difficult to work in Ubuntu full-time: the miserable battery life, the flaky suspend/resume and the really bad dynamic multi-monitor support. That being said, things like the user-friendly WPA support and the flawless install on an NTFS partition are going in the right direction.

Updates

  • This post has been linked by OSNews! You can also follow some of the discussion over there.
  • It’s also on digg (should I say that it’s been dugg?).  See here.
  • Fixed aticonfig lsp/lsb typo, thanks lampshade!
  • My domain has been migrated to a more stable server, some comments may have been lost in the process. If your comment has not appeared yet, please re-submit it.

PS

Please comment away, but keep it civilised. I’ll update the post as we go along, and give credit where credit’s due.