Skip to content

Instantly share code, notes, and snippets.

@jglick
Created November 27, 2012 14:13
Show Gist options
  • Save jglick/4154417 to your computer and use it in GitHub Desktop.
Save jglick/4154417 to your computer and use it in GitHub Desktop.
Wrapper script to run a command inside XVnc
#!/bin/sh
display=:93
vncserver -kill $display
vncserver $display -desktop "$1 test display" -geometry 1375x975 -depth 16 || exit
trap "vncserver -kill $display" EXIT
vncviewer -passwd ~/.vnc/passwd $display &
export DISPLAY=$display
twm &
"$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment