http://www.directfb.org/downloads/Core/DirectFB-1.4/README
The libmpeg3 video provider requires the libmpeg3 library which is not commonly installed. We provide this package on our web-site at http://www.directfb.org/download/contrib/.
The avifile and flash video providers that used to be shipped with DirectFB have been moved to the DirectFB-extra package.
We suggest you also install pkg-config available from http://www.freedesktop.org/software/pkgconfig/. It will help you to compile applications based on DirectFB.
Usage Requirements
Depending on the DirectFB application you want to run, you need some or all of these:
- A working frame buffer device (check the output of 'fbset -i').
- A keyboard (if it works on the console, everything should be fine).
- A PS/2 or serial mouse for windowing. USB and ADB mice do also work via PS/2 emulation.
Using the single application core you always need access to /dev/tty0, /dev/fb0 and the mouse device (/dev/psaux, /dev/mouse).
You can either run all DirectFB applications as root or allow users to access these devices.
A reasonable way to do this is to add users to the group tty (or some other group) and allow this group to read and write the files in /dev:
crw-rw---- 1 root tty 29, 0 /dev/fb0
crw-rw---- 1 root tty 10, 1 /dev/psaux
crw-r----- 1 root tty 4, 0 /dev/tty0
If you are using the multi application core, only the master process need access to all of these devices. Additional processes(slaves) just need access to /dev/fb0 and:
crw-rw---- 1 root fusion 29, 0 /dev/fusion/0
Note that the master creates a shared memory file, probably in '/dev/shm/fusion.0'.
It's read/writeable for anyone matching the master process' user or group.
Some applications from the DirectFB-examples package have additional requirements:
- A video card supported by video4linux for df_video.
- A joystick for df_joystick.
Rnning multiple DirectFB applications at the same time
DirectFB applications communicate through a layer we call "Fusion".
This layer was previously implemented completely in user space using semaphores and message queues.
But since 0.9.15 the Fusion Kernel Device is required which implements critical parts of Fusion and thus lead to better performance and decent stability.
To install this kernel module (only available for Linux yet), find the linux-fusion module in our CVS or GIT repository or on the DirectFB website. For DirectFB 1.4.x releases you should use linux-fusion 8.1.1 or newer.
Compile DirectFB with multi-application core enabled:
./configure --enable-multi
Make sure your Linux kernel supports tmpfs. This is explained in the kernel sources in Documentation/filesystems/tmpfs.txt. Mount a tmpfs filesystem as /dev/shm:
mount tmpfs /dev/shm -ttmpfs
Optionally a mount point can be specified via the "tmpfs" option, see directfbrc(5). The option has to be the same for all processes.
A good way to test the multi-application core is to install the lite toolkit and DFBTerm, a DirectFB terminal (both available in the DirectFB CVS/GIT repository). You can then start DirectFB applications from dfbterm.