diff options
-rwxr-xr-x | headless-wrapper-example.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/headless-wrapper-example.sh b/headless-wrapper-example.sh new file mode 100755 index 0000000..86f86cb --- /dev/null +++ b/headless-wrapper-example.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# This is an example script for launching +# ServerExecute on systems without an X +# server, a very common use case. +# +# This makes use of Xvfb, since an unpatched +# QtWebKit requires an X server to be running. +# You may also patch your QtWebKit to not +# require X. +# +# Adjust paths as needed and include any +# other initialization you see fit. + +cd $(dirname $0) + +export DISPLAY=":$RANDOM" + +Xvfb $DISPLAY >/dev/null 2>/dev/null & + +./ServerExecute $@ + +kill $(jobs -p) 2>/dev/null >/dev/null |