summaryrefslogtreecommitdiffstats
path: root/run.sh
diff options
context:
space:
mode:
authorJonathan Bauer2011-06-24 16:06:30 +0200
committerJonathan Bauer2011-06-24 16:06:30 +0200
commitea78d18c21d3d5862cf7bae40fa7bf8f1e321438 (patch)
tree0c82552d8218de271ed01f76818898f0af74c928 /run.sh
parentstarted command line parsing.. (diff)
downloadfbsplash-ea78d18c21d3d5862cf7bae40fa7bf8f1e321438.tar.gz
fbsplash-ea78d18c21d3d5862cf7bae40fa7bf8f1e321438.tar.xz
fbsplash-ea78d18c21d3d5862cf7bae40fa7bf8f1e321438.zip
scripts changes
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh19
1 files changed, 12 insertions, 7 deletions
diff --git a/run.sh b/run.sh
index 3baee26..61edfcd 100755
--- a/run.sh
+++ b/run.sh
@@ -1,12 +1,17 @@
#!/bin/bash
# All args are passed to fbsplash.
-# Set your QT version here
-QT_VERSION=4.7.2
+# Set the QT version of the qvfb here
+QT_VERSION=Qt-4.7.2
-# qvfb's width
-QVFB_WIDTH=800
-# qvfb's height
-QVFB_HEIGHT=600
+if [ $# -eq 2 ]
+then
+ QVFB_WIDTH=$1
+ QVFB_HEIGHT=$2
+else
+ # qvfb's size
+ QVFB_WIDTH=800
+ QVFB_HEIGHT=600
+fi
# path to script (including script name)
script_path="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
@@ -18,7 +23,7 @@ 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 display_id
-/usr/local/Trolltech/Qt-$QT_VERSION/bin/qvfb -width $QVFB_WIDTH -height $QVFB_HEIGHT -qwsdisplay :$display_id &
+/usr/local/Trolltech/$QT_VERSION/bin/qvfb -width $QVFB_WIDTH -height $QVFB_HEIGHT -qwsdisplay :$display_id &
# quick sleep to wait for qvfb loading
sleep 0.2