The Linux/m68k Frame Buffer Device : User's View of /dev/fb*
Previous: Introduction
Next: Programmer's View of /dev/fb*

2. User's View of /dev/fb*

From the user's point of view, the frame buffer device looks just like any other device in /dev. It's a character device using major 29, the minor specifies the frame buffer number.

By convention, the following device nodes are used (numbers indicate the device minor numbers):

0 = /dev/fb0

First frame buffer

32 = /dev/fb1

Second frame buffer

...
224 = /dev/fb7

8th frame buffer

For backwards compatibility, you may want to create a symbolic link from /dev/fb0current to fb0.

The frame buffer devices are also `normal' memory devices, this means, you can read and write their contents. You can, for example, make a screen snapshot by

    cp /dev/fb0 myfile
    

There also can be more than one frame buffer at a time, e.g. if you have a graphics card in addition to the built-in hardware. The corresponding frame buffer devices (/dev/fb0 and /dev/fb1 etc.) work independently.

Application software that uses the frame buffer device (e.g. the X server) will use /dev/fb0 by default (older software uses /dev/fb0current). You can specify an alternative frame buffer device by setting the environment variable $FRAMEBUFFER to the path name of a frame buffer device, e.g. (for sh/bash users):

    export FRAMEBUFFER=/dev/fb1
    

or (for csh users):

    setenv FRAMEBUFFER /dev/fb1
    

After this the X server will use the second frame buffer.


The Linux/m68k Frame Buffer Device : User's View of /dev/fb*
Previous: Introduction
Next: Programmer's View of /dev/fb*