VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/installer/VBoxRandR.sh@ 8256

Last change on this file since 8256 was 8178, checked in by vboxsync, 17 years ago

rebranding

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 1.6 KB
Line 
1#!/bin/sh
2#
3# @file
4#
5# Sun xVM VirtualBox
6# X11 guest additions: dynamic display changes
7#
8# Copyright (C) 2008 Sun Microsystems, Inc.
9#
10# This file is part of VirtualBox Open Source Edition (OSE), as
11# available from http://www.virtualbox.org. This file is free software;
12# you can redistribute it and/or modify it under the terms of the GNU
13# General Public License (GPL) as published by the Free Software
14# Foundation, in version 2 as it comes in the "COPYING" file of the
15# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17#
18# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19# Clara, CA 95054 USA or visit http://www.sun.com if you need
20# additional information or have any questions.
21#
22
23#
24# In order to keep things simple, we just call the X11 xrandr application
25# when we receive notification of a display change instead of reimplementing
26# it inside our Guest Additions client application. This saves us among
27# other things having to find ways to build and link the C code on systems
28# which do not support RandR 1.2. We wrap the call to xrandr in this script
29# so that we can make any fiddly adjustments to the call which may be needed.
30#
31
32randrbin=xrandr
33found=`which xrandr | grep "no xrandr"`
34if test ! -z "$found"; then
35 if test -f "/usr/X11/bin/xrandr"; then
36 randrbin=/usr/X11/bin/xrandr
37 else
38 exit 1
39 fi
40fi
41
42if test "$1" = "--test"; then
43 version=`$randrbin -v 2>&1 | sed -n 's/[^0-9]*version 1\.\([0-9]*\)/\1/p'`
44 expr "$version" '>=' 2 2>&1 > /dev/null
45 exit
46fi
47$randrbin --output Virtual\ Output --preferred
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette