VirtualBox

Ignore:
Timestamp:
Jun 14, 2013 3:14:43 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
86427
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.

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