blob: a529d7e71b6307fa608f3b222769a805454ab448 (
plain) (
tree)
|
|
#!/bin/sh
# If an argument is passed (=URL), set the URL.
# If no arg are passed, set the default test URL.
if [ $# = 0 ]; then
url="http://132.230.4.3/webkitTest.html"
else
url=$1
fi
script_path="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
# to get the path only - not the script name - add
working_path=`dirname "$script_path"`
display_id=$(grep -n $(whoami) /etc/passwd| head -n 1|awk -F : '{print $1}')
# Start QT's virtual framebuffer with proper displayID
/usr/local/Trolltech/Qt-4.7.1/bin/qvfb -width 800 -height 600 -qwsdisplay :$display_id &
# Wait for it to load (needed?) Probably not ;o
sleep 0.1
# Start fbgui.
$working_path/fbgui -display QVFb:$display_id -u $url
# Check if fbbrowser is not running, if so kill the qvfb.
if [ $(ps aux | grep -v grep | grep -c fbgui) -eq 1 ]
then
echo "fbgui is still running ..."
else
echo "fbgui stopped running, killing qvfb ..."
killall qvfb
fi
|