1 | #!/bin/sh
|
---|
2 | ## @file
|
---|
3 | # Start the Guest Additions X11 Client
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2007-2012 Oracle Corporation
|
---|
8 | #
|
---|
9 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | # available from http://www.virtualbox.org. This file is free software;
|
---|
11 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | # General Public License (GPL) as published by the Free Software
|
---|
13 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | #
|
---|
17 |
|
---|
18 | # Sanity check: if non-writeable PID-files are present in the user home
|
---|
19 | # directory VBoxClient will fail to start.
|
---|
20 | for i in $HOME/.vboxclient-*.pid; do
|
---|
21 | test -w $i || rm -f $i
|
---|
22 | done
|
---|
23 |
|
---|
24 | # Check whether the display we are running on running a known buggy version
|
---|
25 | # of X.Org which might crash when we resize.
|
---|
26 | no_display=
|
---|
27 | xorgbin=Xorg
|
---|
28 | found=`which Xorg | grep "no Xorg"`
|
---|
29 | if test ! -z "$found"; then
|
---|
30 | if test -f "/usr/X11/bin/Xorg"; then
|
---|
31 | xorgbin=/usr/X11/bin/Xorg
|
---|
32 | else
|
---|
33 | exit 1
|
---|
34 | fi
|
---|
35 | fi
|
---|
36 | xout=`$xorgbin -version 2>&1`
|
---|
37 | if echo "$xout" | grep "1\.4\.99\.90[12345]" > /dev/null
|
---|
38 | then
|
---|
39 | no_display=1
|
---|
40 | fi
|
---|
41 |
|
---|
42 | /usr/bin/VBoxClient --clipboard
|
---|
43 | /usr/bin/VBoxClient --checkhostversion
|
---|
44 | test -z "$no_display" &&
|
---|
45 | /usr/bin/VBoxClient --display
|
---|
46 | test -z "$no_display" &&
|
---|
47 | /usr/bin/VBoxClient --seamless
|
---|
48 | test -z "$no_display" &&
|
---|
49 | /usr/bin/VBoxClient --draganddrop
|
---|