1VIRTUALX.SH(1)        User Contributed Perl Documentation       VIRTUALX.SH(1)
2
3
4

NAME

6       BeakerLib - virtualX - Helpers for handling virtual X server
7

DESCRIPTION

9       This module provides a simple way to start and stop virtual X server
10       (framebuffer).
11

FUNCTIONS

13   Virtual X Server
14       Functions providing simple way how to start and stop virtual X server.
15
16       rlVirtualXStart
17
18       Start a virtual X server on a first free display. Tries only first N
19       displays, so you can run out of them.
20
21           rlVirtualXStart name [N]
22
23       name
24           String identifying the X server.
25
26       N   Maximum number of displays to try. Defaults to 3.
27
28       Returns 0 when the server is started successfully.
29
30       rlVirtualXGetDisplay
31
32       Get the DISPLAY variable for specified virtual X server.
33
34           rlVirtualXGetDisplay name
35
36       name
37           String identifying the X server.
38
39       Displays the number of display where specified virtual X server is
40       running to standard output. Returns 0 on success.
41
42       rlVirtualXStop
43
44       Kill the specified X server.
45
46           rlVirtualXStop name
47
48       name
49           String identifying the X server.
50
51       Returns 0 when the server is stopped successfully.
52
53       Example
54
55       Below is a simple example of usage. Note that a lot of usefull
56       debugging information is reported on the DEBUG level, so you can run
57       your test with "DEBUG=1 make run" to get them.
58
59           rlVirtualXStart $TEST
60           rlAssert0 "Virtual X server started" $?
61           export DISPLAY="$( rlVirtualXGetDisplay $TEST )"
62           # ...your test which needs X...
63           rlVirtualXStop $TEST
64           rlAssert0 "Virtual X server killed" $?
65
66       These are "Requires" lines for your scripts - note different package
67       names for different RHEL versions:
68
69           @echo "Requires: xorg-x11-server-Xvfb" >> $(METADATA) # RHEL-5
70           @echo "Requires: xorg-x11-Xvfb"        >> $(METADATA) # RHEL-4
71           @echo "Requires: XFree86-Xvfb"         >> $(METADATA) # RHEL-3
72

AUTHORS

74       •   Jan Hutar <jhutar@redhat.com>
75
76       •   Petr Splichal <psplicha@redhat.com>
77
78
79
80perl v5.38.0                      2023-07-19                    VIRTUALX.SH(1)
Impressum