XVFB(1)
π NAME π
okay bestie, lemme introduce you to Xvfb β she's a virtual framebuffer X server for X Version 11. no screen, no keyboard, no mouse, all vibes. π
this page lives in the General Commands Manual section, iykyk.
β¨ SYNOPSIS β¨
Xvfb [ option ] ...
yeah that's it. you just throw options at her and she goes π
π¦ DESCRIPTION π¦
okay so Xvfb is an X server that can literally run on machines with no display hardware and no physical input devices. she emulates a dumb framebuffer using virtual memory. that's the whole trick. iconic behavior honestly. πΈ
the primary use of this server was intended to be server testing. the fb code for any depth can be exercised with this server without needing real hardware that supports the desired depths. no cap, that's the original plan.
but then the X community found many other novel uses for Xvfb and honestly? slay. those include:
- testing clients against unusual depths and screen configurations
- doing batch processing with Xvfb as a background rendering engine
- load testing
- as an aid to porting the X server to a new platform
- providing an unobtrusive way to run applications that don't really need an X server but insist on having one anyway π (we've all met that app)
π OPTIONS π
in addition to the normal server options described in the Xserver(1) manual page, Xvfb accepts the following command line switches:
-screen screennum WxHxDβ this option creates screen screennum and sets its width, height, and depth to W, H, and D respectively. by default, only screen 0 exists and has the dimensions1280x1024x24. the default, bestie. she comes pre-loaded. π-pixdepths list-of-depthsβ this option specifies a list of pixmap depths that the server should support in addition to the depths implied by the supported screens. list-of-depths is a space-separated list of integers that can have values from1to32. yes queen, flex those depths. β-fbdir framebuffer-directoryβ this option specifies the directory in which the memory mapped files containing the framebuffer memory should be created. see FILES below. π«Ά this option only exists on machines that have themmapandmsyncsystem calls. (so like, if ur machine can't, she can't. periodt.)-shmemβ this option specifies that the framebuffer should be put in shared memory. the shared memory ID for each screen will be printed by the server. the shared memory is inxwdformat. π this option only exists on machines that support the System V shared memory interface.
if neither-shmemnor-fbdiris specified, the framebuffer memory will be allocated withmalloc().
-linebias nβ this option specifies how to adjust the pixelization of thin lines. the value n is a bitmask of octants in which to prefer an axial step when the Bresenham error term is exactly zero. see the fileXserver/mi/miline.hfor more information. π this option is probably only useful to server developers to experiment with the range of line pixelization possible with thefbcode. (so ngl, if you're not a server dev, this one's not for you, but she's still gorgeous.)-blackpixel pixel-value,-whitepixel pixel-valueβ these options specify the black and white pixel values the server should use. π€π€
π FILES π
the following files are created if the -fbdir option is given. (no -fbdir, no files, bestie β that's just how it is.)
framebuffer-directory/Xvfb_screen<n>β memory mapped file containing screen n's framebuffer memory, one file per screen. the file is inxwdformat. thus, taking a full-screen snapshot can be done with a file copy command, and the resulting snapshot will even contain the cursor image. π wait that's actually so convenient. file copy = screenshot. ate. β¨
π₯ EXAMPLES π₯
okay here's the part where she shows off. feast ur eyes:
Xvfb :1 -screen 0 1600x1200x24
the server will listen for connections as server number 1, and screen 0 will be depth 24 1600x1200.
Xvfb :1 -screen 1 1600x1200x16
the server will listen for connections as server number 1, screen 0 will have the default screen configuration (1280x1024x24), and screen 1 will be depth 16 1600x1200. two screens, one server, main character energy. π
Xvfb -pixdepths 3 27 -fbdir /var/tmp
the server will listen for connections as server number 0, will have the default screen configuration (one screen, 1280x1024x24), will also support pixmap depths of 3 and 27, and will use memory mapped files in /var/tmp for the framebuffer. π
xwud -in /var/tmp/Xvfb_screen0
displays screen 0 of the server started by the preceding example. look at her, connecting the dots. π§
π SEE ALSO π
X(7), Xserver(1), xwd(1), xwud(1), XWDFile.h
go read those too, bestie. expand ur mind. π
π«Ά AUTHORS π«Ά
David P. Wiggins, The Open Group, Inc.
thank you for ur service, legend. πΈ
okay that's the whole page!! π and for the little sign-off at the very bottom: this one's from X Version 11, specifically xorg-server 21.1.25, and it's tagged as XVFB(1) β so that's the section one manual page, periodt. now go start a virtual display and be free. β¨ππ¦
π¦ where this page comes from
- alpine 3.24: xorg-server-doc 21.1.25-r0 Β· MIT
- arch rolling: xorg-server-xvfb 21.1.25-2 Β· MIT AND GPL-2.0-only
- fedora 43: xorg-x11-server-Xvfb 21.1.25-2.fc43 Β· MIT and GPL-2.0-only
- fedora 44: xorg-x11-server-Xvfb 21.1.25-2.fc44 Β· MIT and GPL-2.0-only
- Copyright 1993, 1998 The Open Group
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms