VirtualBox

Changeset 46563 in vbox


Ignore:
Timestamp:
Jun 14, 2013 3:14:43 PM (11 years ago)
Author:
vboxsync
Message:

Additions/linux: cleaned up xorg.conf set-up and fixed a case when no original file was present.

Location:
trunk/src/VBox/Additions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/installer/vboxadd-x11.sh

    r45135 r46563  
    285285    # By default, we want to run our xorg.conf setup script
    286286    setupxorgconf="true"
    287     # On all but the oldest X servers we want to use our new mouse
    288     # driver.
    289     newmouse="--newMouse"
     287    # All but the oldest supported X servers can automatically set up the
     288    # keyboard driver.
     289    autokeyboard="--autoKeyboard"
    290290    # On more recent servers our kernel mouse driver will be used
    291291    # automatically
     
    410410            vboxmouse_src=vboxmouse_drv.o
    411411            automouse=""
     412            autokeyboard=""  # Actually not true for 6.8, but it doesn't matter.
    412413            ;;
    413414        * )
     
    459460                        generated="$generated  `printf "$i\n"`"
    460461                    else
    461                         "$lib_dir/x11config.sh" $newmouse $automouse $nopsaux "$i"
     462                        "$lib_dir/x11config.sh" $autokeyboard $automouse $nopsaux "$i"
    462463                    fi
    463464                    configured="true"
     
    473474            if test -z "$configured"; then
    474475                touch "$main_cfg"
    475                 "$lib_dir/x11config.sh" $newmouse $automouse $nopsaux --noBak "$main_cfg"
     476                "$lib_dir/x11config.sh" $autokeyboard $automouse $nopsaux --noBak "$main_cfg"
    476477                touch "$nobak"
    477478            fi
  • trunk/src/VBox/Additions/x11/Installer/x11config.sh

    r44528 r46563  
    1515
    1616auto_mouse=""
    17 new_mouse=""
     17auto_keyboard=""
    1818no_bak=""
    1919old_mouse_dev="/dev/psaux"
     
    5656    kbd_drv="`cat "$cfg" | sed -n -e "/$KBD_SECTION/,/$END_SECTION/p" |
    5757             sed -n -e "0,/$DRIVER_KBD/s/$DRIVER_KBD/\\1/p"`"
     58    test -z "${kbd_drv}" && test -z "${auto_keyboard}" && kbd_drv=keyboard
    5859    cat > "$tmp" << EOF
    5960# VirtualBox generated configuration file
     
    7071EndSection
    7172EOF
    72     kbd_layout=""
    73     test -n "$kbd_drv" && kbd_layout='  InputDevice  "Keyboard[0]" "CoreKeyboard"'
    74     test -z "$auto_mouse" -a -z "$new_mouse" && cat >> $tmp << EOF
    75 
    76 Section "InputDevice"
    77   Identifier  "Mouse[1]"
    78   Driver      "vboxmouse"
    79   Option      "Buttons" "9"
    80   Option      "Device" "$old_mouse_dev"
    81   Option      "Name" "VirtualBox Mouse"
    82   Option      "Protocol" "explorerps/2"
    83   Option      "Vendor" "Oracle Corporation"
    84   Option      "ZAxisMapping" "4 5"
    85   Option      "CorePointer"
    86 EndSection
    87 
    88 Section "ServerLayout"
    89   Identifier   "Layout[all]"
    90 $kbd_layout
    91   InputDevice  "Mouse[1]" "CorePointer"
    92   Option       "Clone" "off"
    93   Option       "Xinerama" "off"
    94   Screen       "Screen[0]"
    95 EndSection
    96 EOF
    97 
    98     test -z "$auto_mouse" -a -n "$new_mouse" &&
     73    kbd_line=""
     74    test -n "$kbd_drv" && kbd_line='  InputDevice  "Keyboard[0]" "CoreKeyboard"'
     75    test -z "$auto_mouse" &&
    9976        cat >> "$tmp" << EOF
    10077
     
    12299Section "ServerLayout"
    123100  Identifier   "Layout[all]"
    124   InputDevice  "Keyboard[0]" "CoreKeyboard"
     101${kbd_line}
    125102  InputDevice  "Mouse[1]" "CorePointer"
    126103  InputDevice  "Mouse[2]" "SendCoreEvents"
     
    166143        --autoMouse)
    167144            auto_mouse=1 ;;
    168         --newMouse)
    169             new_mouse=1 ;;
     145        --autoKeyboard)
     146            auto_keyboard=1 ;;
    170147        --noBak)
    171148            no_bak=1 ;;
Note: See TracChangeset for help on using the changeset viewer.

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