Monday, April 28, 2008

Compiz works on Heron!

After the initial dissapointment with my clean installation of Ubuntu Hardy Heron, I finally got compiz to work. It was related to the strange core dumps which happens after I run the glx applications. Even running glxinfo causes a segmentation fault. Fortunately it provided a nugget of information:
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
So set an environment variable as such:
# export LIBGL_DEBUG=verbose
and running glxinfo will result in a more verbose error:
libGL: XF86DRIGetClientDriverName: 5.3.0 r200 (screen 0)
libGL: OpenDriver: trying /usr/lib/dri/
libGL error: dlopen /usr/lib/dri/ failed (/usr/lib/dri/ undefined symbol: _glapi_Dispatch)
libGL error: unable to load driver:
I googled for this, and found this very interesting 'bug report'

Basically the issue is that I erroneously installed the fglrx drivers which I dont need to because my ATI Radeon Mobility 9200 is fully supported by the "ati" Open Source drivers provided by xorg.

So the solution for all this is to remove fglrx with this:
# apt-get remove xorg-driver-fglrx
However there is one more hurdle. Compiz by itself will not run properly "out of the box" on my system. If you run it on the command line
# /usr/bin/compiz --replace &
You will get this error:
Checking for Xgl: not present.
Found laptop using ati driver.
aborting and using fallback: /usr/bin/metacity
And therefore fallback to metacity. No compiz goodness.

To get this to run, according to this post, you will need to modify /usr/bin/compiz by adding these two lines at the top of the file:
This will bypass the checks compiz runs which may abort if it thinks your system isnt good enough. Its something like the "Vista Capable" programme, but only in reverse.

Running compiz again on the command line confirms that its really working, and using the System/Preferences/Appearance/Visual Effects also correctly boots up compiz. The performance is really fast, my wobbly windows are sufficiently wobbly, and all the compiz effects are really smooth.

This inspired me to make my own compiz capable logo.


[Update: Removed the beryl logo]

Hardy Heron - works!

Last Friday, I started my migration from Gutsy Gibbon to Hardy Heron. I took this opportunity to wipe out my entire system, starting from scratch with a new hard disk. Yeah, a 160GB notebook IDE hard disk is now only RM200, so I thought it was a worthwhile upgrade (and effort). I used to have two huge partitions (20-30GB each) formatted as FAT32 for me to share data if I so happened to boot into Windows XP. However for the past year, I never found the need to do that, so Im finally getting rid of FAT32 and by extension, issues with user and datetime information when rsynching.

Popped out the old HDD, replaced with the new, popped in the Install CD and was in the Installation screen booted up relatively quickly. The partitioning part of the installation process was quite tedious, because changing the partitions sizes was quite manual. You had to delete the partitions to make changes to the sizes. No slidey thingies as we are used to with partition management UIs.

After the CD was copied to the hard disk, Hardy booted up really fast. Im not sure its because I was so used to the relatively slow bootup of Gutsy, because it was an upgrade of Feisty Fawn, but I was well impressed with the speed. Things just worked out of the box. Wifi connected without a hitch, sound worked well, special buttons worked, and battery indicators seemed accurate. Suspend gave a problem, but fortunately Hibernate worked! Although it did give some worrying messages in between.

The new Firefox 3 beta 5 looks and feels real good. There are lots of little details which really make it look polished. My greasemonkey scripts appear to run faster than before. Im very happy that greasemonkey and firebug are easily installed via the Add/Remove software app. However some other browser plugins still arent ready, e.g. Google Sync and Permatabs.

I loved the new look to it, fonts seemed a lot more crisp (make sure this is set: System/Preferences/Fonts from BestShapes to SubPixels for your laptop/LCD screens), and windows moved alot faster. I checked out the screensavers, and the 3D ones seemed to be smoother too. However, strangely, compiz was not working. My ATI Mobility 9200 doesn't seem to work well with it, even though I have seen it work with Gutsy. Running glxgears gives a pretty good 1500 FPS. However when you close the app, it core dumps and a new dialog appears. This appears for other 3D screensavers too.

Installing the fglrx drivers doesn't seem to work either. Placing "fglrx" in the xorg.conf causes X to not start. Thats really annoying.

Also horizontal scrolling on the Mighty Mouse is not working. Whenever I change the Driver in the xorg.conf file from "mouse" to "evdev", the mouse will not work at all. Ive tried all the new tricks as described in this relatively new document, but getting horizontal scroll to work seems to be a puzzle.
Option "SendCoreEvents" "true"
It seems strange that things which used to work almost out of the box isnt working now. Whats interesting about Firefox 3 is that it is Mighty Mouse friendly: the Backward/Forward (mousewheel.horizscroll.withnokey.action from "2" to "0") and Horizontal Scroll reversal ( mousewheel.horizscroll.withnokey.numlines from "-1" to "1") settings are already corrected, so that one less fiddle in the about:config step to go through.

Another final touch is getting multimedia to work. So this command downloads the necessary unfree codecs:
# sudo apt-get install ubuntu-restricted-extras
It will then download 37MB of files (and more) for your viewing pleasure.

So overall, Im very happy with the new breath of fresh performance on my slightly old laptop (3 years old), Im dismayed that I can't scroll horizontally, and my compiz eyecandy isnt working. But I'm confident that I'll eventually find a way to rectify the current features as it used to work before.

It's definitely a worthy update for experts now, but for n00bs, please wait a month for workarounds and upgrades to plugins are found.


Monday, April 21, 2008


Just got this email from a frustrated colleague:
any idea why this keeps happening? mike's attachments keep appearing as winmail.dat files when i receive them.
The winmail.dat file is a 84KB file of unknown origins. So I detached the file, and looked at it via the command line:

yky@x1407:~/Desktop$ more winmail.dat
x�>"���� IPM.Microsoft Mail.Note  �^L^L7


Googling "winmail.dat attachments" brought me to this informative page.


The Microsoft Outlook e-mail program sometimes sends e-mails in the Transport Neutral Encapsulation Format (TNEF). Most other e-mail programs, including Thunderbird, do not understand TNEF.

If your e-mail program doesn't understand TNEF, instead of seeing the e-mail and/or attachment, you may only see an attachment named "winmail.dat" or "Part 1.2" that you cannot open. Also, sometimes you may receive a TNEF attachment with a generic name such as ATT00008.dat or ATT00005.eml instead.

The solution is to have a TNEF decoder. I typed "tnef" on my ubuntu shell, and it was already installed. 'man'ed it and found that the syntax is:
tnef -vf winmail.dat
'v' is for 'verbose' so that it lists what file names it successfully decodes, and the 'f' flag is to indicate which input file to use (otherwise it uses stdin).

Thats all there is to it. The encoded file will then appear, forward it to your colleagues and their frustrations will subside ... at least till yet another Outlook user decides to harass em.