Nautilus with libkibi

In this Ubuntu cycle, I work on getting the units policy implemented. For this I wrote a library called libkibi. Here are some screen shots how nautilus looks like with libkibi. Some changes are highlighted in red.

The file properties will show the file size in base10 and base2:

PS: I failed to launch nautilus in English. Therefore the screen shots are in German.

PS²: You can grab the modified nautilus package for Ubuntu 10.10 (maverick) from my experimental PPA (at your own risk!).

libkibi ready for testing

Yes, the library is finally called libkibi. The second poll ended with a tie between libbyteprefix (48 votes) and libkibi (45 votes). Then I decided to call the library libkibi.

libkibi is hosted on Launchpad. A working version can be pulled from lp:libkibi with bzr. Please test the library, reports bugs, and ask questions.

Why you should use libkibi instead of g_format_size_for_display (from GLib):

  • the users can configure their preferred prefix
  • rounds correctly (converting an integer to double, do some math, and then round again leads to rounding errors)
  • complies to Ubuntu’s Units Policy (except “historic” is selected)
  • is faster (between 15% and 35% depending on the processor)

Poll: libkibi VS libbyteprefix (or: How to call the library? 2)

Dear lazy web,

thanks for voting the best name for the library that helps implementing the Units Policy of Ubuntu. The winner with the most votes has been libkibi. There was one suggestion that got my attention: libbyteprefix. The suggestion came too late to have a chance. Therefore I ask you again to vote for the library name, but this time only these two names are open for voting: libkibi and libbyteprefix. libkibi is short and sounds good. On the other hand, libbyteprefix describes exactly what the library is supposed to do.

I was asked to use a free (as in freedom) poll-service. So please go to the Selectricity unitspolity vote and select your favorite. Thanks.

Poll: How to call the library?

Dear lazy web,

I am writing a library that implements the Units Policy of Ubuntu. This library can be used to format sizes (of files, disks, memory, etc.) for displaying them and the other way around. For example, the size 12345 bytes can be formatted to 12.3 kB, 12.1 KiB, or 12.1 KB depending on the configuration. An other function will give you the possibility to convert 12.3 kB, 12.1 KiB, or 12.1 KB back to 12345 bytes. The preferred binary unit can be configured by an text file (per system and per user) and by an environment variable. The library is written in C and doesn’t have any dependency. Therefore it can be used by any program on any desktop environment. Binding to other languages like C++, Python, Java are planned.

Before creating a project for this library, I need a name for the library. The current prototype is called libdisplayunits, but this name reflect only the half of the project. It does not indicate that the library can be used for inputting sizes. What do you think? What is the best name for the library? Please poll and/or comment below.

Daily builds rock, but bzr imports suck

Ubuntu‘s development platform Launchpad recently gained the ability to create daily builds. BzrBuilder is used for creating source tarballs and PPAs are used for building the source tarballs. BzrBuilder uses a recipe that declares how to build a source from different bzr branches. In most cases you have a bzr import from the upstream version control system. Then you nest a bzr branch that contains the packaging information. This works great for

but the bzr import for these projects fail:

  • Audacious: Import fails with infinite recursion (LP: #519709)
  • Eclipse: Launchpad disallows valid CVS module of ‘.’ from being imported (LP: #594294)
  • VLC: Code Imports does not support submodules (LP: #402814)
  • XMMS2: Code Imports does not support submodules (LP: #402814)

How many packages have you sponsored?

How many packages have you sponsored in the maverick release cycle? Check your mailbox for mails that have a header starting with [ubuntu/maverick]. Then subtract the number of own uploads (you can find them on the Uploaded packages site on your Launchpad account).

In my case, I have uploaded 45 own packages and sponsored 191 packages. That’s approximately four times more sponsored packages than own ones.

Is your ratio smaller than mine? Then go to the sponsoring overview and grab one bug and work on it. The code review process is described on the Ubuntu wiki.

How to send a command when pressing a key

Dear lazy web,

How can I send a command when pressing a key? To make it more complex: I have two input devices A and B. The command should be only sent, when the keys of device A are pressed (and not device B). The devices A and B have the same key codes. For example, pressing the dot key on device A should run a command, but pressing the dot key on device B should just produce a dot. Is it possible to use device A as input device for lirc?

How to remote control OpenOffice.org Impress

Dear lazy web,

I want to control OpenOffice.org Impress through my remote control on Linux. Does OpenOffice.org Impress has a lirc plugin or is there another easy way to do it? The system that hosts the presentation is used for other things, too. Therefore the current active windows is not always Impress. Sending a key code to the active window won’t work.

Update: The computer has two screens: A TFT and a video projector. It is used for audio recording and hosting the presentation. The active window on the TFT is the audio recording application. The presenter can only see the video projector and should be able to control the presentation with a remote control that works with lirc.

Ubuntu 10.04 (Lucid Lynx) boots fast

A few  days ago, I installed Ubuntu 10.04 (Lucid Lynx) on my Super Talent Ultradrive GX 64GB (firmware version 1916 with TRIM support) and rebooted it thirty times to get some data from bootchart. Here are the results: The fastest boot took only 3.65 seconds. Impressed?

Click on the image for the full bootchart.

The default installation averages out at 4.5 seconds. The highest disk throughput was 204 MiB/s (thanks to ureadahead).

Click on the image for the full bootchart.

After everything was installed, the boot takes six seconds (probably due to liferea).

Click on the image for the full bootchart.

A SSD leads to a fast booting system, but then the processor has an impact on boot times too. Compare these boot charts with the one of the IBM ThinkPad T400. The SSDs are similar, but the processors differ: Core 2 Duo E8500 @3.16GHz versus Core 2 Duo T9400 @2.53GHz.

Do your system boots faster?