VIRTUALX.SH(1)
β¨ VIRTUALX.SH(1) β¨
okay so this is a page from the User Contributed Perl Documentation β yes bestie, it's giving perl manual page energy, and honestly? iconic. buckle up π
πΈ NAME πΈ
BeakerLib β the virtualX module, aka your lil helper squad for handling a virtual X server π₯οΈβ¨
π¦ DESCRIPTION π¦
no cap, this module is literally just here to give you a simple way to start and stop a virtual X server (a framebuffer, if you're fancy). that's it. that's the whole vibe check. π
π FUNCTIONS π
π§ Virtual X Server
these functions are the simple way how to start and stop a virtual X server β the whole glow-up, start to finish π
β rlVirtualXStart
starts a virtual X server on a first free display. it only tries the first N displays though, so heads up β you can lowkey run out of them π
rlVirtualXStart name [N]
nameβ a string identifying the X server π·οΈNβ maximum number of displays to try. defaults to3π―
returns 0 when the server is started successfully. slay β
β rlVirtualXGetDisplay
gets you the DISPLAY variable for the specified virtual X server π₯οΈπ«
rlVirtualXGetDisplay name
nameβ a string identifying the X server π·οΈ
it displays the number of the display where the specified virtual X server is running to standard output. returns 0 on success π«Ά
β rlVirtualXStop
kills the specified X server ππͺ (affectionately)
rlVirtualXStop name
nameβ a string identifying the X server π·οΈ
returns 0 when the server is stopped successfully β
π Example π
here's a simple example of usage, bestie. also ngl, a lot of usefull debugging information is reported on the DEBUG level, so you can run your test with DEBUG=1 make run to get them ππ₯
rlVirtualXStart $TEST
rlAssert0 "Virtual X server started" $?
export DISPLAY="$( rlVirtualXGetDisplay $TEST )"
# ...your test which needs X...
rlVirtualXStop $TEST
rlAssert0 "Virtual X server killed" $?
and these are the Requires lines for your scripts β note the different package names for different RHEL versions, this part matters fr fr π
@echo "Requires: xorg-x11-server-Xvfb" >> $(METADATA) # RHEL-5
@echo "Requires: xorg-x11-Xvfb" >> $(METADATA) # RHEL-4
@echo "Requires: XFree86-Xvfb" >> $(METADATA) # RHEL-3
π AUTHORS π
- Jan Hutar
<jhutar@redhat.com>π - Petr Splichal
<psplicha@redhat.com>π
so yeah, that's the whole page π go forth and virtual-X responsibly, bestie π¦
and a lil sign-off from the footer: this gorgeous document came from perl v5.32.1, dated 2026-04-07 β VIRTUALX.SH(1), periodt πβ¨
π¦ where this page comes from
- epel 9: beakerlib 1.33.3-1.el9 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms