matchbox-desktop raspberry pi

Matchbox-Desktop on the Raspberry Pi

Matchbox-desktop is a lightweight windows manager for embedded systems. It works great on a Raspberry Pi with one of the smaller TFTs attached. E.g. PiScreen, PiTFT , etc…

Matchbox-desktop is “finger friendly” and makes it easy to navigate while just using your fingers on the touchscreen.

Mathcbox-Desktop needs to be installed from source and via apt-get to get it going correctly, in this order;

pi@raspberrypi ~ $ sudo apt-get update
pi@raspberrypi ~ $ sudo apt-get install autoconf autogen intltool libtool libx11-dev libxext-dev libxft-dev libpng-dev libgconf2-dev libgtk2.0-dev libstartup-notification0-dev libdbus-glib-1-dev -y
pi@raspberrypi ~ $ git clone http://git.yoctoproject.org/cgit/cgit.cgi/libmatchbox/
pi@raspberrypi ~ $ git clone http://git.yoctoproject.org/cgit/cgit.cgi/matchbox-common/
pi@raspberrypi ~ $ git clone git://git.yoctoproject.org/matchbox-desktop
pi@raspberrypi ~ $ cd libmatchbox
pi@raspberrypi ~ $ ./autogen.sh
pi@raspberrypi ~ $ make
pi@raspberrypi ~ $ sudo make install
pi@raspberrypi ~ $ cd ../matchbox-common
pi@raspberrypi ~ $ ./autogen.sh
pi@raspberrypi ~ $ make
pi@raspberrypi ~ $ sudo make install
pi@raspberrypi ~ $ cd ../matchbox-desktop
pi@raspberrypi ~ $ ./autogen.sh
pi@raspberrypi ~ $ make
pi@raspberrypi ~ $ sudo make install
pi@raspberrypi ~ $ sudo apt-get install matchbox-desktop

To start matchbox-desktop

pi@raspberrypi ~ $ FRAMEBUFFER=/dev/fb1 xinit /usr/local/bin/matchbox-desktop

UPDATE: Matchbox-desktop doesn't work with  newer Raspbian images. The last confirmed image it works on is 2014-06-20-wheezy-raspbian.img

To get matchbox-desktop working;
1. Burn the above img.
2. Follow the instructions above and matchbox-desktop will compile correctly.
3.Perform updates

pi@raspberrypi ~ $ sudo apt-get update
pi@raspberrypi ~ $ sudo rpi-update
pi@raspberrypi ~ $ sudo apt-get upgrade
pi@raspberrypi ~ $ sudo apt-get dist-upgrade
pi@raspberrypi ~ $ sudo apt-get install raspberrypi-ui-mods

4. Remove SPI from black-list
Open raspi-blacklist.conf

pi@raspberrypi ~ $ sudo nano /etc/modprobe.d/raspi-blacklist.conf

And place a hash '#' in front of 'blacklist spi-bcm2708'.

5.Configure drivers for any attached TFT.
6. Disable framebuffer driver option for /dev/fb0.
Open up the framebuffer conf file;

pi@raspberrypi ~ $ sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf

Comment out the line of text below;
Option "fbdev" "/dev/fb0"
This can be done by adding a hash (#) at the beginning of line.
#Option "fbdev" "/dev/fb0"

7. Now startmatchbox-desktop.

pi@raspberrypi ~ $ FRAMEBUFFER=/dev/fb1 xinit /usr/local/bin/matchbox-desktop

[wp_ad_camp_3]

11 thoughts on “Matchbox-Desktop on the Raspberry Pi”

  1. Hello, thanks for these instructions. When I started to follow these based on the Raspbian version 2014-09-09, it failed. If you are interested, I can sent the logfiles to you.
    So my question is: why did you choose this way instead of installing the matchbox package, which is part of the Debian and thus also part of the Raspbian distribution?

    1. When installing the the package from apt-get, it doesn’t install correctly. There are a few items missing.

      Only through trial and error was I able to get it installed correctly, using source and apt-get.

      Please paste in your error message below.

  2. Thank you so much for this… I had been pulling my hair out trying to find info for installing Matchbox on the Pi. Everything I found was about running matchbox-window-manage ad a full screen browser for a kiosk.

    I did run into an “oh oh” error during make of matchbox-desktop. I’m doing this on the Dec 19th version of Raspian…

    collect2: ld returned 1 exit status
    Makefile:350: recipe for target ‘matchbox-desktop’ failed
    make[2]: *** [matchbox-desktop] Error 1
    make[2]: Leaving directory ‘/home/pi/matchbox-desktop/src’
    Makefile:381: recipe for target ‘all-recursive’ failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory ‘/home/pi/matchbox-desktop’
    Makefile:289: recipe for target ‘all’ failed
    make: *** [all] Error 2

    1. Ooop, didn’t copy enough text…

      libtool: link: gcc -g -O2 -o matchbox-desktop mbdesktop.o mbdesktop_item.o mbdesktop_view.o mbdesktop_module.o md5.o mbdesktop_win_plugin.o -Wl,–export-dynamic -L/usr/local/lib /usr/local/lib/libmb.so -lX11 -lXext -lpng12 -lXft -lz
      /usr/bin/ld: mbdesktop.o: undefined reference to symbol ‘dlsym@@GLIBC_2.4’
      //lib/arm-linux-gnueabihf/libdl.so.2: error adding symbols: DSO missing from command line

  3. Joe, I have the same error:
    libtool: link: gcc -g -O2 -o matchbox-desktop mbdesktop.o mbdesktop_item.o mbdesktop_view.o mbdesktop_module.o md5.o mbdesktop_win_plugin.o -Wl,–export-dynamic -L/usr/local/lib /usr/local/lib/libmb.so -lX11 -lXext -lpng12 -lXft -lz
    /usr/bin/ld: mbdesktop.o: undefined reference to symbol ‘dlsym@@GLIBC_2.4’
    /lib/arm-linux-gnueabihf//libdl.so.2: error adding symbols: DSO missing from command line
    collect2: ld returned 1 exit status

  4. i have the same problem. as these guys, id add the errors but they are the same thing as is already posted by the others.

  5. I ran into same error with Raspbian lite (2017-11-29 release) on the pi 3. It will be highly appreciated if I can get way to fix the error.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.