DIRECTFBRC(5)
๐ธ directfbrc(5) โ DirectFB Manual Pages ๐ธ
๐ NAME ๐
okay so directfbrc โ the DirectFB configuration file. that's it, that's the whole vibe. ๐
โจ DESCRIPTION โจ
bestie. listen. the directfbrc file is a config file that every single DirectFB application reads on startup. no skipping, no exceptions, they all read it. ๐ซถ
and there's not just one โ there's two of them:
- a system-wide one sitting in
/etc/directfbrc - a per-user one at
$HOME/.directfbrcwhich may override the system settings ๐
you want even more control? it's giving per-executable energy โ you can customise based on the basename of argv[0]:
/etc/directfbrc.$0- a per-user
$HOME/.directfbrc.$0
and after all the config files get read, the environment variable DFBARGS gets parsed. ๐
the same parameters that work in the directfbrc file can be passed through that variable, or straight up on the command-line โ just prefix them with --dfb: and separate each one with a comma. iconic honestly.
๐ SYNTAX ๐
the directfbrc file is one parameter per line. that's the whole rule. comments start with a hash sign (#) and keep going until the end of the line, and blank lines just get ignored like they don't even exist. ๐
most parameters are switches that turn certain features on or off. these switches have a no- variant that disables the feature. this manpage describes the positive variant, and it will also note which setting is the compiled-in default. ๐ฏ
๐ฅ PARAMETERS ๐ฅ
the following parameters may be specified in the directfbrc file:
system=<system>โ picks the graphics system to use. default is the Linux frame buffer (fbdev), but you can also run DirectFB apps on SDL (sdl). other systems might get added in the future, no promises. ๐ฎfbdev=<device>โ opens the frame buffer device you name instead of/dev/fb0.busid=<id>โ specify the bus location of the card. this option only gets used if DirectFB doesn't have sysfs support, and if you leave it unspecified,1:0:0is assumed. use this if your driver fails to detect (or incorrectly detects) your card. the audacity of that driver. ๐ญmode=<width>x<height>โ sets the default screen resolution. if unspecified, DirectFB uses the first mode from/etc/fb.modes. heads up: some frame buffer devices (namelyvesafb) don't support mode switches at all and can only be used in whatever resolution was set at boot time. ๐scaled=<width>x<height>โ scales the window to this size for'force-windowed'apps.depth=<pixeldepth>โ sets the default pixel depth in bits per pixel. if unspecified, DirectFB uses the depth specified in the first mode from/etc/fb.modes. DirectFB supports color depths of8,15,16,24and32. which values are actually available depends on your frame buffer device. and again โ some frame buffer devices (namelyvesafb) don't support mode switches at all and can only be used in the pixel depth set at boot time. โpixelformat=<pixelformat>โ sets the default pixel format. this is similar to thedepthparameter above but lets you be more fine-grained about it. possible values areLUT8,RGB332,RGB16,RGB24andRGB32. some drivers may also support the more exotic ones:A8,ALUT44,ARGB,ARGB1555,I420,UYVY,YUY2andYV12. fancy. ๐session=<num>โ selects the multi application world to join or create. starts at zero, and negative values force creation of a new world using the lowest unused session number. this will override the environment variable"DIRECTFB_SESSION". no cap.force-slaveโ always enter as a slave, waiting for the master, if it's not there. loyalty. ๐ฅบremote=<host>[:<session>]โ select the remote session to connect to.tmpfs=<directory>โ uses the given directory (a tmpfs mount point) for creation of the shared memory file in multi application mode. only useful if the automatic detection fails, or if you actually want non-tmpfs storage for some reason.shmfile-group=<groupname>โ the group that owns shared memory files.memcpy=<method>โ with this option, the probing ofmemcpy()routines can be skipped, which saves a lot of startup time. pass"help"for a list of possible values. ๐โโ๏ธprimary-layer=<id>โ selects which layer is the "primary layer". default is the first one. check'dfbinfo'for a list of layers supported by your hardware.primary-onlyโ tell the application only about the primary layer. gatekeeping, but make it config. ๐ชquietโ suppresses console output from DirectFB. only error messages will be displayed.[no-]bannerโ enables the output of the DirectFB banner at startup. this one is on by default. ๐[no-]debugโ enables debug output. on by default, but you won't see any debug output unless you compiled DirectFB with debugging support. ๐ญ[no-]debugmemโ enable memory allocation tracking.[no-]debugshmโ enable shared memory allocation tracking.[no-]traceโ enable stack trace support. on by default, but you won't see any trace output unless you compiled DirectFB with trace support.log-file=<name>โ write all messages to the specified file.log-udp=<host>:<port>โ send all messages via UDP to the specified host and port. ๐กfatal-level=<level>โ abort onNONE,ASSERT(default) orASSUME(incl. assert).force-windowedโ forces the primary surface to be a window. this lets you run applications that were written to do full-screen access inside a window. adorable, honestly. ๐ชforce-desktopโ forces the primary surface to be the background surface of the desktop.[no-]hardwareโ turns hardware acceleration on. by default, hardware acceleration is auto-detected. if you disable it, the driver for your graphics card will still be loaded and used to access additional display layers (if there are any), but all graphics operations will be performed by the software renderer. slay, but slow. ๐[no-]softwareโ this option allows you to disable software fallbacks.[no-]dmaโ turns DMA acceleration on, if supported by the driver. by default, DMA acceleration is off.[no-]syncโ flushes all disk buffers before initializing DirectFB. useful if you're working with experimental device drivers and expect crashes. the default is not to sync. ๐[no-]mmxโ theno-mmxoption allows you to disable the use of MMX routines even if support for MMX was detected. by default, MMX is used if it's available and support for MMX was compiled in.[no-]agp[=mode]โ turns AGP memory support on. this option lets DirectFB use AGP memory to extend the amount of video memory available. you can specify the AGP mode to use (e.g.1,2,4,8or0to disable agp). by default, AGP memory support is off.[no-]thrifty-surface-buffersโ free sysmem instance on xfer to video memory.font-format=<format>โ specify the font format to use. possible values areA1,A8,ARGB,ARGB1555,ARGB2554,ARGB4444,AiRGB. the default font format isA8because it's the only format that ensures high quality, fast rendering and low memory consumption all at the same time. only use this option if your fonts look strange, or if font rendering is too slow. ๐[no-]sighandlerโ by default, DirectFB installs a signal handler for a number of signals that cause an application to exit. this signal handler tries to deinitialize the DirectFB engine before quitting the application. use this option to enable/disable this feature.dont-catch=<num>[[,<num>]...]โ as described with thesighandleroption, DirectFB installs a signal handler for a number of signals. with this option you may specify a list of signals that shouldn't be handled this way.[no-]deinit-checkโ by default, DirectFB checks if the application has released all allocated resources on exit. if it didn't, it will clean up after the application. this option lets you switch this feature on or off. mother behavior, honestly. ๐งนblock-all-signalsโ this option activates blocking of all signals. useful for DirectFB daemons (a DirectFB master application that does nothing except being the master). main character energy, zero responsibilities. ๐[no-]vt-switchโ by default, DirectFB allocates a new virtual terminal and switches to it.vt-num=<num>โ use the given VT instead of the current/new one.[no-]vt-switchingโ allow switching virtual terminals using<Ctrl>+<Alt>+<F?>. this is an experimental feature that is usually disabled; use at your own risk. โ ๏ธ[no-]graphics-vtโ puts the virtual terminal into graphics mode. the advantage here is that kernel messages won't show up on your screen while the DirectFB application is running. blessed silence. ๐คซ[no-]vtโ use VT handling code at all?mouse-source=<device>โ specify the serial mouse device.[no-]mouse-gpm-sourceโ enables using GPM as a mouse input repeater.[no-]motion-compressionโ usually DirectFB compresses mouse motion events. this means subsequent mouse motions get delivered to the application as a single mouse motion event. the result is more responsive but less exact mouse handling. trade-offs, bestie. ๐ฑ๏ธmouse-protocol=<protocol>โ specifies the mouse protocol to use. the following protocols are supported:MSโ two button mouse using the Microsoft mouse protocol.MS3โ three button mouse using an extended Microsoft mouse protocol.MouseManโ three button mouse using a different extension to the Microsoft mouse protocol introduced by Logitech.MouseSystemsโ the most commonly used protocol for three button mice.PS/2โ two/three button mice of the PS/2 series.IMPS/2โ two/three button USB mice with scrolling wheel using the Microsoft Intellimouse protocol.
the different protocols for serial mice are described in more detail in mouse(4).
[no-]leftyโ swaps left and right mouse buttons. useful for left-handers. ๐ซถ[no-]capslock-metaโ maps the CapsLock key to Meta. useful for users of the builtin WM without a Meta key on the keyboard (e.g. the Window key).linux-input-ir-onlyโ ignore all non-IR Linux Input devices.[no-]linux-input-grabโ grab Linux Input devices. when a device is grabbed, only DirectFB will receive events from it. the default is not to grab. ๐ โโ๏ธ[no-]cursorโ by default, DirectFB shows a mouse cursor when an application makes use of windows. this option lets you switch the cursor off permanently. applications cannot enable it explicitly. sorry to them. ๐wm=<wm>โ tells DirectFB which window manager to use. Pick your fave and go ๐bg-noneโ completely disables background handling. Honestly bestie, it doesn't make much sense, because the mouse and moving windows will leave ugly traces all over the background. ๐bg-color=AARRGGBBโ controls the color of the background. It's specified in hexadecimal notation, and the alpha value defaults to full opacity, so you can just omit it. Wanna go bright magenta? You'd usebg-color=FF00FF. ๐bg-image=<filename>โ fills the background with the image from the given file. The image is stretched to fit the screen dimensions.bg-tile=<filename>โ same asbg-image, except it tiles the image to fit the screen dimensions instead of stretching it. โจ[no-]translucent-windowsโ by default, DirectFB windows may be translucent. If you disable this feature, windows are forced to be either fully opaque or fully transparent. Super handy if your graphics card doesn't support alpha-transparent blits.[no-]decorationsโ enables window decorations if the window manager supports them. ๐videoram-limit=<amount>โ limits how much Video RAM DirectFB uses. The amount of Video RAM is specified in Kilobytes.agpmem-limit=<amount>โ limits how much AGP memory DirectFB uses. The amount of AGP memory is specified in Kilobytes.screenshot-dir=<directory>โ if you specify this, DirectFB will dump the screen contents in PPM format into this directory whenever the<Print>key gets pressed. ๐ธdisable-module=<modulename>โ suppresses loading of this module. The module name is the filename without thelibdirectfb_prefix and without extension โ so for examplekeyboardto disable loading of the keyboard input module.[no-]matrox-sgramโ some older Matrox G400 cards have SGRAM, and a bunch of graphics operations are considerably faster on those cards if this feature is enabled.
Do not try to enable it if your card doesn't have SGRAM! Otherwise you'd have to reboot. ๐
[no-]matrox-crtc2โ if you have a dual head G400/G450/G550, you can use this option to enable additional layers using the second head.matrox-tv-standard=[pal|ntsc]โ controls the signal produced by the TV output of Matrox cards.matrox-cable-type=(composite|scart-rgb|scart-composite)โ Matrox cable type (default=composite).h3600-device=<device>โ use this device for the H3600 TS driver.mut-device=<device>โ use this device for the MuTouch driver.penmount-device=<device>โ use this device for the PenMount driver.linux-input-devices=<device>[[,<device>]...]โ use these devices for the Linux Input driver.tslib-devices=<device>[[,<device>]...]โ use these devices for the tslib driver.unichrome-revision=<revision>โ override the hardware revision number used by the Unichrome driver.i8xx_overlay_pipe_bโ redirect videolayer to pixelpipe B.window-surface-policy=<policy>โ lets you control where window surfaces are stored. The supported values for<policy>are:autoโ DirectFB decides depending on hardware capabilities. This is the default.videohighโ swapping system/video with high priority.videolowโ swapping system/video with low priority.systemonlyโ window surfaces are stored in system memory.videoonlyโ window surfaces are stored in video memory.
desktop-buffer-mode=<mode>โ lets you control the desktop buffer mode. Whenever a window is moved, opened, closed, resized, or its contents change, DirectFB recomposites the window stack at the affected region. It does this by blitting together the windows that are visible within that region. Opaque windows are blitted directly, while translucent windows are blitted using alpha blending or color keying. If there's a back buffer, the recomposition isn't visible, since only the final result is copied into the front buffer. Without a back buffer, every step of the recomposition is visible. That causes noticeable flicker unless all windows are opaque.
The supported values for <mode> are:
autoโ DirectFB decides depending on hardware capabilities. This is the default. DirectFB chooses a back buffer in video memory if the hardware supports simple blitting (copying from back to front buffer). If there's no acceleration at all, the back buffer is allocated in system memory, since that gives much better performance for alpha blended recomposition in software and avoids reading from the video memory when the result is copied to the front buffer.backsystemโ the back buffer is allocated in system memory. This is the recommended choice if your hardware supports simple blitting but no alpha blending, and you are going to have many alpha blended windows.backvideoโ front and back buffer are allocated in video memory. It's not required to set this mode explicitly, because theautomode chooses it if blits are accelerated. Without accelerated blits, this mode is not recommended.tripleโ likebackvideo, except the surface is triple buffered.frontonlyโ there is no back buffer. This is the best choice if you are using opaque windows only and don't use any color keying.windowsโ special mode with window buffers directly displayed. This mode requires special hardware support.
vsync-afterโ wait for the vertical retrace after flipping. The default is to wait before doing the flip.vsync-noneโ disables polling for vertical retrace.
โจ EXAMPLES โจ
Here are some examples that demonstrate how the parameters described above are passed to a DirectFB application on the command-line. ๐ซถ
df_neo --dfb:no-hardware
Starts df_neo without hardware acceleration.
df_neo --dfb:help
Lists the DirectFB options that can be passed to df_neo. ๐
๐ OTHER INFO ๐
The canonical place to find informations about DirectFB is at http://www.directfb.org/. Over there you can find the FAQ, tutorials, mailing list archives, the CVS tree, and you can download the latest version of the DirectFB library as well as a number of applications. One-stop shop, fr fr. ๐ฆ
๐ FILES ๐
/etc/directfbrcโ system-wide DirectFB configuration file$HOME/.directfbrcโ per-user DirectFB configuration file/etc/fb.modesโ frame buffer modes file
๐ SEE ALSO ๐
fb.modes(5), fbset(8), mouse(4), ppm(5)
And that's a wrap on the whole page, bestie โ Version 1.7.7, dated 03 Mar 2007, and it still ate. ๐
๐ฆ where this page comes from
- alpine 3.24: directfb-doc 1.7.7-r8 ยท LGPL-2.0-or-later
- debian bookworm: libdirectfb-bin 1.7.7-11 ยท LGPL-2.0-or-later
- ubuntu jammy: libdirectfb-bin 1.7.7-9build1 ยท LGPL-2.0-or-later
- ubuntu noble: libdirectfb-bin 1.7.7-11.1ubuntu2 ยท LGPL-2.0-or-later
- Copyright (C) 2002 Sven Neumann <neo@directfb.org>
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms