- Timestamp:
- Nov 13, 2009 8:18:47 PM (15 years ago)
- Location:
- trunk/src/VBox/Additions
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/Makefile.kmk
r24543 r24651 284 284 $(VBOX_REL_X11_ADD_INST)98vboxadd-xclient \ 285 285 $(VBOX_REL_LNX_ADD_INST)vboxadd.sh \ 286 $(VBOX_REL_X11_ADD_INST)x11config.pl \ 287 $(VBOX_REL_X11_ADD_INST)x11config15.pl \ 286 $(VBOX_REL_X11_ADD_INST)x11config-new.pl \ 288 287 $(VBOX_REL_LNX_INST_SRC)routines.sh 289 288 … … 295 294 $(VBOX_REL_X11_ADD_INST)vboxclient.desktop \ 296 295 $(VBOX_REL_X11_ADD_INST)vboxvideo.ids \ 297 $(VBOX_REL_X11_ADD_INST)linux_xorg_suse11.conf \298 296 $(VBOX_REL_LNX_ADD_INST)90-vboxguest.fdi \ 299 297 selinux-fedora/vbox_x11.pp -
trunk/src/VBox/Additions/linux/installer/vboxadd-x11.sh
r24531 r24651 35 35 PATH=$PATH:/bin:/sbin:/usr/sbin 36 36 LOG="/var/log/vboxadd-install-x11.log" 37 CONFIG_DIR="/var/lib/VBoxGuestAdditions" 38 CONFIG="config" 37 39 38 40 # Find the version of X installed … … 178 180 # syntax: install_x11_startup_app app desktop service_name 179 181 install_x11_startup_app() { 182 self="install_x11_startup_app" 180 183 app_src=$1 181 184 desktop_src=$2 … … 183 186 alt_command=$4 184 187 test -r "$app_src" || 185 { echo "install_x11_startup_app: no script given"; return 1; }188 { echo >> $LOG "$self: no script given"; return 1; } 186 189 test -r "$desktop_src" || 187 { echo "install_x11_startup_app: no desktop file given"; return 1; }190 { echo >> $LOG "$self: no desktop file given"; return 1; } 188 191 test -n "$service_name" || 189 { echo "install_x11_startup_app: no service given"; return 1; }192 { echo >> $LOG "$self: no service given"; return 1; } 190 193 test -n "$alt_command" || 191 { echo "install_x11_startup_app: no service given"; return 1; }194 { echo >> $LOG "$self: no service given"; return 1; } 192 195 app_dest=`basename $app_src sh` 193 196 app_dest_sh=`basename $app_src sh`.sh … … 227 230 return 0 228 231 fi 229 cat << EOF 230 Could not set up the X Window $service_name service. 231 To start the $service_name service at log-in for a given user, 232 add the command $alt_command to the file .xinitrc in their home 233 directory. 232 cat >> $LOG << EOF 233 Could not set up the $service_name desktop service. 234 To start it at log-in for a given user, add the command $alt_command 235 to the file .xinitrc in their home directory. 234 236 EOF 235 237 return 1 … … 257 259 setup() 258 260 { 259 begin "Setting up the X Window System drivers" 261 echo "VirtualBox Guest Additions installation, Window System and desktop setup" > $LOG 262 begin "Installing the Window System drivers" 260 263 lib_dir="/usr/lib/VBoxGuestAdditions" 261 264 share_dir="/usr/share/VBoxGuestAdditions" 262 265 test -x "$lib_dir" -a -x "$share_dir" || 263 266 fail "Invalid Guest Additions configuration found" 264 # By default , we want to run our X Window System configuration script265 dox11config= 1266 # B ut not the special version for X.Org 1.5+267 dox11config15=0268 # And we don't install our SUSE/X.Org 1.5 configuration file by default269 dox11config15suse=0270 # We want to use hal for auto-loading the mouse driver271 use HalForMouse=1267 # By default we want to configure X 268 dox11config="true" 269 # By default, we want to run our xorg.conf setup script 270 setupxorgconf="true" 271 # But without the workaround for SUSE 11.1 not doing input auto-detection 272 newmouse="" 273 # By default we want to use hal for auto-loading the mouse driver 274 usehal="--useHal" 272 275 # And on newer servers, we want to test whether dynamic resizing will work 273 test RandR=1276 testrandr="true" 274 277 # The video driver to install for X.Org 6.9+ 275 278 vboxvideo_src= … … 288 291 289 292 test -z "$x_version" -o -z "$modules_dir" && 290 fail "Could not find X.org or XFree86 on the guest system. The X Window drivers \ 291 will not be installed." 293 fail "Could not find the X.Org or XFree86 Window System." 292 294 293 295 echo … … 296 298 echo "Warning: unsupported pre-release version of X.Org Server installed. Not" 297 299 echo "installing the X.Org drivers." 298 dox11config= 0300 dox11config="" 299 301 ;; 300 302 1.6.99.* | 1.7.* ) … … 302 304 vboxvideo_src=vboxvideo_drv_17.so 303 305 vboxmouse_src=vboxmouse_drv_17.so 304 dox11config=0306 setupxorgconf="" 305 307 ;; 306 308 1.5.99.* | 1.6.* ) … … 308 310 vboxvideo_src=vboxvideo_drv_16.so 309 311 vboxmouse_src=vboxmouse_drv_16.so 310 dox11config15=1311 312 ;; 312 313 1.4.99.* | 1.5.* ) … … 317 318 vboxmouse_src=vboxmouse_drv_15.so 318 319 # SUSE with X.Org 1.5 is a special case, and is handled specially 319 if [ -f /etc/SuSE-release ] 320 then 321 dox11config15suse=1 322 else 323 # This means do a limited configuration for systems with 324 # autodetection support 325 dox11config15=1 326 fi 320 test -r /etc/SuSE-release && 321 { usehal=""; newmouse="--newMouse"; } 327 322 ;; 328 323 1.4.* ) … … 330 325 vboxvideo_src=vboxvideo_drv_14.so 331 326 vboxmouse_src=vboxmouse_drv_14.so 332 use HalForMouse=0327 usehal="" 333 328 ;; 334 329 1.3.* ) … … 338 333 vboxvideo_src=vboxvideo_drv_13.so 339 334 vboxmouse_src=vboxmouse_drv_71.so 340 use HalForMouse=0335 usehal="" 341 336 ;; 342 337 7.1.* | 7.2.* ) … … 344 339 vboxvideo_src=vboxvideo_drv_71.so 345 340 vboxmouse_src=vboxmouse_drv_71.so 346 use HalForMouse=0347 test RandR=0341 usehal="" 342 testrandr="" 348 343 ;; 349 344 6.9.* | 7.0.* ) … … 351 346 vboxvideo_src=vboxvideo_drv_70.so 352 347 vboxmouse_src=vboxmouse_drv_70.so 353 use HalForMouse=0354 test RandR=0348 usehal="" 349 testrandr="" 355 350 ;; 356 351 6.7* | 6.8.* | 4.2.* | 4.3.* ) … … 359 354 ln -s "$lib_dir/vboxvideo_drv.o" "$modules_dir/drivers/vboxvideo_drv.o" 360 355 ln -s "$lib_dir/vboxmouse_drv.o" "$modules_dir/input/vboxmouse_drv.o" 361 useHalForMouse=0 362 testRandR=0 356 usehal="" 357 testrandr="" 358 succ_msg 363 359 ;; 364 360 * ) 365 361 echo "Warning: unknown version of the X Window System installed. Not installing" 366 362 echo "X Window System drivers." 367 dox11config=0 368 useHalForMouse=0 363 dox11config="" 369 364 ;; 370 365 esac … … 376 371 succ_msg 377 372 fi 378 if [ $testRandR -eq 1 ]; then373 if test -n "$testrandr"; then 379 374 # Run VBoxRandR in test mode as it prints out useful information if 380 375 # dynamic resizing can't be used. Don't fail here though. 381 376 /usr/bin/VBoxRandR --test 1>&2 382 377 else 383 echo "You appear to be have an old version of the X Window system installed on" 384 echo "your guest system. Seamless mode and dynamic resizing will not work in" 385 echo "this guest." 386 fi 378 cat << EOF 379 380 You appear to be have an old version of the X Window system installed on your guest system. Seamless mode and dynamic resizing will not work in 381 this guest. 382 383 EOF 384 fi 385 386 if test -n "$dox11config"; then 387 begin "Setting up the Window System to use the Guest Additions" 388 # Certain Ubuntu/Debian versions use a special PCI-id file to identify 389 # video drivers. Some versions have the directory and don't use it. 390 # Those versions can autoload vboxvideo though, so we don't need to 391 # hack the configuration file for them. 392 test -f /etc/debian_version -a -d /usr/share/xserver-xorg/pci && 393 { 394 rm -f "/usr/share/xserver-xorg/pci/vboxvideo.ids" 395 ln -s "$share_dir/vboxvideo.ids" /usr/share/xserver-xorg/pci 2>/dev/null 396 test -n "$usehal" && setupxorgconf="" 397 } 398 399 # Do the XF86Config/xorg.conf hack for those versions that require it 400 configured="" 401 generated="" 402 if test -n "$setupxorgconf"; then 403 for i in $x11conf_files; do 404 if test -r "$i"; then 405 if grep -q "VirtualBox generated" "$i"; then 406 generated="$generated `printf "$i\n"`" 407 else 408 "$lib_dir/x11config-new.pl" $newmouse $usehal "$i" 409 fi 410 configured="true" 411 fi 412 # Timestamp, so that we can see if the config file is changed 413 # by someone else later 414 test -r "$i.vbox" && touch "$i.vbox" 415 done 416 # X.Org Server 1.5 and 1.6 can detect hardware they know, but they 417 # need a configuration file for VBoxVideo. 418 main_cfg="/etc/X11/xorg.conf" 419 nobak="/etc/X11/xorg.vbox.nobak" 420 if test -z "$configured" -a ! -r "$nobak"; then 421 touch "$main_cfg" 422 "$lib_dir/x11config-new.pl" --useHal --noBak "$main_cfg" 423 touch "$nobak" 424 fi 425 fi 426 # X.Org Server versions starting with 1.5 can do mouse auto-detection, 427 # to make our lives easier and spare us the nasty hacks. 428 test -n "$usehal" && 429 if [ -d /etc/hal/fdi/policy ] 430 then 431 # Install hal information about the mouse driver so that X.Org 432 # knows to load it. 433 install -o 0 -g 0 -m 0644 "$share_dir/90-vboxguest.fdi" /etc/hal/fdi/policy 434 # Delete the hal cache so that it notices our fdi file 435 rm -r /var/cache/hald/fdi-cache 2> /dev/null 436 fi 437 succ_msg 438 test -n "$generated" && 439 cat << EOF 440 The following X.Org/XFree86 configuration files were originally generated by 441 the VirtualBox Guest Additions and were not modified: 442 443 $generated 444 445 EOF 446 echo "You may need to restart the Window System to enable the Guest Additions." 447 echo 448 fi 449 450 begin "Installing OpenGL and desktop services components" 387 451 # Install selinux policy for Fedora 7 and 8 to allow the X server to 388 452 # open device files … … 398 462 chcon -t unconfined_execmem_exec_t '/usr/bin/VBoxClient' > /dev/null 2>&1 399 463 semanage fcontext -a -t unconfined_execmem_exec_t '/usr/bin/VBoxClient' > /dev/null 2>&1 400 401 # Certain Ubuntu/Debian versions use a special PCI-id file to identify402 # video drivers. Some versions have the directory and don't use it.403 # Those versions can autoload vboxvideo though, so we don't need to404 # hack the configuration file for them.405 test -f /etc/debian_version -a -d /usr/share/xserver-xorg/pci &&406 {407 rm -f "/usr/share/xserver-xorg/pci/vboxvideo.ids"408 ln -s "$share_dir/vboxvideo.ids" /usr/share/xserver-xorg/pci 2>/dev/null409 test "$useHalForMouse" -eq 1 && doX11Config=0410 }411 412 # Do the XF86Config/xorg.conf hack for those versions that require it413 if [ $dox11config -eq 1 ]414 then415 # Backup any xorg.conf files416 for i in $x11conf_files; do417 test -r "$i" -a ! -f "`dirname $i`/xorg.vbox.nobak" &&418 cp "$i" "$i.vbox"419 done420 if [ $dox11config15suse -eq 1 ]421 then422 cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak 2> /dev/null423 cp "$share_dir/linux_xorg_suse11.conf" /etc/X11/xorg.conf 2> /dev/null424 elif [ $dox11config15 -eq 1 ]425 then426 "$lib_dir/x11config15.pl" >> $LOG 2>&1427 x11configured=0428 for x11configdir in /etc/X11 /etc /usr/etc/X11 /usr/lib/X11429 do430 if [ -e $x11configdir/xorg.conf -o -e $x11configdir/xorg.conf-4 ]431 then432 x11configured=1433 fi434 if [ $x11configured -eq 0 ]435 then436 cat > /etc/X11/xorg.conf << EOF437 # Default xorg.conf for Xorg 1.5+ without PCI_TXT_IDS_PATH enabled.438 #439 # This file was created by VirtualBox Additions installer as it440 # was unable to find any existing configuration file for X.441 442 Section "Device"443 Identifier "VirtualBox Video Card"444 Driver "vboxvideo"445 EndSection446 EOF447 touch /etc/X11/xorg.vbox.nobak448 fi449 done450 else451 "$lib_dir/x11config.pl" >> $LOG 2>&1452 fi453 fi454 455 # X.Org Server versions starting with 1.5 can do mouse auto-detection,456 # to make our lives easier and spare us the nasty hacks.457 if [ $useHalForMouse -eq 1 ]458 then459 # Install hal information about the mouse driver so that X.Org460 # knows to load it.461 if [ -d /etc/hal/fdi/policy ]462 then463 install -o 0 -g 0 -m 0644 "$share_dir/90-vboxguest.fdi" /etc/hal/fdi/policy464 # Delete the hal cache so that it notices our fdi file465 rm -r /var/cache/hald/fdi-cache 2> /dev/null466 fi467 fi468 464 # Install the guest OpenGL drivers 469 465 if [ "$ARCH" = "amd64" ] … … 484 480 485 481 # And set up VBoxClient to start when the X session does 486 install_x11_startup_app "$lib_dir/98vboxadd-xclient" "$share_dir/vboxclient.desktop" VBoxClient VBoxClient-all 482 install_x11_startup_app "$lib_dir/98vboxadd-xclient" "$share_dir/vboxclient.desktop" VBoxClient VBoxClient-all || 483 fail "See the log file $LOG for more information." 484 succ_msg 487 485 } 488 486 … … 491 489 { 492 490 # Restore xorg.conf files as far as possible 493 for i in $x11conf_files; do 494 restored=0 495 if test -f "`dirname $i`/xorg.vbox.nobak"; then 496 rm -f "$i" 2> /dev/null 497 restored=1 498 elif test -r "$i.vbox"; then 499 if ! grep -q -E "vboxvideo|vboxmouse" "$i.vbox"; then 500 mv -f "$i.vbox" "$i" 501 restored=1 491 ## List of generated files which have been changed since we generated them 492 newer="" 493 ## Are we dealing with a legacy information which didn't support 494 # uninstallation? 495 legacy="" 496 ## Do any of the restored configuration files still reference our drivers? 497 failed="" 498 test -r "$CONFIG_DIR/$CONFIG" || legacy="true" 499 main_cfg="/etc/X11/xorg.conf" 500 nobak="/etc/X11/xorg.vbox.nobak" 501 if test -r "$nobak"; then 502 test -r "$main_cfg" && 503 if test "$main_cfg" -ot "$nobak" -o -n "$legacy"; then 504 rm -f "$main_cfg" 505 else 506 newer="$newer`printf " $main_cfg (no original)\n"`" 502 507 fi 503 elif test -r "$i.bak"; then 504 if ! grep -q -E "vboxvideo|vboxmouse" "$i.bak"; then 505 mv -f "$i.bak" "$i" 506 restored=1 508 else 509 for i in $x11conf_files; do 510 if test -r "$i.vbox"; then 511 if test "$i" -ot "$i.vbox" -o -n "$legacy"; then 512 mv -f "$i.vbox" "$i" 513 grep -q -E 'vboxvideo|vboxmouse' "$i" && 514 failed="$failed`printf " $i\n"`" 515 else 516 newer="$newer`printf " $i ($i.vbox)\n"`" 517 fi 507 518 fi 508 elif ! test -f "$i"; then 509 restored=1 510 fi 511 test "$restored" = 1 && 512 rm -f "`dirname $i`/xorg.vbox.nobak" "$i.vbox" 2> /dev/null 513 test "$restored" = 0 && cat << EOF 514 Failed to restore the X server configuration file $i. 515 Please make sure that you reconfigure your X server before it is started 516 again, as otherwise it may fail to start! 519 done 520 fi 521 test -n "$newer" && cat << EOF 522 523 The following X.Org/XFree86 configuration files were not restored, as they may 524 have been changed since they were generated by the VirtualBox Guest Additions. 525 You may wish to restore these manually. The file name in brackets is the 526 original version. 527 528 $newer 529 517 530 EOF 518 done 531 test -n "$failed" && cat << EOF 532 533 The following X.Org/XFree86 configuration files were restored, but still 534 contain references to the Guest Additions drivers. You may wish to check and 535 possibly correct the restored configuration files to be sure that the server 536 will continue to work after it is restarted. 537 538 $newer 539 540 EOF 519 541 520 542 # Remove X.Org drivers -
trunk/src/VBox/Additions/x11/Installer/x11config-new.pl
r24625 r24651 20 20 # 21 21 22 my $temp="/tmp/xorg.conf"; 23 my $os_type=`uname -s`; 24 my @cfg_files = ("/etc/X11/xorg.conf-4", "/etc/X11/xorg.conf", "/etc/X11/.xorg.conf", "/etc/xorg.conf", 25 "/usr/etc/X11/xorg.conf-4", "/usr/etc/X11/xorg.conf", "/usr/lib/X11/xorg.conf-4", 26 "/usr/lib/X11/xorg.conf", "/etc/X11/XF86Config-4", "/etc/X11/XF86Config", 27 "/etc/XF86Config", "/usr/X11R6/etc/X11/XF86Config-4", "/usr/X11R6/etc/X11/XF86Config", 28 "/usr/X11R6/lib/X11/XF86Config-4", "/usr/X11R6/lib/X11/XF86Config"); 29 my $CFG; 30 my $TMP; 22 my $use_hal = 0; 23 my $new_mouse = 0; 24 my $no_bak = 0; 31 25 32 my $config_count = 0; 26 foreach $arg (@ARGV) 27 { 28 if (lc($arg) eq "--usehal") 29 { 30 $use_hal = 1; 31 } 32 elsif (lc($arg) eq "--newmouse") 33 { 34 $new_mouse = 1; 35 } 36 elsif (lc($arg) eq "--nobak") 37 { 38 $no_bak = 1; 39 } 40 else 41 { 42 my $cfg = $arg; 43 my $CFG; 44 my $xkbopts = ""; 45 if (open(CFG, $cfg)) 46 { 47 my $TMP; 48 my $temp = $cfg.".vbox.tmp"; 49 open(TMP, ">$temp") or die "Can't create $TMP: $!\n"; 33 50 34 foreach $cfg (@cfg_files) 35 { 51 my $in_section = 0; 52 print TMP "# VirtualBox generated configuration file\n"; 53 print TMP "# based on $cfg.\n"; 36 54 37 if (open(CFG, $cfg)) 38 { 39 open(TMP, ">$temp") or die "Can't create $TMP: $!\n"; 40 41 my $have_mouse = 0; 42 my $in_section = 0; 43 44 while (defined ($line = <CFG>)) 45 { 46 if ($line =~ /^\s*Section\s*"([a-zA-Z]+)"/i) 55 while (defined ($line = <CFG>)) 47 56 { 48 my $section = lc($1); 49 if (($section eq "inputdevice") || ($section eq "device")) 57 if ($line =~ /^\s*Section\s*"([a-zA-Z]+)"/i) 50 58 { 51 $in_section = 1; 52 } 53 if ($section eq "serverlayout") 54 { 55 $in_layout = 1; 56 } 57 } else { 58 if ($line =~ /^\s*EndSection/i) 59 { 60 $in_section = 0; 61 $in_layout = 0; 62 } 63 } 64 65 if ($in_section) 66 { 67 if ($line =~ /^\s*driver\s+\"(?:mouse|vboxmouse)\"/i) 68 { 69 $line = " Driver \"vboxmouse\"\n Option \"CorePointer\"\n"; 70 $have_mouse = 1 71 } 72 73 # Other drivers sending events interfere badly with pointer integration 74 if ($line =~ /^\s*option\s+\"(?:alwayscore|sendcoreevents|corepointer)\"/i) 75 { 76 $line = ""; 77 } 78 79 # Solaris specific: /dev/kdmouse for PS/2 and not /dev/mouse 80 if ($os_type =~ 'SunOS') 81 { 82 if ($line =~ /^\s*option\s+\"(?:device)\"\s+\"(?:\/dev\/mouse)\"/i) 59 my $section = lc($1); 60 if ( ($section eq "inputdevice") 61 || ($section eq "device") 62 || ($section eq "serverlayout") 63 || ($section eq "screen") 64 || ($section eq "monitor") 65 || ($section eq "keyboard") 66 || ($section eq "pointer")) 83 67 { 84 $line = " Option \"Device\" \"\/dev\/kdmouse\"\n" 68 $in_section = 1; 69 } 70 } else { 71 if ($line =~ /^\s*EndSection/i) 72 { 73 $line = "# " . $line unless $in_section eq 0; 74 $in_section = 0; 85 75 } 86 76 } 87 77 88 if ($ line =~ /^\s*driver\s+\"(?:fbdev|vga|vesa|vboxvideo|ChangeMe)\"/i)78 if ($in_section) 89 79 { 90 $line = " Driver \"vboxvideo\"\n"; 80 # Remember XKB options 81 if ($line =~ /^\s*option\s+\"xkb/i) 82 { 83 $xkbopts = $xkbopts . $line; 84 } 85 $line = "# " . $line; 91 86 } 87 print TMP $line; 92 88 } 93 if ($in_layout) 94 { 95 # Other drivers sending events interfere badly with pointer integration 96 if ( $line =~ /^\s*inputdevice.*\"(?:alwayscore|sendcoreevents)\"/i) 97 { 98 $line = ""; 99 } 89 90 if (!$use_hal && !$new_mouse) { 91 print TMP <<EOF; 92 93 Section "InputDevice" 94 Identifier "mouse" 95 Driver "vboxmouse" 96 Option "Buttons" "9" 97 Option "Device" "/dev/input/mice" 98 Option "Name" "VirtualBox Mouse Buttons" 99 Option "Protocol" "explorerps/2" 100 Option "Vendor" "Sun Microsystems Inc" 101 Option "ZAxisMapping" "4 5" 102 Option "CorePointer" 103 EndSection 104 105 Section "InputDevice" 106 Identifier "keyboard" 107 Driver "keyboard" 108 $xkbopts Option "Protocol" "Standard" 109 Option "CoreKeyboard" 110 EndSection 111 EOF 100 112 } 101 print TMP $line; 113 114 if (!$use_hal && $new_mouse) { 115 print TMP <<EOF; 116 117 Section "InputDevice" 118 Driver "mouse" 119 Identifier "Mouse[1]" 120 Option "Buttons" "9" 121 Option "Device" "/dev/input/mice" 122 Option "Name" "VirtualBox Mouse Buttons" 123 Option "Protocol" "explorerps/2" 124 Option "Vendor" "Sun Microsystems Inc" 125 Option "ZAxisMapping" "4 5" 126 Option "CorePointer" 127 EndSection 128 129 Section "InputDevice" 130 Driver "vboxmouse" 131 Identifier "Mouse[2]" 132 Option "Device" "/dev/vboxguest" 133 Option "Name" "VirtualBox Mouse" 134 Option "Vendor" "Sun Microsystems Inc" 135 Option "SendCoreEvents" 136 EndSection 137 138 Section "InputDevice" 139 Identifier "keyboard[0]" 140 Driver "kbd" 141 $xkbopts Option "Protocol" "Standard" 142 Option "CoreKeyboard" 143 EndSection 144 145 Section "ServerLayout" 146 Identifier "Layout[all]" 147 InputDevice "Keyboard[0]" "CoreKeyboard" 148 InputDevice "Mouse[1]" "CorePointer" 149 InputDevice "Mouse[2]" "SendCoreEvents" 150 Option "Clone" "off" 151 Option "Xinerama" "off" 152 Screen "Screen[0]" 153 EndSection 154 EOF 155 } 156 print TMP <<EOF; 157 158 Section "Monitor" 159 Identifier "Monitor[0]" 160 ModelName "VirtualBox Virtual Output" 161 VendorName "Sun Microsystems Inc" 162 EndSection 163 164 Section "Device" 165 BoardName "VirtualBox Graphics" 166 Driver "vboxvideo" 167 Identifier "Device[0]" 168 VendorName "Sun Microsystems Inc" 169 EndSection 170 171 Section "Screen" 172 SubSection "Display" 173 Depth 24 174 EndSubSection 175 Device "Device[0]" 176 Identifier "Screen[0]" 177 Monitor "Monitor[0]" 178 EndSection 179 EOF 180 close(TMP); 181 182 system("cp", $cfg, $cfg.".vbox") unless 183 ($no_bak eq 1 || -e $cfg.".vbox"); 184 rename $cfg, $cfg.".bak" unless $no_bak eq 1; 185 rename $temp, $cfg; 102 186 } 103 104 if (!$have_mouse) {105 print TMP "\n";106 print TMP "Section \"InputDevice\"\n";107 print TMP " Identifier \"VBoxMouse\"\n";108 print TMP " Driver \"vboxmouse\"\n";109 if ($os_type eq 'SunOS')110 {111 print TMP " Option \"Device\" \"\/dev\/kdmouse\"\n";112 }113 print TMP " Option \"CorePointer\"\n";114 print TMP "EndSection\n";115 }116 close(TMP);117 118 rename $cfg, $cfg.".bak";119 system("cp $temp $cfg");120 unlink $temp;121 122 # Solaris specific: Rename our modified .xorg.conf to xorg.conf for it to be used123 if (($os_type =~ 'SunOS') && ($cfg =~ '/etc/X11/.xorg.conf'))124 {125 system("mv -f $cfg /etc/X11/xorg.conf");126 }127 128 $config_count++;129 187 } 130 188 } 131 132 $config_count != 0 or die "Could not find any X11 configuration files"; 189 exit 0
Note:
See TracChangeset
for help on using the changeset viewer.