Sie sind auf Seite 1von 4

Chuck Slivkoffs implementation of X virtual frame buffer as described in doc XWINKBRC0000 !

"#$ %vervie& 'sbin'init$d'(vfb script reads 'etc'rc$confi)$d'(vfb *parameters+ and invokes perl script 'etc'X##'(vfb,daemon-pl 'etc'X##'(vfb,daemon daemoni.es the process and invokes*e(ecs+ /(init passin) parameters 'usr'contrib'bin'X##'(init starts an X *Xhp or Xvfb+ server in frame buffer mode and e(ecutes 'etc'X##'(vfb$(initrc the 'etc'X##'(vfb$(initrc script tells (init to start an (clock and the m&m &indo& mana)er on the Xserver

'sbin'init$d'(vfb start Create X#0screens 122

'etc'rc$confi)$d'(vfb

0erl 'etc'X##'(vfb,daemon$pl e(ec (init 'usr'contrib'bin'X##'(init

Xvfb start creates 'etc'X##'X#0screens if it doesnt e(ist &ith 6Server%ptions Server7ode X8fb

' etc'X##'(vfb$(initr c 3(host 4 Xclock 5 m&m

'usr'bin'X##'Xhp then read X#0screens else Xvfb

' etc'X##'X#0screen s

9ar file contents: 'etc'X##'(vfb$(initrc 11 the script that the command /(init &ill e(ecute 'etc'X##'(vfb,daemon$pl ; daemoni.es the (init process 'etc'rc$confi)$d'(vfb ; confi)uration file for the init script 'sbin'init$d'(vfb 'sbin'init$d'(vfb ; script to startup'shutdo&n'and status (vfb 0lus t&o s<mbolic links that are missin) from the current tar file 9he )or< details flo& as follo&s: 'sbin'init$d'(vfb start Sets the follo&in) variables *also others but are not listed for brevit<+ o %=>0?R=@'usr'contrib'bin'perl o N?W0?R=@'opt'perl'bin'perl o X8AB,C%NAIB@'etc'rc$confi)$d'(vfb o XINI9@'usr'contrib'bin'X##'(init o X8AB,XINI9RC@'etc'X##'(vfb$(initrc o X8AB,>C?7%N@'etc'X##'(vfb,daemon$pl o XD0@'usr'bin'X##'Xhp o X8AB@'usr'bin'X##'Xvfb *in case &e use this Xserver instead of Xhp+ o X8AB,8AB,BR%K?R@'usr'lib'X##'Xserver' brokers'vfb'8fb$# 3 ne&er s<stems lack the le)ac< broker and so this is used to automaticall< s&itch to Xvfb from Xhp Sources 'etc'rc$confi)$d'(vfb *EX8AB,C%NAIB+ &hich brin)s in o X8AB,77C0@# o FS?,XD0@# o X8AB,WI>9D@#0G o X8AB,D?IBD9@!HI o X8AB,>?09D@I o X8AB,>IS0=CJ@#0 *could be set to #1" also to avoid conflicts+ Set lo) file to X8AB,=%B@'var'X##'Xserver'lo)s'Xvfb,E KX8AB,>IS0=CJL$lo) Creates the framebuffer director< if it doesnt e(ist *EX8AB,77C0,>IR+ 9ouches the framebuffer file to create it *EX8AB,77C0,AI=?+ Creates the file 'etc'X##'X#0screens *the number is &hatever X8AB,>IS0=CJ is set to+ &ith =ines of : 6Server%ptions Server7ode X8fbM that tell the Xserver to start in virtual frame buffer mode ?(ecutes perl script ; usuall< comes do&n to o 'usr'contrib'bin'perl 'etc'X##'(vfb,daemon$pl Waits for perl script to daemoni.e and e(its

'etc'X##'(vfb,daemon$pl Aorks process and parent e(its to free up the child and allo& 'sbin'init$d'(vfb to e(it Child sets process )roup to 0 *init+ Sets the uid and )id to daemon ?(ecs the (init command *e(ec E?N8KNX8AB,C%77CN>NLO+ &here from 'sbin'init$d'(vfb

e(port X8AB,C%77CN>@PEXINI9 EX8AB,XINI9RC 11 EX8AB :E KX8AB,>IS0=CJL EX8AB,CRBSP &hich should turn out to be somethin) similar to 'usr'contrib$'bin'X##'(init 'etc'X##'(vfb$(initrc 11 'usr'bin'X##'Xhp :#0 ;screen 0 #0G (!HI(I Q 1fbdir 'var'X##'Xserver'Xvfb,#0

Xinit See 6man (initM$ With the ar)uments passes (init &ill start the Xhp *Xserver+ passin) the screen and fbdir ar)uments$ It &ill then e(ecute 'etc'X##'(vfb$(initrc to start an (clock and 7otif &indo& mana)er *m&m+$ 7&m is the =ast thin) started as it is e(ecuted in the for)round and so never e(its or the Xserver &ill terminate$ Clso if clients are )oin) to be connectin) from other hosts- uncomment the /(host 4 line in the 'etc'X##'(vfb$(initrc file to allo& it$ Xhp 9he Xserver starts and reads the 'etc'X##'X#0screens file *could be a different number dependin) on the settin) of X8AB,>IS0=CJ in 'etc'rc$confi)$d'(vfb$ 9he X#0screens file containin) 6Server%ptions Server7ode X8fbM tells 9he Xserver to start in virtual framebuffer mode and so there &ill be no ke<board'mouse'monitor$ It receives the ReRuest from (init to displa< a clock and talk to the m&m &indo& mana)er$ Chuck has also added a nice feature of )ettin) a status 'sbin'init$d'(vfb status *da.hpa+rc$confi)$d3 'sbin'init$d'(vfb status

Checkin) status of Xvfb server$ 0I> file 'var'run'Xvfb,"$pid e(ists$ Checkin) process I> GS $ 1111111111111111111111111111111111111111111111111 FI> 0I> 00I> C S9I7? 99J 9I7? C7> daemon GS # 0 7ar I T 00:00 'usr'contrib'bin'X##'(init 'etc'X##'(vfb$(initrc 11 'usr'bin'X# 1111111111111111111111111111111111111111111111111 GS is (init$ 'var'run'Xvfb,"$pid seems valid$ Related processes: 0I> 00I> C%77CN> GS # 'usr'contrib'bin'X##'(init 'etc'X##'(vfb$(initrc 11 'usr'bin'X# GSU# GS 'usr'bin'X##'Xhp :" 1screen 0 #0G (!HI(I 1fbdir 'var'X##'Xserve G G# GS m&m Current =o) file: 'var'X##'Xserver'lo)s'Xvfb,"$lo) 1111111111111111111111111111111111111111111111111 1111111111111111111111111111111111111111111111111 ?(it code: 0 Cnd if <ou are on an X displa< <ourself- it &ill popup a screendump taken from the Runnin) Xvfb ; )re< &indo& &ith (clock &ith &indo& border'title sho&in) the m&m Windo& mana)er influence$ 9his is done b< e(ecutin) (&d on Xvfb and then (&ud on <our displa<$

Das könnte Ihnen auch gefallen