“UbuntuHelp:MX510Mouse”的版本间的差异
来自Ubuntu中文
小 (新页面: {{From|https://help.ubuntu.com/community/MX510Mouse}} {{Languages|UbuntuHelp:MX510Mouse}} === 0. Creating backup === First of all, run <code><nowiki>sudo cp /etc/X11/xorg.conf /etc/X11/xo...) |
小 |
||
(未显示同一用户的3个中间版本) | |||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/MX510Mouse}} | {{From|https://help.ubuntu.com/community/MX510Mouse}} | ||
{{Languages|UbuntuHelp:MX510Mouse}} | {{Languages|UbuntuHelp:MX510Mouse}} | ||
+ | == Ubuntu 8.10 and 9.04: == | ||
+ | The MX510 should work more or less as you like it with these versions. | ||
+ | If you like to open a terminal with the "Logitech button" just do the following: | ||
+ | <code><nowiki>nano .xbindkeysrc</nowiki></code> | ||
+ | And write the following: | ||
+ | <pre><nowiki> | ||
+ | "/usr/bin/gnome-terminal" | ||
+ | b:10 | ||
+ | </nowiki></pre> | ||
+ | Save, install xbindkeys ( | ||
+ | <code><nowiki>sudo apt-get install xbindkeys</nowiki></code> | ||
+ | ), and set xbindkeys to start by adding it to: | ||
+ | System -> Preferences -> Startup Applications -> Add -> xbindkeys in all fields. | ||
+ | If you use Opera (version 9.64), you might like to have the thumb-buttons to browse back/(fast) forward. This is done the following way (Opera makes a backup on its own): | ||
+ | Tools -> Preferences -> Advanced -> Shortcuts -> Select "Opera Standard" -> Edit -> Applications -> New | ||
+ | Now you write "Button8" on the left field and "Back" on the right. Press New again, add "Button9" on the left and "Forward | Fast Forward" right. Press "OK" on both forms and everything should work. | ||
+ | == Earlier versions: == | ||
=== 0. Creating backup === | === 0. Creating backup === | ||
First of all, run | First of all, run | ||
第17行: | 第34行: | ||
<code><nowiki>gksudo gedit /etc/X11/xorg.conf</nowiki></code> | <code><nowiki>gksudo gedit /etc/X11/xorg.conf</nowiki></code> | ||
change | change | ||
− | <pre><nowiki>Section "InputDevice" | + | <pre><nowiki> |
+ | Section "InputDevice" | ||
Identifier "Configured Mouse" | Identifier "Configured Mouse" | ||
Driver "mouse" | Driver "mouse" | ||
第27行: | 第45行: | ||
EndSection</nowiki></pre> | EndSection</nowiki></pre> | ||
to | to | ||
− | <pre><nowiki>Section "InputDevice" | + | <pre><nowiki> |
+ | Section "InputDevice" | ||
Identifier "Configured Mouse" | Identifier "Configured Mouse" | ||
Driver "evdev" | Driver "evdev" | ||
第38行: | 第57行: | ||
EndSection</nowiki></pre> | EndSection</nowiki></pre> | ||
(Changed Driver to "evdev", changed "Device" to "/dev/input/[THE EVENT FROM EARLIER]" added Option "Buttons" "10") | (Changed Driver to "evdev", changed "Device" to "/dev/input/[THE EVENT FROM EARLIER]" added Option "Buttons" "10") | ||
− | Restart x by | + | Restart x by logging out and back in, or typing <code><nowiki>sudo /etc/init.d/gdm restart</nowiki></code>, and everything should work. If you can't get back in to gnome, you could revert from backup as stated above and run |
<code><nowiki>sudo /etc/init.d/gdm restart</nowiki></code> | <code><nowiki>sudo /etc/init.d/gdm restart</nowiki></code> | ||
If everything works continue to the next step. | If everything works continue to the next step. | ||
第47行: | 第66行: | ||
<code><nowiki>gedit ~/.xbindkeysrc</nowiki></code> | <code><nowiki>gedit ~/.xbindkeysrc</nowiki></code> | ||
write | write | ||
− | <pre><nowiki>"/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]"" | + | <pre><nowiki> |
+ | "/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]"" | ||
m:0x0 + b:6 | m:0x0 + b:6 | ||
"/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_R]\[Right]"" | "/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_R]\[Right]"" | ||
m:0x0 + b:7 | m:0x0 + b:7 | ||
"/usr/bin/gnome-terminal" | "/usr/bin/gnome-terminal" | ||
− | b:8</nowiki></pre> | + | b:8 |
+ | </nowiki></pre> | ||
and save. (enables back and forward. the last two lines makes the "logitech button" or whatever start a new terminal) | and save. (enables back and forward. the last two lines makes the "logitech button" or whatever start a new terminal) | ||
Then run | Then run | ||
第64行: | 第85行: | ||
<code><nowiki>Option "ButtonMapping" "1 2 3 4 5 9 10 8 6 7"</nowiki></code> | <code><nowiki>Option "ButtonMapping" "1 2 3 4 5 9 10 8 6 7"</nowiki></code> | ||
Ending up with: | Ending up with: | ||
− | <pre><nowiki>Section "InputDevice" | + | <pre><nowiki> |
+ | Section "InputDevice" | ||
Identifier "Configured Mouse" | Identifier "Configured Mouse" | ||
Driver "evdev" | Driver "evdev" | ||
第74行: | 第96行: | ||
Option "Emulate3Buttons" "true" | Option "Emulate3Buttons" "true" | ||
Option "ButtonMapping" "1 2 3 4 5 9 10 8 6 7" | Option "ButtonMapping" "1 2 3 4 5 9 10 8 6 7" | ||
− | EndSection</nowiki></pre> | + | EndSection |
+ | </nowiki></pre> | ||
To test witch buttons are mapped to what you can run the following command in a terminal: | To test witch buttons are mapped to what you can run the following command in a terminal: | ||
<code><nowiki>xev | grep button</nowiki></code> | <code><nowiki>xev | grep button</nowiki></code> | ||
+ | ---- | ||
+ | [[category:CategoryHardware]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2009年11月17日 (二) 20:00的最新版本
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
目录
Ubuntu 8.10 and 9.04:
The MX510 should work more or less as you like it with these versions.
If you like to open a terminal with the "Logitech button" just do the following:
nano .xbindkeysrc
And write the following:
"/usr/bin/gnome-terminal" b:10
Save, install xbindkeys (
sudo apt-get install xbindkeys
), and set xbindkeys to start by adding it to:
System -> Preferences -> Startup Applications -> Add -> xbindkeys in all fields.
If you use Opera (version 9.64), you might like to have the thumb-buttons to browse back/(fast) forward. This is done the following way (Opera makes a backup on its own):
Tools -> Preferences -> Advanced -> Shortcuts -> Select "Opera Standard" -> Edit -> Applications -> New
Now you write "Button8" on the left field and "Back" on the right. Press New again, add "Button9" on the left and "Forward | Fast Forward" right. Press "OK" on both forms and everything should work.
Earlier versions:
0. Creating backup
First of all, run
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf~backup
If your system hangs, you can run
sudo cp /etc/X11/xorg.conf~backup /etc/X11/xorg.conf
to get x back.
1. Changing xorg.conf
cat /proc/bus/input/devices
and find the one with:
N: Name="Logitech USB-PS/2 Optical Mouse"
look at "Handlers", f.ex.
H: Handlers=mouse1 event4
note the number after event, (i.e. event4)
in xorg.conf:
gksudo gedit /etc/X11/xorg.conf
change
Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ImPS/2" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "true" EndSection
to
Section "InputDevice" Identifier "Configured Mouse" Driver "evdev" Option "CorePointer" Option "Device" "/dev/input/event4" Option "Protocol" "ImPS/2" Option "Buttons" "10" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "true" EndSection
(Changed Driver to "evdev", changed "Device" to "/dev/input/[THE EVENT FROM EARLIER]" added Option "Buttons" "10")
Restart x by logging out and back in, or typing sudo /etc/init.d/gdm restart
, and everything should work. If you can't get back in to gnome, you could revert from backup as stated above and run
sudo /etc/init.d/gdm restart
If everything works continue to the next step.
2. Mapping the keys
Install xvkbd and xbindkeys
sudo apt-get install xvkbd xbindkeys
and make the ~/.xbindkeysrc file:
gedit ~/.xbindkeysrc
write
"/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]"" m:0x0 + b:6 "/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_R]\[Right]"" m:0x0 + b:7 "/usr/bin/gnome-terminal" b:8
and save. (enables back and forward. the last two lines makes the "logitech button" or whatever start a new terminal)
Then run
xbindkeys
and everything should work.
Then make xbindkeys start automatically:
System -> Preferences -> Sessions -> Add -> xbindkeys
(3. Eventual problems)
Some users have had problems with wrong mapping of the scroll-buttons.
This can be solved with adding the following line to the "InputDevice" section in xorg.conf:
Option "ButtonMapping" "1 2 3 4 5 9 10 8 6 7"
Ending up with:
Section "InputDevice" Identifier "Configured Mouse" Driver "evdev" Option "CorePointer" Option "Device" "/dev/input/event4" Option "Protocol" "ImPS/2" Option "Buttons" "10" Option "ZAxisMapping" "4 5" Option "Emulate3Buttons" "true" Option "ButtonMapping" "1 2 3 4 5 9 10 8 6 7" EndSection
To test witch buttons are mapped to what you can run the following command in a terminal:
xev | grep button