Skip to content

Instantly share code, notes, and snippets.

@Nimrod007
Last active July 10, 2022 12:13
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Nimrod007/53d3151962508ea41e24 to your computer and use it in GitHub Desktop.
Save Nimrod007/53d3151962508ea41e24 to your computer and use it in GitHub Desktop.
Xvfb restart script
echo "restart Xvfb"
kill -9 `ps aux | grep Xvfb | grep -v grep | awk '{print $2}'`
sleep 3
nohup Xvfb :10 -ac > /tmp/Xvfb.log 2>&1 &
echo "Xvfb started"
exit
@Nimrod007
Copy link
Author

small script to restart Xvfb before a jenkins job for example

@jirikrepl
Copy link

works great, I just swap kill -9 from pkill -f Xvfb

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