Skip to content

Instantly share code, notes, and snippets.

@dloman
Last active April 22, 2022 23:12
Show Gist options
  • Save dloman/931d65cbb79b00593ac3dd5d0cdf37d9 to your computer and use it in GitHub Desktop.
Save dloman/931d65cbb79b00593ac3dd5d0cdf37d9 to your computer and use it in GitHub Desktop.
sytemd xvfb
[Unit]
Description=X Virtual Frame Buffer Service
After=network.target
[Service]
ExecStart=/usr/bin/Xvfb :1 -screen 0 1024x768x24 -ac +extension GLX +render -noreset
[Install]
WantedBy=multi-user.target
@dloman
Copy link
Author

dloman commented May 4, 2016

you can also templatize the :1 value so if you wanted to start up lots of different servers

@dloman
Copy link
Author

dloman commented May 4, 2016

copy this file into /etc/systemd/system/xvfb.service

then run

sudo systemctl enable /etc/systemd/system/xvfb.service

then to start xvfb run:

sudo systemctl start xvfb.service

and to stop xvfb run:

sudo systemctl stop xvfb.service

@realtebo
Copy link

realtebo commented Jul 7, 2016

Will this script autorun at system startup if I enable it as service?

@dloman
Copy link
Author

dloman commented Oct 1, 2016

no I believe in order to do that you should use the command
sudo systemctl enable xvfb

@moose-byte
Copy link

For reference, here is the /etc/init.d version https://gist.github.com/dloman/8303932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment