Raspberry Pi: First Impressions

After pre-ordering the Raspberry Pi on launch day, February 29th, I have finally received my shipment from RS Components.

Raspberry Pi model B

As a first test, I loaded the recommended Debian Squeeze system image onto a 16GB SD card and hooked the Pi up to a USB keyboard and mouse and a computer monitor. The Debian installation comes complete with a lightweight graphical desktop environment (Xfce) with the usual raft of applications, including a browser. Browsing worked pretty well, although scrolling certainly is not smooth. All in all, the performance was decent especially considering that the Pi has a processing power comparable to my 3 year old HTC Hero Android phone.

The next project was to use the Pi as a media center. For this, I followed the instructions at the OpenELEC wiki and after about 3 hours of compilation and some time for setting up the SD card, I had the Pi running XBMC. From power on until XBMC is ready takes about 10-12 seconds and generally when moving around in the menus, performance is fine.

The Pi is connected to my home network via wired ethernet. So far, I have tested streaming of 1080p content (h264 encoded) from my NAS. This works beautifully and I have yet to notice any stutter or lag. A DVD ripped and re-encoded to h264 also played perfectly. It seems the Pi is not able to handle mpeg2 encoded files. When I play these, the sound is OK, but the screen is just black. Update: an mpeg2 license key is now available for purchase from the Raspberry Pi store – this will unlock hardware accelerated mpeg2 decoding.

Raspberry Pi running OpenELEC with XBMC streaming a 1080p trailer for “Battleship” over wired ethernet from a NAS.

To control XBMC, I use the Official XMBC Remote app. This works extremely well both for navigating the interface and for entering text, hence there is no need for keyboard and mouse.

Considering the price of just $35, the Raspberry Pi is a very impressive piece of kit. With a power consumption around 3W, it is perfect as an always-on personal web server, file server or print server. As described above it can also form the basis of a very capable media center.

Next project: use the Pi for interfacing with a Lego Mindstorms robot…


Posted in Hardware Devices, Raspberry Pi | 2 Comments

Suppressing Trivial FindBugs Warnings for Android Projects

FindBugs is an extremely useful static analysis tool for Java code that will flag many subtle bugs and point out bad practice. However, when using FindBugs with Android projects, it will complain about the name of the auto-generated Android resource inner classes, which start with a lower-case letter, e.g. com.example.app.R$attr. Obviously, there is not much you can do to change the names, so these warnings are of little use.

By defining a filter for FindBugs, the warnings can be suppressed. Create an XML-file with the following content and include the file as a filter when running FindBugs.

  <Class name="~.*\.R\$.*"/>

If you run FindBugs through the Eclipse plugin, open Eclipse Preferences, go to Java > FindBugs and select the “Filter Files” tab. Click “Add…” next to “Exclude filter files” and select the XML-file you created earlier.

If you run FindBugs from a command line, include the option “-exclude <file.xml>”, where “<file.xml>” is the path and name of the XML-file you created.

The FindBugs filter mechanism is very versatile. Have a look at chapter 8 of the FindBugs manual for more information.


Posted in Android | Tagged , | 4 Comments

Searching Active Directory root with Apache’s mod_authnz_ldap

While setting up an Apache server for authenticating users accessing a Subversion repository using mod_authnz_ldap, I came across a problem previously reported by phiroc on the users@httpd mailing list:


when I use the following AuthLDAPURL

“ldap://adserver/ou=city1,dc=abc,dc=com?sAMAccountName?sub?(&(objectClass=user)(!(objectClass=computer)))” NONE

I can authenticate any user in “ou” city1.

If I replace the AuthLDPAURL by

“ldap://adserver/dc=abc,dc=com?sAMAccountName?sub?(&(objectClass=user)(!(objectClass=computer)))” NONE

I get an Apache 2.2 internal error and in the error log the following message:

[debug] mod_authnz_ldap.c(379): [client xxxx] [8655] auth_ldap authenticate: using URL ldap://adserver/dc=abc,dc=com?sAMAccountName?sub?(&(objectClass=user)(!(objectClass=computer)))
[info] [client xxxx] [8655] auth_ldap authenticate: user myusername authentication failed; URI /test/ [ldap_search_ext_s() for user failed][Operations error]

When I do ldapsearch … -b ‘dc=abc,dc=com’ ‘(&(objectClass=user)(!(objectClass=computer))(samaccountname=myusername)’, the Active Directory server returns data, which seems to imply that there’s something wrong with the mod_authnz_ldap module, or with the way I set it up or use it.

Has anyone encountered this problem before?

Is there a solution?

Many thanks.

Best regards,


It turns out that this problem can occur if the Active Directory has been partitioned among several domain servers in a so-called forest. The solution appears to be to query the Global Catalog instead of the domain server. To do this, access the domain server using TCP port 3268 instead of the standard port 389. Continuing the example given by phiroc, the AuthLDAPURL should be changed to:

“ldap://adserver:3268/dc=abc,dc=com?sAMAccountName?sub?(&(objectClass=user)(!(objectClass=computer)))” NONE

Posted in Configuration | 3 Comments

Recovering from a bad initrd image

When Linux is booted by the boot loader, it will first load the kernel image (usually /boot/vmlinuz) into memory, followed by the initial boot ramdisk (usually /boot/initrd). If for some reason the initrd image has been corrupted, booting may fail. The following procedure can be used to re-generate the initrd image.

  1. Make sure the BIOS is set to boot from the optical drive
  2. Insert the OpenSUSE install DVD into the optical drive.
  3. Boot the machine
  4. Select the menu option “Rescue System”
  5. When prompted to login, type “root”
  6. Mount the Linux root partition, typically something like “mount -t ext3 /dev/sda1 /mnt”
  7. If the Linux /boot area is on a separate partition, also mount that into the root partition, f.ex. “mount -t ext3 /dev/sda2 /mnt/boot”
  8. Bind the rescue system’s /dev to the mounted root filesystem with “mount –bind /dev /mnt/dev” – this will make sure all your device nodes are correct
  9. Chroot to the mounted root filesystem with “chroot /mnt”
  10. Mount proc and sys: “mount /proc” and “mount /sys”
  11. Re-generate initrd image with “mkinitrd”
  12. Remove DVD and reboot
Posted in Installation, OpenSUSE 11.1 | Leave a comment

Changing GDM theme in OpenSUSE 11.1

OpenSUSE 11.1 ships with GDM 2.24.x which is a not yet feature-complete rewrite of the original GDM codebase. One consequence of this is that it is no longer possible to customize the login screen using gdmsetup. It is, however, still possible to customize the background image, icon theme and Gtk theme by editing gconf settings.

The properties for GDM are defined in the distribution-specific gconf settings in /etc/gconf/gconf.xml.vendor/%gconf-tree.xml.

To change the background image, look for:

<dir entry=”background”>

<entry name=”picture_filename” mtime=”1241629069″ type=”string”>




Change the string value to the location of the background image you want to use.  This can be either a JPG file or an XML file in the Gnome background slideshow XML format (which does not seem to be documented).

The icon theme and Gtk theme can be similarly modified by editing the properties “icon_theme” and “gtk_theme” respectively.

Posted in Configuration, OpenSUSE 11.1 | Leave a comment