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 to 3 🎯

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