个人工具

“UbuntuHelp:Logitech MX610”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的6个中间版本)
第2行: 第2行:
 
{{Languages|UbuntuHelp:Logitech_MX610}}
 
{{Languages|UbuntuHelp:Logitech_MX610}}
 
== Introduction ==
 
== Introduction ==
This guide describes how to obtain full functionality of the [http://www.logitech.com/index.cfm/428/170 Logitech MX 610]. It is still a work in progress. Here, all commands are in fixed-font, <code><nowiki>like this</nowiki></code>.
+
This guide describes how to obtain full functionality of the [http://www.logitech.com/index.cfm/428/170 Logitech MX 610].
 +
Here, all commands are in fixed-font, <code><nowiki>like this</nowiki></code>.
 +
== Ubuntu 10.4 ==
 +
You don't need any special setting for the basic functionalities of the mouse (all the buttons should be working just out of the box.)
 +
If you upgraded from a previous version of Ubuntu and you have problems with this mouse you should:
 +
<ol><li>Unistall Hal if you have it;
 +
</li><li>Make sure that you don't have any udev rule doing anything with your mouse.</li></ol>
 +
 
 +
With Ubuntu 10.4 you can basically ignore everything written below if you're not interested in getting the led working.
 
== General Mouse ==
 
== General Mouse ==
 
Don't even touch the "ConfiguredMouse" default in <code><nowiki>/etc/X11/xorg.conf</nowiki></code> - just add a new input device:
 
Don't even touch the "ConfiguredMouse" default in <code><nowiki>/etc/X11/xorg.conf</nowiki></code> - just add a new input device:
<pre><nowiki>Section "InputDevice"
+
<pre><nowiki>
 +
Section "InputDevice"
 
Identifier "MX610"
 
Identifier "MX610"
 
Driver "evdev"
 
Driver "evdev"
第14行: 第23行:
 
EndSection</nowiki></pre>
 
EndSection</nowiki></pre>
 
Then add it to the devices list:
 
Then add it to the devices list:
<pre><nowiki>Section "ServerLayout"
+
<pre><nowiki>
 +
Section "ServerLayout"
 
[...]
 
[...]
 
Inputdevice "MX610" "SendCoreEvents"
 
Inputdevice "MX610" "SendCoreEvents"
 
EndSection</nowiki></pre>
 
EndSection</nowiki></pre>
 +
=== Using Hal fdi policy ===
 +
Adding both vertical and horizontal scrolling using hal. No need for xorg.conf editing.
 +
'''NB! This is for MX620! Users of MX610 should properly substitute mx620 with mx610'''
 +
Add file: <code><nowiki>/etc/hal/fdi/policy/mx620.fdi</nowiki></code>
 +
Add content:
 +
<pre><nowiki>
 +
<match key="info.product" string="MX620 Laser Cordless Mouse">
 +
<merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
 +
<merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
 +
</match>
 +
</nowiki></pre>
 +
<code><nowiki>info.product</nowiki></code> can be optained using the <code><nowiki>lshal</nowiki></code> command.
 
== Side buttons ==
 
== Side buttons ==
Install <code><nowiki>imwheel</nowiki></code> from <code><nowiki>universe</nowiki></code>. Then change <code><nowiki>/etc/X11/imwheel/startup.conf</nowiki></code> to
+
Install <code><nowiki>xbindkeys</nowiki></code> and <code><nowiki>xautomation</nowiki></code> from <code><nowiki>universe</nowiki></code>. Then create <code><nowiki>~/.xbindkeysrc</nowiki></code> with
<pre><nowiki># Configuration file for setting imwheel startup parameters.
+
<pre><nowiki>
 +
"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L' &"
 +
  b:8
  
# Set this to "1" to make imwheel start along with your X session.
+
"xte 'keydown Alt_L' 'key Right' 'keyup Alt_L' &"
IMWHEEL_START=1
+
  b:9
 
+
</nowiki></pre>
# Specify the command line parameters to pass to imwheel.
+
After starting <code><nowiki>xbindkeys</nowiki></code> you can go back and forth with the side-buttons.
# Simply uncomment the bottom line, and if necessary replace
+
Then add <code><nowiki>xbindkeys</nowiki></code> to <code><nowiki>~/.profile</nowiki></code>.
# the default options with your own. A button spec of "0 0 8 9"
+
# will grab the thumb buttons of most mice. "0 0 0 0 8 9" should
+
# work for mice with a scroll wheel with two axes. Keep in mind
+
# that each button number must be separated by a space.
+
IMWHEEL_PARAMS='-b "0 0 0 0 8 9"'</nowiki></pre>
+
Now add the following code to either <code><nowiki>/etc/X11/imwheel/imwheelrc</nowiki></code> (system-wide config) or <code><nowiki>~/.imwheelrc</nowiki></code> (per-user config) - your choice:
+
<pre><nowiki>".*"
+
None, Thumb1, Alt_L|Left
+
None, Thumb2, Alt_L|Right</nowiki></pre>
+
After restarting <code><nowiki>imwheel</nowiki></code> or rebooting you can go back and forth with the side-buttons.
+
 
== Volume Keys ==
 
== Volume Keys ==
 
No additional software is required to use the volume keys. All you need to do is use "Keyboard Shortcuts." The same can be said for the E-Mail button. By default, they just work in Ubuntu.
 
No additional software is required to use the volume keys. All you need to do is use "Keyboard Shortcuts." The same can be said for the E-Mail button. By default, they just work in Ubuntu.
 
Getting the IM button to function is a little bit more interesting...
 
Getting the IM button to function is a little bit more interesting...
 
== Notification LEDs and their respective buttons ==
 
== Notification LEDs and their respective buttons ==
 +
To get the lights to work for a user, the device must be writable to him/her. To do so, you will need to modify permissions. To do this:
 +
Create the file <code><nowiki>/etc/udev/rules.d/40-permissions.rules</nowiki></code> and add
 +
<pre><nowiki>
 +
# This file establishes permissions and ownership of devices according
 +
# to Ubuntu policy.  See udev(7) for syntax.
 +
#
 +
# The names of the devices must not be set here, but in 20-names.rules;
 +
# user-friendly symlinks (which need no permissions or ownership) should
 +
# be set in 60-symlinks.rules.
 +
 +
# LED devices
 +
KERNEL=="hiddev*",                      MODE="0666"</nowiki></pre>
 +
You will need to restart udev: <code><nowiki>/etc/init.d/udev restart</nowiki></code>. This could cause things to go quirky, so you may want to consider restarting the whole computer altogether.
 +
And since there will be some compiling, make sure the packages <code><nowiki>autoconf automake build-essential checkinstall</nowiki></code> are installed.
 +
If they aren't, just <code><nowiki>sudo apt-get install autoconf automake build-essential checkinstall</nowiki></code>.
 
=== E-Mail ===
 
=== E-Mail ===
 
Bill Hard, a KDE developer, has been working on the notification LEDs since 3/7/2006. We will use his work.
 
Bill Hard, a KDE developer, has been working on the notification LEDs since 3/7/2006. We will use his work.
# To start, download mx610hack-0.3.tar.gz [http://www.kdedevelopers.org/node/2029 here].
+
<ol><li>To start, download mx610hack-0.3.tar.gz [http://www.kdedevelopers.org/node/2029 here].
# Extract the archive.
+
</li><li>Extract the archive.
# Open a console and change the working directory to where you extracted the archive using the <code><nowiki>cd</nowiki></code> command.
+
</li><li>Replace the <code><nowiki>depcomp</nowiki></code> link with the file from [http://www.fastcgi.com/devkit/depcomp here].
# Compile using the usual <code><nowiki>./configure</nowiki></code>, <code><nowiki>make</nowiki></code>, <code><nowiki>sudo make install</nowiki></code> procedure.
+
</li><li>Open a console and change the working directory to where you extracted the archive using the <code><nowiki>cd</nowiki></code> command.
To gain an understanding of how to issue commands, issue the command <code><nowiki>mx610hack --help</nowiki></code>. To get the lights to work for a user, the device must be writable to him/her. To do so, you will need to modify permissions. To do this:
+
</li><li>Compile using the usual <code><nowiki>./configure</nowiki></code>, <code><nowiki>make</nowiki></code>, <code><nowiki>sudo checkinstall</nowiki></code> procedure - dont forget to specify the version or it will fail.</li></ol>
# Open the udev rules for editing: <code><nowiki>sudo nano /etc/udev/rules.d/40-permissions.rules</nowiki></code>.
+
 
# At the end, add the following line: <code><nowiki>KERNEL=="hiddev*",                      MODE="0666"</nowiki></code>
+
To gain an understanding of how to issue commands, issue the command <code><nowiki>mx610hack --help</nowiki></code>.
# Save and exit by pressing Ctrl+O, Enter (you're overwriting the file), and finally Ctrl+X
+
To make use of the light, you can either write a script to execute once you have new mail or install the "mail-notification" package by issuing the command <code><nowiki>sudo apt-get install mail-notification</nowiki></code>.
To make use of the light, you can either write a script to execute once you have new mail or install the "mail-notification" package by issuing the command <code><nowiki>sudo apt-get install mail-notification</nowiki></code>. Don't forget to turn it off somehow.
+
Then configure "mail-notification" to your liking and enable the LED on incoming mail with the command <code><nowiki>mx610hack -p /dev/usb/hiddev0</nowiki></code> and disable it when all mail is read with <code><nowiki>mx610hack -o /dev/usb/hiddev0</nowiki></code>.
=== IM (for Gaim users) ===
+
Perhaps someone will write a plugins for Evolution so it just opens the unread mails successively and then toggles it instead of opening Evolution over and over.
According to this thread in [http://ubuntuforums.org/showthread.php?t=168538 Ubuntu Forums], it is possible to get Gaim to cooperate with this mouse.
+
=== IM (for Pidgin users) ===
# Download the plugin source [http://koti.mbnet.fi/simom/pidgin/mx610-notification/ here].
+
It is possible to get Pigin to cooperate with this mouse:
# Extract the package.
+
<ol><li>Download the plugin source [http://koti.mbnet.fi/simom/pidgin/mx610-notification/ here].
# Open a console and change the working directory to where you extracted the archive.
+
</li><li>Extract the package.
# Install the gaim-dev package: <code><nowiki>sudo apt-get install gaim-dev</nowiki></code>.
+
</li><li>Open a console and change the working directory to where you extracted the archive.
# Compile and install: <code><nowiki>make</nowiki></code> then <code><nowiki>make install</nowiki></code>.
+
</li><li>Install the pidgin-dev package: <code><nowiki>sudo apt-get install pidgin-dev</nowiki></code>.
# Restart Gaim (if running) and enable the plugin via Tools -> Plugins
+
</li><li>Make sure the directory <code><nowiki>~/.purple/plugins</nowiki></code> exists - that's where the plugin is installed.
Caveats: The IM button toggles the buddy list if and only if the buddy list has focus.
+
</li><li>Compile and install: <code><nowiki>make</nowiki></code> then <code><nowiki>make install</nowiki></code>.
== Finishing Up, Acknowledgments ==
+
</li><li>Restart Pidgin (if running) and enable the plugin via Tools -> Plugins
You will need to restart udev: ''/etc/init.d/udev restart''. This could cause things to go quirky, so you may want to consider restarting the whole computer altogether.
+
</li><li>Change <code><nowiki>/dev/hiddev0</nowiki></code> to <code><nowiki>/dev/usb/hiddev0</nowiki></code></li></ol>
 +
 
 +
Now not only a new message makes the LED glow, but the button opens the latest message until all are read - then it toggles the buddy list... neat, isn't it?
 +
== Acknowledgments ==
 
* [http://www.kdedevelopers.org/blog/102 Bill Hard]
 
* [http://www.kdedevelopers.org/blog/102 Bill Hard]
* [http://ubuntuforums.org/showthread.php?t=168538 Ubuntu Forums thread about the MX-610 mouse]
 
 
* [http://koti.mbnet.fi/simom/pidgin/mx610-notification/ Gaim MX-610 Notification Plugin]
 
* [http://koti.mbnet.fi/simom/pidgin/mx610-notification/ Gaim MX-610 Notification Plugin]
 +
* [http://ubuntuforums.org/showthread.php?t=332256 Ubuntu Forums thread about the MX-610 mouse]
 
----
 
----
[[category:CategoryDocumentation]]
+
[[category:CategoryHardware]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月19日 (三) 23:10的最新版本

Introduction

This guide describes how to obtain full functionality of the Logitech MX 610. Here, all commands are in fixed-font, like this.

Ubuntu 10.4

You don't need any special setting for the basic functionalities of the mouse (all the buttons should be working just out of the box.) If you upgraded from a previous version of Ubuntu and you have problems with this mouse you should:

  1. Unistall Hal if you have it;
  2. Make sure that you don't have any udev rule doing anything with your mouse.

With Ubuntu 10.4 you can basically ignore everything written below if you're not interested in getting the led working.

General Mouse

Don't even touch the "ConfiguredMouse" default in /etc/X11/xorg.conf - just add a new input device:

Section "InputDevice"
	Identifier	"MX610"
	Driver		"evdev"
	Option		"Name"	"Logitech USB Receiver"		# see 'cat /proc/bus/input/devices'
	Option		"Phys"	"*/input0"			# this is the mouse part
	Option		"WHEELRelativeAxisButtons" "4 5"	# vertical wheel
	Option		"HWHEELRelativeAxisButtons" "7 6"	# horizontal wheel
EndSection

Then add it to the devices list:

Section "ServerLayout"
	[...]
	Inputdevice	"MX610" "SendCoreEvents"
EndSection

Using Hal fdi policy

Adding both vertical and horizontal scrolling using hal. No need for xorg.conf editing. NB! This is for MX620! Users of MX610 should properly substitute mx620 with mx610 Add file: /etc/hal/fdi/policy/mx620.fdi Add content:

<match key="info.product" string="MX620 Laser Cordless Mouse">
 <merge key="input.x11_options.YAxisMapping" type="string">4 5</merge>
 <merge key="input.x11_options.XAxisMapping" type="string">6 7</merge>
</match>

info.product can be optained using the lshal command.

Side buttons

Install xbindkeys and xautomation from universe. Then create ~/.xbindkeysrc with

"xte 'keydown Alt_L' 'key Left' 'keyup Alt_L' &"
   b:8

"xte 'keydown Alt_L' 'key Right' 'keyup Alt_L' &"
   b:9

After starting xbindkeys you can go back and forth with the side-buttons. Then add xbindkeys to ~/.profile.

Volume Keys

No additional software is required to use the volume keys. All you need to do is use "Keyboard Shortcuts." The same can be said for the E-Mail button. By default, they just work in Ubuntu. Getting the IM button to function is a little bit more interesting...

Notification LEDs and their respective buttons

To get the lights to work for a user, the device must be writable to him/her. To do so, you will need to modify permissions. To do this: Create the file /etc/udev/rules.d/40-permissions.rules and add

# This file establishes permissions and ownership of devices according
# to Ubuntu policy.  See udev(7) for syntax.
#
# The names of the devices must not be set here, but in 20-names.rules;
# user-friendly symlinks (which need no permissions or ownership) should
# be set in 60-symlinks.rules.

# LED devices
KERNEL=="hiddev*",                      MODE="0666"

You will need to restart udev: /etc/init.d/udev restart. This could cause things to go quirky, so you may want to consider restarting the whole computer altogether. And since there will be some compiling, make sure the packages autoconf automake build-essential checkinstall are installed. If they aren't, just sudo apt-get install autoconf automake build-essential checkinstall.

E-Mail

Bill Hard, a KDE developer, has been working on the notification LEDs since 3/7/2006. We will use his work.

  1. To start, download mx610hack-0.3.tar.gz here.
  2. Extract the archive.
  3. Replace the depcomp link with the file from here.
  4. Open a console and change the working directory to where you extracted the archive using the cd command.
  5. Compile using the usual ./configure, make, sudo checkinstall procedure - dont forget to specify the version or it will fail.

To gain an understanding of how to issue commands, issue the command mx610hack --help. To make use of the light, you can either write a script to execute once you have new mail or install the "mail-notification" package by issuing the command sudo apt-get install mail-notification. Then configure "mail-notification" to your liking and enable the LED on incoming mail with the command mx610hack -p /dev/usb/hiddev0 and disable it when all mail is read with mx610hack -o /dev/usb/hiddev0. Perhaps someone will write a plugins for Evolution so it just opens the unread mails successively and then toggles it instead of opening Evolution over and over.

IM (for Pidgin users)

It is possible to get Pigin to cooperate with this mouse:

  1. Download the plugin source here.
  2. Extract the package.
  3. Open a console and change the working directory to where you extracted the archive.
  4. Install the pidgin-dev package: sudo apt-get install pidgin-dev.
  5. Make sure the directory ~/.purple/plugins exists - that's where the plugin is installed.
  6. Compile and install: make then make install.
  7. Restart Pidgin (if running) and enable the plugin via Tools -> Plugins
  8. Change /dev/hiddev0 to /dev/usb/hiddev0

Now not only a new message makes the LED glow, but the button opens the latest message until all are read - then it toggles the buddy list... neat, isn't it?

Acknowledgments