From 0daf1bb0b63780669b4af69d56c7166c7abfd121 Mon Sep 17 00:00:00 2001 From: justheuristic Date: Thu, 25 Jan 2018 15:43:31 +0300 Subject: [PATCH] xvfb script --- xvfb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 xvfb diff --git a/xvfb b/xvfb new file mode 100644 index 0000000..4895de8 --- /dev/null +++ b/xvfb @@ -0,0 +1,25 @@ +#taken from https://gist.github.com/jterrace/2911875 +XVFB=/usr/bin/Xvfb +XVFBARGS=":1 -screen 0 1024x768x24 -ac +extension GLX +render -noreset" +PIDFILE=./xvfb.pid +case "$1" in + start) + echo -n "Starting virtual X frame buffer: Xvfb" + start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS + echo "." + ;; + stop) + echo -n "Stopping virtual X frame buffer: Xvfb" + start-stop-daemon --stop --quiet --pidfile $PIDFILE + echo "." + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: /etc/init.d/xvfb {start|stop|restart}" + exit 1 +esac + +exit 0