Skip to content

Instantly share code, notes, and snippets.

@t-ashula
Created March 18, 2012 08:29
Show Gist options
  • Save t-ashula/2069985 to your computer and use it in GitHub Desktop.
Save t-ashula/2069985 to your computer and use it in GitHub Desktop.
Xvfb on Gentoo
XVFB=/usr/bin/Xvfb
XVFBARGS=":100 -screen 0 1600x1200x24 -auth /etc/conf.d/Xvfb.cfg -nolisten tcp"
PIDFILE=/var/run/Xvfb.pid
#!/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 ${?}
}
# emerge install just what's needed for Xvfb
USE="minimal xvfb -xorg" emerge xorg-server
# create all of the above files in this Gist: /etc/init.d/Xvfb, /etc/conf.d/Xvfb.cfg, /etc/conf.d/Xvfb
chmod +x /etc/init.d/Xvfb
rc-update add Xvfb default
# start Xvfb
/etc/init.d/Xvfb start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment