View previous topic :: View next topic |
Author |
Message |
andyknownasabu Apprentice
Joined: 06 Feb 2003 Posts: 281 Location: Zurich, Switzerland
|
Posted: Tue Mar 28, 2006 10:35 pm Post subject: [Init-Script] Xvfb |
|
|
Hi all,
as I needed Xvfb for my work and wasn't able to find an init-script to automatically start it at boot time I wrote one myself...
And here we are, I hope it will help somebody someday
First, create an initscript called "xvfb" in /etc/init.d/ and put the following in:
Code: | #!/sbin/runscript
# Copyright 2006 Andreas Bulling
# Distributed under the terms of the GNU General Public License v2
start() {
ebegin "Starting virtual X frame buffer: Xvfb"
start-stop-daemon --start --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS
eend ${?}
}
stop() {
ebegin "Stopping virtual X frame buffer: Xvfb"
start-stop-daemon --stop --pidfile $PIDFILE
eend ${?}
}
|
Then create another file also called "xvfb" but in /etc/conf.d/ and put the following in:
Code: | XVFB=/usr/X11R6/bin/Xvfb
XVFBARGS=":1 -auth /etc/conf.d/xvfb.cfg -nolisten tcp"
PIDFILE=/var/run/xvfb.pid
|
With this, Xvfb will be server number 1, won't listen for connections over tcp and will use the authorization config file xvfb.cfg.
The last step is to create this authorization file in /etc/conf.d/xvfb.cfg.
It only contains one line (in the simplest case):
That's it! Have fun using Xvfb (as in my case on a headless system with Apache Tomcat)! _________________ Please, also have a look at:
Global Marshall Plan Initiative
http://www.globalmarshallplan.org/ |
|
Back to top |
|
|
njp963 n00b
Joined: 29 Jul 2004 Posts: 3 Location: London
|
Posted: Mon Dec 18, 2006 11:53 am Post subject: |
|
|
Thanks - just what I was looking for! |
|
Back to top |
|
|
pascalbrax Apprentice
Joined: 21 Jan 2004 Posts: 280 Location: 127.0.0.1
|
Posted: Fri Apr 15, 2011 9:04 am Post subject: |
|
|
LOVE it!
i just had to type Code: | export DISPLAY=":1" | and change the path to Xvfb in the /etc/conf.d/xvfb file, but it works! _________________ "One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|