Skip to content

Instantly share code, notes, and snippets.

@axilleas
Forked from nyxcalamity/xvfb
Last active Apr 25, 2016
Embed
What would you like to do?
/etc/init.d/xvfb service script
#! /bin/sh
### BEGIN INIT INFO
# Provides: Xvfb
# Required-Start: $local_fs $remote_fs
# Required-Stop:
# X-Start-Before:
# Default-Start: 2 3 4 5
# Default-Stop:
### END INIT INFO
XVFB=/usr/bin/Xvfb
XVFB_ARGS=":1 -ac -screen 1 1600x1200x24"
XVFB_LOG=/var/log/xvfb
case "$1" in
start)
echo -n "Starting Xvfb: "
$XVFB $XVFB_ARGS 1>&2 2> $XVFB_LOG &
echo "OK"
;;
stop)
echo -n "Stopping Xvfb: "
killall Xvfb
echo "OK"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/xvfb {start|stop|restart}"
exit 1
;;
esac
exit 0
@axilleas

This comment has been minimized.

Copy link
Owner Author

@axilleas axilleas commented Apr 25, 2016

On ubuntu 14.04 you'll have to first:

apt-get install xvfb psmisc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment