Last change
on this file since 7884 was 7884, checked in by vboxsync, 17 years ago |
Additions/x11: moved VBoxRandR under x11
|
-
Property svn:eol-style
set to
LF
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Id
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # @file
|
---|
4 | #
|
---|
5 | # X11 guest additions: dynamic display changes
|
---|
6 | #
|
---|
7 | # Copyright (C) 2008 innotek GmbH
|
---|
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 | #
|
---|
19 | # In order to keep things simple, we just call the X11 xrandr application
|
---|
20 | # when we receive notification of a display change instead of reimplementing
|
---|
21 | # it inside our Guest Additions client application. This saves us among
|
---|
22 | # other things having to find ways to build and link the C code on systems
|
---|
23 | # which do not support RandR 1.2. We wrap the call to xrandr in this script
|
---|
24 | # so that we can make any fiddly adjustments to the call which may be needed.
|
---|
25 | #
|
---|
26 |
|
---|
27 | if [ "$1" = "--test" ]
|
---|
28 | then
|
---|
29 | version=`xrandr -v 2>&1 | sed -n 's/[^0-9]\+version 1\.\([0-9]\+\)/\1/p'`
|
---|
30 | expr "$version" '>=' 2 2>&1 > /dev/null
|
---|
31 | exit
|
---|
32 | fi
|
---|
33 | xrandr --output Virtual\ Output --preferred
|
---|
Note:
See
TracBrowser
for help on using the repository browser.