Skip to content

Instantly share code, notes, and snippets.

@gcaraciolo
Last active September 23, 2016 19:53
Show Gist options
  • Save gcaraciolo/6029aa94d1aa3fc5ed3caa5cf175cb1d to your computer and use it in GitHub Desktop.
Save gcaraciolo/6029aa94d1aa3fc5ed3caa5cf175cb1d to your computer and use it in GitHub Desktop.
Install nightmare ubuntu
XVFB=/usr/bin/Xvfb
XVFBARGS=":99 -screen 0 1024x768x24 -fbdir /var/run -ac"
PIDFILE=/var/run/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
sudo apt-get install build-essential clang libdbus-1-dev libgtk2.0-dev \
libnotify-dev libgnome-keyring-dev libgconf2-dev \
libasound2-dev libcap-dev libcups2-dev libxtst-dev \
libxss1 libnss3-dev gcc-multilib g++-multilib curl \
gperf bison xvfb firefox
- env variable
export DISPLAY=:99
- start
/etc/init.d/xvfb start
- stop
/etc/init.d/xvfb stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment