summaryrefslogtreecommitdiffstats
path: root/run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/run.sh b/run.sh
index 61edfcd..c0e7ad3 100755
--- a/run.sh
+++ b/run.sh
@@ -3,6 +3,9 @@
# Set the QT version of the qvfb here
QT_VERSION=Qt-4.7.2
+# clear socket, needed? crashes without...
+rm /tmp/foo >/dev/null
+
if [ $# -eq 2 ]
then
QVFB_WIDTH=$1
@@ -13,11 +16,8 @@ else
QVFB_HEIGHT=600
fi
-# path to script (including script name)
-script_path="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
-
-# to get the path only: use dirname which strips the filename from a path
-working_path=`dirname "$script_path"`
+# path to script
+script_path=$(dirname $(readlink -f $0))
# construct unique display_id based on user, needed for multi-user qvfb usage
display_id=$(grep -n $(whoami) /etc/passwd| head -n 1|awk -F : '{print $1}')
@@ -29,5 +29,5 @@ display_id=$(grep -n $(whoami) /etc/passwd| head -n 1|awk -F : '{print $1}')
sleep 0.2
# Start fbsplash connected to QVFb with display_id from above.
-$working_path/build/fbsplash -display QVFb:$display_id $@
+$script_path/bin/fbsplash -display QVFb:$display_id $@
killall qvfb