Indexing on Linux not ready yet

Beagle Tracker

On the Linux Desktop there are at least 2 ongoing efforts to try to bring indexing support to the platform. That is, a way to quickly search for files spread around the user’s home directory. One is Beagle and the other is tracker.

But both projects have a major flaw: they can’t properly track file changes. To do that, they use Linux’ inotify feature which allows to watch directories and files. Although you can watch the content of a directory, notifications do not recurse, which means that you have to watch every single directory of your home.

So what happens? Upon startup watches have to be put on every directory and that requires quite a significant filesystem activity. Beagle seems to defer this when the system is in an idle state so it is less noticeable.

The proper solution would be that the Linux kernel provides an inotify that does recurse. This shouldn’t be a performance problem as indexing softwares would only need one watch then.

Gnome creating problems


Funny how instead of trying to solve problems, Gnome apps are actually creating new ones, all by themselves, without any outside factor. They must be really bored or something.

All modern desktops have an area called a systray which is a small area where apps that keep running in the background but still provide an interface that is accessed from time to time can be found, usually by displaying their icon here. Such apps are usually music players, instant messaging software, news aggregator, mail clients, etc.. This is useful because the app doesn’t get in the way by being too intrusive. For example you don’t need an instant messenger to take unecessary space when no one is messaging you. Same for a music player, you don’t need it to display anything once you did your music selection and it’s playing.

For these apps, when you press the close button, they go to the systray.. or so you’d think. Because some people think that the close button should be used to close apps, and that for minimizing to systray you should use some obscure keyboard shortcut (ctrl + w, the ‘w’ stands for ‘wankers’) or press the icon in the systray again. Of course, the former behaviour is still available in other apps.

So what happens is that when pressing the close button, some apps will go to the systray and other will just exit. A good example is Rhythmbox which exits when you press the close button. How many users are really running Rhythmbox to play a few seconds then actually quit the app? Probably very very few. How many users said “oh shit” when pressing the same close button? Probably many.

But as usual I bet they’ll spend years and years on that “problem”..

How to change the date display to international format


On an Ubuntu system:

  • cd /usr/share/i18n/locales
  • sudo cp en_US en_INTL
  • sudo vi en_INTL
  • change the d_fmt line to: “<U0025><U0059><U002D><U0025><U006d><U002D><U0025><U0064>”
  • sudo vi /var/lib/locales/supported.d/local
  • add the following line: en_INTL.UTF-8 UTF-8
  • sudo dpkg-reconfigure locales
  • sudo vi /etc/environment
  • add the following line: LC_TIME=”en_INTL.UTF-8″

Reboot/relogin. Now you should have dates displayed like this: 2007-01-18.

Who says Linux is not ready for the desktop? Er.. right.

Windows Media codecs released

Windows Media

I’m happy to tell that the Windows Media codecs that I have been working on have just been released today on the Fluendo Webshop. And here is the announcement.

Currently there is:

  • an ASF demuxer
  • a Windows Media Video decoder
  • a Windows Media Audio decoder

The demuxer is used to extract the audio/video streams from the ASF files (that is, files commonly ending in .wmv, .wma or sometimes also .asf) and sends them to the respective decoders. The demuxer was written from scratch and the decoders are adapted from the sources provided by Microsoft. This is the first time one can play those files legaly on Linux because with those codecs comes the license to do so.

The platforms supported are:

  • Linux x86
  • Linux x86_64
  • Solaris SPARC
  • Solaris x86
  • Linux PowerPC

And more to come but I cannot disclose them yet. The media framework used is GStreamer which means all your applications using it automatically can play Windows Media files.

Ubuntu Linux on a Dell Inspiron 9400/E1705

Dell Inspiron 9400

So there is my brand new laptop. Interesting specs:

  • CPU Intel Core 2 Duo T7200 at 2 GHz, 4MB L2 per core, 667 MHz FSB
  • 2 GB of DDR2 RAM at 667 MHz
  • 120 GB SATA HD
  • 17″ LCD screen, 1920×1200
  • ATI Mobility Radeon X1400 128 MB
  • DVD burner, Bluetooth 2.0, 6 (!) USB 2 ports, WiFi 802.11abg, Firewire, DVI output, Subwoofer, etc..

I briefly tried the preinstalled Windows 2005 Media Edition which seems to be a special version of Windows XP with a media player featuring an interface designed to be used with a remote control. There’s also a MediaDirect button that boots into a custom partition with Windows Media Center and allows to quickly watch movies, pictures and play music. Contrary to popular belief, MediaDirect does not use Linux.

Installing Ubuntu Edgy Eft

Installation was pretty easy, using the alternate CD. Then on the next reboot I could, of course, deal with most of the nonsense Linux users have to deal with setups less than 5 years old. The first problem was that the keyboard didn’t wooorkkk proooperrllly. Turns out one has to add the option ‘notsc’ to the booting parameters. We’ll see how kernel hackers will solve that issue. I can now fully use both CPU cores but the side effect is that I cannot close the laptop’s lid without suffering a complete system freeze. Not nice.

Now for the graphics part, which is always a problem when one owns an ATI or NVidia card (which means, most of the cards in the market). One has to install the restricted drivers and reconfigure Xorg to use the ‘fglrx’ driver in that case. Why this is not done automatically is beyond me..

Apparently the Radeon X1400 doesn’t provide an XVideo adapter with the current version of fglrx. But worse, the driver doesn’t seem to have any concept of syncing to vertical retrace which means that not only you get tearing in all 3D games, but also when watching movies (yes, I do know about Capabilities 0x00000800 and .drirc’s swap_on_vblank, both don’t work). This is really annoying as watching movies on that marvelous screen is definitely awesome.
The wireless card works good enough. Still no support for injecting packets while in rfmon but who cares 🙂

Bluetooth works. But it’s slow. I wonder when the BlueZ developers will finally notice that their stack is ten times slower than the one on Windows. I don’t manage to send files from Gnome, though. But gnome-bluetooth is not that good so that doesn’t surprise me much.

Audio works but there’s no support for the “subwoofer”. I mailed Richard Fish who told me he’d add a workaround because the BIOS isn’t supplying proper data.

Touchpad works. Horizontal scrolling is disabled by default though. Why?

The memory card slot doesn’t seem to work with MMC cards. I didn’t test it with other card formats.

Hibernation works, disable SAVE_VBE_STATE and POST_VIDEO in /etc/default/acpi-support.

There are a countless number of other things I had to tweak, like adding ‘noatime’ to /etc/fstab, enabling hashed b-trees directory indexes on ext3, removing all the superblock backups I don’t need, reserving less than 5% for root, enabling laptop-mode to spin off the HD when not using for long (not 5 seconds like their default silly config), making my Bluetooth mouse work by setting HIDD_ENABLED=1 in /etc/default/bluetooth (why isn’t this default? sigh), and so on. I didn’t test the firewire and the modem yet.

So, all in all. Yes, the Ubuntu guys did fix some stuff but there are still some braindead defaults that should be different. A good example is that fsck check that kicks in each time when you boot 30 times. Imagine you’re about to do a presentation on your laptop, you fire it up and.. “erm, sorry we have to wait a bit”. Why don’t they simply allow to skip the check?