aboutsummaryrefslogtreecommitdiffstats
path: root/headless-wrapper-example.sh
blob: 86f86cb29ec854ffb52c758190063231be2c4056 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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