]>
Commit | Line | Data |
---|---|---|
8058cd41 | 1 | #!/bin/sh |
8058cd41 | 2 | BINFILE=$(basename "$0") |
993bb3f8 | 3 | VBOXDIR=@LIBDIR@/VirtualBox |
8058cd41 | 4 | |
5 | show_message() { | |
6 | if [ ! -z "$DISPLAY" ] && [ -x /usr/bin/gxmessage ]; then | |
4a366de9 | 7 | echo -e "$1" | gxmessage --center --buttons GTK_STOCK_OK -wrap -geometry 400x150 -name $BINFILE -file - |
8058cd41 | 8 | else |
426c6175 | 9 | echo -e "$1" |
8058cd41 | 10 | fi |
11 | } | |
12 | ||
13 | if [ ! -d "$VBOXDIR" ]; then | |
993bb3f8 | 14 | show_message "Can't find VirtualBox libraries! Can't continue!.\nCorrect this situation or contact with your system administrator." |
8058cd41 | 15 | exit 1 |
16 | fi | |
17 | ||
18 | if [ ! -c /dev/vboxdrv ]; then | |
993bb3f8 | 19 | show_message "Special character device /dev/vboxdrv doesn't exists!\nCheck your installation and whether vboxdrv kernel module is loaded." |
8058cd41 | 20 | exit 1 |
21 | fi | |
22 | ||
23 | if [ ! -w /dev/vboxdrv ]; then | |
24 | show_message "You don't have write access to /dev/vboxdrv!\nCorrect this situation or contact with your system administrator." | |
25 | exit 1 | |
26 | fi | |
27 | ||
8e583ef8 KK |
28 | [ "$BINFILE" = "VBoxVRDP" ] && BINFILE="VBoxHeadless" |
29 | ||
426c6175 ER |
30 | export LD_LIBRARY_PATH=$VBOXDIR |
31 | exec $VBOXDIR/$BINFILE ${1:+"$@"} |