PDA

View Full Version : HOWTO: Configuring Logitech mice in Ubuntu 6.06: New Guide


Pages : [1] 2 3

detyabozhye
July 20th, 2006, 05:21 PM
70.06.19: I've made a major update to this guide for Ubuntu 6.10 and 7.04. Tell me if I made any mistakes.

A COMPLETE guide to a Logitech mouse

Note: Some have complained that this guide is too complicated (they should see the old guide, about twice the length). Well, I won't argue, but I'd like to point out that sections 2 and 3 are optional and there is an alternative method (http://ubuntuforums.org/showpost.php?p=1295974&postcount=13) for Section 1 as well, but my method will greatly increase the functionality of the mouse.

This is my guide on how to get all the buttons working properly on a logitech mouse (loosely based on Endy's guide), how to use lmctl to enable the higher resolutions and cruise control and how to get the side mouse buttons to make forwards and back work in Nautilus, Epiphany, Konqueror, etc.

This works for my mx500, it should work for the similar mx510 and mx518 and the wireless versions like the mx700 however, they may require slightly different configurations. Higher models, such as the MX1000 and the G series definatley need config changes, especially in the xbindkeys area.

Prerequisite: Installing evdev

Evdev was installed by default on my system, but some people didn't have it installed by default. So if you don't, run this command to install it:

sudo apt-get install xserver-xorg-input-evdev

Section 1: Getting your mouse working on USB with evdev

First off you need to plug your mouse into a USB port, you can't do anything else in this how to until you do that.

1. Getting all the information you need

Great, so we're all plugged in via USB and ready to go. Before we change anything we need to get some important information about the mouse so run the following command in your favourite terminal:

cat /proc/bus/input/devices

You should get a list of details, here's what I get and I'll highlight the bit we need to concentrate on:

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=40001
B: SND=6

I: Bus=0003 Vendor=046d Product=c025 Version=1800
N: Name="Logitech USB-PS/2 Optical Mouse"
P: Phys=usb-0000:00:1d.1-1/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1 ts0
B: EV=7
B: KEY=ff0000 0 0 0 0 0 0 0 0
B: REL=103

I: Bus=0003 Vendor=049f Product=000e Version=0100
N: Name="Compaq Compaq Internet Keyboard"
P: Phys=usb-0000:00:1d.1-2/input0
S: Sysfs=/class/input/input2
H: Handlers=kbd event2
B: EV=120003
B: KEY=10000 7 ff87207a c14057ff febeffdf ffefffff ffffffff fffffffe
B: LED=7fff

I: Bus=0003 Vendor=049f Product=000e Version=0100
N: Name="Compaq Compaq Internet Keyboard"
P: Phys=usb-0000:00:1d.1-2/input1
S: Sysfs=/class/input/input3
H: Handlers=kbd event3
B: EV=3
B: KEY=20000 87a 5000d000 1e0000 0 0 0

Note: For mx700 users the mouse name is "Logitech USB Receiver"

2. Adding a udev rule

Adding a udev rule in MOST cases is not necessary anymore, therefore it has been removed.

3. Editing the xorg.conf file

First, let's back it up in case you mess anything up:

sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak

Now we have the information we need to start to set up xorg. So open up your xorg.conf file in your favourite editor, mine is mousepad but as gedit is on everyone elses install by default you can type:

sudo gedit /etc/X11/xorg.conf

Now scroll down to the mouse section and replace it with:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Name" "Logitech USB-PS/2 Optical Mouse" #this should be the name of the device which I made bold here.
EndSection

Make sure you save the changes to your xorg file.

4. Restart udev and Xorg

Warning!
Don't restart yet! Just before we do I have to warn you if you made a mistake in the xorg file X will not start. But don't worry that's why we backed up the previous file. If X fails to start then you will end up in a text console. Log in and type the following to rename the current xorg.conf and restore the previous file:

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf-logi
sudo mv /etc/X11/xorg.conf.bak /etc/X11/xorg.conf

Ok, I'm ready
Now we're prepared, restart evdev by typing:
sudo /etc/init.d/udev restart
Then restart Xorg by logging out and pressing Alt+Ctrl+Backspace. Then log back in.

Section 2: Side buttons and Nautilus, Epiphany, Konqueror, etc (Optional)

We can use "xvkbd" and "xbindkeys" to bind the side mouse buttons to "ALT + LEFT" and "ALT + RIGHT" so they work as forward and backwards in Nautilus.

1. xvkbd and xbindkeys

Lets install "xvkbd" and "xbindkeys":

sudo apt-get install xvkbd xbindkeys

Next we need to create the configuration for them:

gedit ~/.xbindkeysrc

Now paste the following (for MX500, MX510, MX518, MX700):

"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:6
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
m:0x0 + b:7

For mice with a tilt wheel (such as the MX1000), you would most likely change b:6 to b:8 and b:7 to b:9.

Make sure you keep the quote marks, save the file and run "xbindkeys" in the terminal. It runs as a daemon in the background. You should now be able to test if it works in Nautilus by using the side buttons it also works in Epiphany if you use it.

Note: Same as before, if you have different mouse buttons use xev to find out what number they are and change the "b:6" and "b:7" in the above to the correct numbers.

2. Fixing the cruise control buttons (MX500, MX510, MX700, MX1000):

Note: In Edgy and Feisty I haven't noticed this problem anymore (I've had cruise control off for a while though), but I will leave this section here because it hasn't been confirmed that the problem is gone.

Install these packages for "click" to compile:

sudo apt-get install build-essential libx11-dev x11proto-xext-dev libxtst-dev

Download and untar "click" source code into ~/.click (or wherever you want, just remember the dir, you'll need it in the .xbindkeysrc):

cd ~/
wget http://bg.rifetech.com/click.tgz
tar xvfz click.tgz
mv click .click


then compile it:

cd ~/.click
make

Then add this to you .xbindkeysrc (gedit ~/.xbindkeysrc):

"~/.click/click 4"
m:0x0 + b:9
"~/.click/click 5"
m:0x0 + b:10

Note: Mice with more buttons and/or tilt wheels will most likely have different button numbers, please check in xev.

3. Adding it to your session

Now it's working open up the gnome sessions settings "System > Preferences > Sessions" click on the "Startup Programs" tab, click "Add" and enter "xbindkeys". This makes sure it's run each time you log in, you should probably test it by logging out and back in now. If you aren't running GNOME, you will need to do it another way, e.g. in XFCE, go to Xfce Menu -> Settings -> Autostarted Applications.

In KDE (Thanks to msak007), you create a startup script:
kedit ~/.kde/Autostart/start-xbindkeys
Insert this into it:
#!/bin/sh
xbindkeys
Make it executable:
chmod +x ~/.kde/Autostart/start-xbindkeys

Section 3: lomoco (Resolution, etc.) (Optional)

This section is for making sure your mouse is using the best resolution it can, making it more accurate which is pretty handy especially in games where that counts.

1. Getting everything we need

lomoco is in the repositories as of Ubuntu 6.10. Ok so lets install lomoco:

sudo apt-get install lomoco

2. Working lomoco

I use the command "lomoco -8" which you can run now:

sudo lomoco -8

3. Load on boot

We need to add this to a start up script so it's done automatically when the machine boots up, to do this I make a file in /etc/init.d/local where I keep local settings, so lets make that now:

sudo gedit /etc/init.d/local

Now paste the lomoco command, mine like the example above is:

echo "Setting up Logitech mouse..."
lomoco -8

I have the echo line so I can check if it works in the boot messages, it's nice but you don't need it.

To make it executable run the following command:

sudo chmod 755 /etc/init.d/local

Now run the following command to make the "local" script run when the system boots:

sudo update-rc.d local defaults

Now lomoco loads automatically on boot! :)

Conclusion

I think that's everything, phew. I hope it works for you and I haven't made too many mistakes. Please add any corrections and success stories for logitech mice other then the mx500 so we can find out what works.

Thanks to endy's howto, http://floam.sh.nu/guides/mx1000, and the many people who responded to my first howto, especially pietruszka.
Please tell me if you have any problems or if I made any errors.

Edit: Added the need to restart the whole computer for the udev rule to take effect. I think this is where many people had trouble with my last guide.
Edit: Simplified the click downloading and all.
Edit: Added a few notes for those who complain.
Edit: Fixed the click path for xbindkeys.
Edit: Added the requirement for the evdev package since not everybody has it installed by default.
Edit: Replaced LMCtl with lomoco in the instructions
Edit: Fixed a most embarrasing error in the note at the top. :biggrin:
Edit: Added the KDE way to add xbindkeys to the session.
Edit: Did a major upgrade for Edgy and Feisty.
Edit: Replaced the restart part with a command to restart evdev and Xorg.

detyabozhye
July 21st, 2006, 01:52 PM
K, this is the new guide, use the old one (http://ubuntuforums.org/showthread.php?t=188302) ONLY if this one fails any way you try.

NobodySpecial
July 21st, 2006, 08:21 PM
detyabozhye - You rock! This works perfectly with my Logitech G7. 8-)

Just have to use "Logitech USB Receiver". Some extra config is needed for buttons, but no big deal.

detyabozhye
July 21st, 2006, 09:28 PM
Thanks. ^_^ Prayed a lot while trying to get it to work (I do that all the time) so I can't take the credit. ^^;

Alexander Heß
July 23rd, 2006, 09:46 PM
Thanks for the howto. It works quite good on my Notebook.

I just have some problems:

- My MX518 doesn't want to do any cruising, the buttons [+] and [-] don't create any reaction in xev. I've read your comment in the other howto that these buttons work differently on a MX518, but I know for sure that you can set them up to do cruise control in Windows. The standard driver from Logitech allows these buttons to be setup as cruise control. So it should (somehow) be possible on Linux, too.

- My V500 now has all buttons working too, but instead of sending mouse6 on scrolling left and mouse7 on scrolling right, they are switched. Left gives 7 and right gives 6. I tried remapping with xmodmap, but it doesn't work. I guess I'll have to go the xbindkey-route for them to work.

The LMCtl-version you linked in this howto doesn't have support for MX510, MX518, and newer ones. There seems to be a patch for lmctl somewhere, but I couldn't find it with google. But there is a kind of replacement, called lomoco (http://lomoco.linux-gamers.net/) with support for the newer mice.

kpurcell
July 23rd, 2006, 10:34 PM
Then add this to you .xbindkeysrc:

"~/click/click 4"
m:0x0 + b:9
"~/click/click 5"
m:0x0 + b:10

how do I do this?

kpurcell
July 23rd, 2006, 10:36 PM
And also how do I make the wheel button a double click button?

skeeterflea
July 23rd, 2006, 10:53 PM
Quote:
Originally Posted by detyabozhye View Post

Then add this to you .xbindkeysrc:

Code:

"~/click/click 4" m:0x0 + b:9 "~/click/click 5" m:0x0 + b:10


how do I do this?

Yes, everything else was an excellent walk through, until I got here.

Any help is appreciated.

Alexander Heß
July 24th, 2006, 04:12 AM
how do I do this?



gedit ~/.xbindkeysrc

detyabozhye
July 24th, 2006, 02:16 PM
- My MX518 doesn't want to do any cruising, the buttons [+] and [-] don't create any reaction in xev. I've read your comment in the other howto that these buttons work differently on a MX518, but I know for sure that you can set them up to do cruise control in Windows. The standard driver from Logitech allows these buttons to be setup as cruise control. So it should (somehow) be possible on Linux, too.

well, to make it do cruise control, I believe you would do the equiv of $ lmctl --sms using lomoco or something.

- My V500 now has all buttons working too, but instead of sending mouse6 on scrolling left and mouse7 on scrolling right, they are switched. Left gives 7 and right gives 6. I tried remapping with xmodmap, but it doesn't work. I guess I'll have to go the xbindkey-route for them to work.

hmm, what did xmodmap say? It should be possible with xmodmap.

The LMCtl-version you linked in this howto doesn't have support for MX510, MX518, and newer ones. There seems to be a patch for lmctl somewhere, but I couldn't find it with google. But there is a kind of replacement, called lomoco (http://lomoco.linux-gamers.net/) with support for the newer mice.

Does it take all the same commands?

dantx24
July 24th, 2006, 08:57 PM
last time I enabled evdev I started getting "scheduling while atomic: xorg" infinite error loops once I installed xgl / compiz, but the buttons worked. any instances of that under the new guide? Or am i retarded for thinking that the two events were related in the first place?

excellent guides btw.

detyabozhye
July 24th, 2006, 09:07 PM
Honestly, I don't know, since I don't really use Xgl or Compiz right now. It crashed on me too often and Compiz doesn't have all the features I would expect from a window manager yet.

dejitarob
July 24th, 2006, 09:11 PM
For my purposes (MX500) all I had to do is edit /etc/X11/xorg.conf to contain the following under "Configured Mouse:"
Option "Protocol" "ExplorerPS/2"
Option "Buttons" "5"
Option "ZAxisMapping" "4 5"
Option "ButtonMapping" "1 2 3 6 7"This actually works on my Evoluent (http://www.evoluent.com/vm3.html) mouse too :]

detyabozhye
July 24th, 2006, 10:25 PM
Wow, you are making it a lot harder than it is--at least for an MX500. All I had to do is edit /etc/X11/xorg.conf to contain the following:
Option "Buttons" "5"
Option "ZAxisMapping" "4 5"
Option "ButtonMapping" "1 2 3 6 7"

That won't make absolutely ALL of the buttons work, it won't make back/forward work in Nautilus, Thunar, etc, and won't give you 800 CPI resolution. It's a good solution, but I don't settle for just good. I wanted ALL of my buttons working and I wanted to be able to use my mouse at 800 CPI.

gurgle
July 25th, 2006, 12:03 AM
Wow, you are making it a lot harder than it is--at least for an MX500. All I had to do is edit /etc/X11/xorg.conf to contain the following:
Option "Buttons" "5"
Option "ZAxisMapping" "4 5"
Option "ButtonMapping" "1 2 3 6 7"

thanks for that. the OP was too complicated.

I cant believe setting my mx1000 mouse buttons was so much more difficult then winxp

killerjay_47
July 25th, 2006, 12:06 AM
Ok, let's complicate things a little.

I'm working on a laptop, and when I'm plugged in at my desk I use a Logitech LX700 Wireless Keyboard/Mouse combo. Using the above guide as a reference, I was able to make the buttons work for forward and backward. But when I disconnect the mouse to roam, my X server doesn't like the cofiguration and won't load. Then I have to go back in and comment out all the stuff I added in order to make it load X.

Is it possible to make this configuration depend on whether it detects the hardware?

Also, on my mouse there's a top button a little ways behind the scroll wheel that I'd like to map to Ctrl-T for use in firefox opening a new tab. I determined that the button is button #10 using xev, but when I tried to add the line
"/usr/bin/xvkbd -xsendevent -text "\[Control_L]\[T]""
m:0x0 + b:10
to my .xbindkeysrc and run xbindkeys it loads it so that it simply types the character 'T' when I click, and then when I removed the line (and ran xbindkeys again), it didn't stop typing the character. Restarting seemed to fix that, but I can't get the Ctrl-T to work at all. Ideas? Of course, it's moot if I can't get the configuration to work when it's not there.

I must say that I've really appreciated the guide so far.

Thanks,
jay

hubacap
July 25th, 2006, 12:51 AM
I have been ](*,) !!!!

I have the MX1000 and have been trying different things for a week.

I created the 19-local.rules file

KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", NAME="input/event9"

I backed up and edited the Xorg.conf file.
Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Device" "/dev/input/event9"
EndSection

Restarted... that's when the gun just about came out of the cabinet. LOL


My machine started in the text shell... grrrr.

This came from the log file.

(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
That repeated 5 times to make a total of 6.

What am I doing wrong?? I did copy and paste where I could as to reduce typo's. I would really like the full functionality of this great mouse and at the same time have X to run. I just want to much.:-k

ewerx
July 25th, 2006, 03:21 AM
I have a G7 and I also could not start X after the restart.

Output from /proc/bus/input/devices that relate to my mouse:
I: Bus=0003 Vendor=046d Product=c51a Version=4100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.7-4.1.2/input0
S: Sysfs=/class/input/input3
H: Handlers=mouse0 event3 ts0
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143

I: Bus=0003 Vendor=046d Product=c51a Version=4100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.7-4.1.2/input1
S: Sysfs=/class/input/input4
H: Handlers=kbd event4
B: EV=f
B: KEY=c0002 400 0 0 1 f80 78000 6039fa d84157ad 8e0000 0 0 0
B: REL=40
B: ABS=1 0


I'm not sure why there are two listed here, could that be the problem?

My 19-local.rules:
KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", NAME="input/event9"


My xorg.conf is identical to the example.

My X.org log file from the failed restart (only the parts that seem significant, added highlighting on what i think might be the error):
(II) Initializing extension GLX
error opening security policy file /etc/X11/xserver/SecurityPolicy
(**) Option "CoreKeyboard"
(**) Generic Keyboard: Core Keyboard
(**) Option "Protocol" "standard"
(**) Generic Keyboard: Protocol: standard
(**) Option "AutoRepeat" "500 30"
(**) Option "XkbRules" "xorg"
(**) Generic Keyboard: XkbRules: "xorg"
(**) Option "XkbModel" "pc104"
(**) Generic Keyboard: XkbModel: "pc104"
(**) Option "XkbLayout" "us"
(**) Generic Keyboard: XkbLayout: "us"
(**) Option "CustomKeycodes" "off"
(**) Generic Keyboard: CustomKeycodes disabled
(**) Option "Protocol" "ExplorerPS/2"
(**) Configured Mouse: Device: "/dev/input/mice"
(**) Configured Mouse: Protocol: "ExplorerPS/2"
(**) Option "CorePointer"
(**) Configured Mouse: Core Pointer
(**) Option "Device" "/dev/input/mice"
(==) Configured Mouse: Emulate3Buttons, Emulate3Timeout: 50
(**) Option "ZAxisMapping" "4 5"
(**) Configured Mouse: ZAxisMapping: buttons 4 and 5
(**) Configured Mouse: Buttons: 9
(**) Option "SendCoreEvents"
(**) stylus: always reports core events
(**) stylus device is /dev/wacom
(**) stylus is in absolute mode
(**) stylus: forcing TabletPC ISD V4 protocol
(**) WACOM: suppress value is 2
(**) Option "BaudRate" "9600"
(**) stylus: serial speed 9600
(**) Option "SendCoreEvents"
(**) cursor: always reports core events
(**) cursor device is /dev/wacom
(**) cursor is in relative mode
(**) cursor: forcing TabletPC ISD V4 protocol
(**) WACOM: suppress value is 2
(**) Option "BaudRate" "9600"
(**) cursor: serial speed 9600
(**) Option "SendCoreEvents"
(**) eraser: always reports core events
(**) eraser device is /dev/wacom
(**) eraser is in absolute mode
(**) eraser: forcing TabletPC ISD V4 protocol
(**) WACOM: suppress value is 2
(**) Option "BaudRate" "9600"
(**) eraser: serial speed 9600
(II) XINPUT: Adding extended input device "eraser" (type: Wacom Eraser)
(II) XINPUT: Adding extended input device "cursor" (type: Wacom Cursor)
(II) XINPUT: Adding extended input device "stylus" (type: Wacom Stylus)
(II) XINPUT: Adding extended input device "Configured Mouse" (type: MOUSE)
(II) XINPUT: Adding extended input device "Generic Keyboard" (type: KEYBOARD)
(II) XINPUT: Adding extended input device "NVIDIA Event Handler" (type: Other)
(**) Option "Device" "/dev/wacom"
(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
(**) Option "Device" "/dev/wacom"
(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
(**) Option "Device" "/dev/wacom"
(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
(II) Configured Mouse: ps2EnableDataReporting: succeeded
(II) 3rd Button detected: disabling emulate3Button


Looks like the same warnings hubacap is getting... not sure what that wacom stuff is, since I don't have a tablet or anything like that. The Logitech G7 mouse and a Microsoft Keyboard are the only input devices I have.

kpurcell
July 25th, 2006, 02:29 PM
not sure what that wacom stuff is, since I don't have a tablet or anything like that. The Logitech G7 mouse and a Microsoft Keyboard are the only input devices I have.

I'm not sue either. I have no wacom hooked up either but I have it in my xorg.conf file too. If I delete it it stops working.

detyabozhye
July 25th, 2006, 04:50 PM
I'm working on a laptop, and when I'm plugged in at my desk I use a Logitech LX700 Wireless Keyboard/Mouse combo. Using the above guide as a reference, I was able to make the buttons work for forward and backward. But when I disconnect the mouse to roam, my X server doesn't like the cofiguration and won't load. Then I have to go back in and comment out all the stuff I added in order to make it load X.

Is it possible to make this configuration depend on whether it detects the hardware?

I believe someone replaced Option "CorePointer" with Option "SendCoreEvents" "True" to make it work. I haveb't tried it though, so I don't know.

Also, on my mouse there's a top button a little ways behind the scroll wheel that I'd like to map to Ctrl-T for use in firefox opening a new tab. I determined that the button is button #10 using xev, but when I tried to add the line
"/usr/bin/xvkbd -xsendevent -text "\[Control_L]\[T]""
m:0x0 + b:10
to my .xbindkeysrc and run xbindkeys it loads it so that it simply types the character 'T' when I click, and then when I removed the line (and ran xbindkeys again), it didn't stop typing the character. Restarting seemed to fix that, but I can't get the Ctrl-T to work at all. Ideas? Of course, it's moot if I can't get the configuration to work when it's not there.

I must say that I've really appreciated the guide so far.

Thanks,
jay

Try this in your .xbindkeysrc:
"/usr/bin/xvkbd -xsendevent -text "\[Control]\[t]""
m:0x0 + b:10

Remember to first kill xbindkeys before running it again:
killall xbindkeys
xbindkeys

Do itashi mashi te (You're welcome)

detyabozhye
July 25th, 2006, 04:54 PM
I have been ](*,) !!!!

I have the MX1000 and have been trying different things for a week.

I created the 19-local.rules file

KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", NAME="input/event9"

I backed up and edited the Xorg.conf file.
Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Device" "/dev/input/event9"
EndSection

Restarted... that's when the gun just about came out of the cabinet. LOL


My machine started in the text shell... grrrr.

This came from the log file.

(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
That repeated 5 times to make a total of 6.

What am I doing wrong?? I did copy and paste where I could as to reduce typo's. I would really like the full functionality of this great mouse and at the same time have X to run. I just want to much.:-k

Hmm, everything looks correct. Are you running regualr Xorg or Xgl?
Edit: If you're using two devices on one receiver, the post under this one may be helpful.

detyabozhye
July 25th, 2006, 05:13 PM
I have a G7 and I also could not start X after the restart.

Output from /proc/bus/input/devices that relate to my mouse:
I: Bus=0003 Vendor=046d Product=c51a Version=4100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.7-4.1.2/input0
S: Sysfs=/class/input/input3
H: Handlers=mouse0 event3 ts0
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143

I: Bus=0003 Vendor=046d Product=c51a Version=4100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.7-4.1.2/input1
S: Sysfs=/class/input/input4
H: Handlers=kbd event4
B: EV=f
B: KEY=c0002 400 0 0 1 f80 78000 6039fa d84157ad 8e0000 0 0 0
B: REL=40
B: ABS=1 0


I'm not sure why there are two listed here, could that be the problem?

My 19-local.rules:
KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", NAME="input/event9"


My xorg.conf is identical to the example.

My X.org log file from the failed restart (only the parts that seem significant, added highlighting on what i think might be the error):
(II) Initializing extension GLX
error opening security policy file /etc/X11/xserver/SecurityPolicy
(**) Option "CoreKeyboard"
(**) Generic Keyboard: Core Keyboard
(**) Option "Protocol" "standard"
(**) Generic Keyboard: Protocol: standard
(**) Option "AutoRepeat" "500 30"
(**) Option "XkbRules" "xorg"
(**) Generic Keyboard: XkbRules: "xorg"
(**) Option "XkbModel" "pc104"
(**) Generic Keyboard: XkbModel: "pc104"
(**) Option "XkbLayout" "us"
(**) Generic Keyboard: XkbLayout: "us"
(**) Option "CustomKeycodes" "off"
(**) Generic Keyboard: CustomKeycodes disabled
(**) Option "Protocol" "ExplorerPS/2"
(**) Configured Mouse: Device: "/dev/input/mice"
(**) Configured Mouse: Protocol: "ExplorerPS/2"
(**) Option "CorePointer"
(**) Configured Mouse: Core Pointer
(**) Option "Device" "/dev/input/mice"
(==) Configured Mouse: Emulate3Buttons, Emulate3Timeout: 50
(**) Option "ZAxisMapping" "4 5"
(**) Configured Mouse: ZAxisMapping: buttons 4 and 5
(**) Configured Mouse: Buttons: 9
(**) Option "SendCoreEvents"
(**) stylus: always reports core events
(**) stylus device is /dev/wacom
(**) stylus is in absolute mode
(**) stylus: forcing TabletPC ISD V4 protocol
(**) WACOM: suppress value is 2
(**) Option "BaudRate" "9600"
(**) stylus: serial speed 9600
(**) Option "SendCoreEvents"
(**) cursor: always reports core events
(**) cursor device is /dev/wacom
(**) cursor is in relative mode
(**) cursor: forcing TabletPC ISD V4 protocol
(**) WACOM: suppress value is 2
(**) Option "BaudRate" "9600"
(**) cursor: serial speed 9600
(**) Option "SendCoreEvents"
(**) eraser: always reports core events
(**) eraser device is /dev/wacom
(**) eraser is in absolute mode
(**) eraser: forcing TabletPC ISD V4 protocol
(**) WACOM: suppress value is 2
(**) Option "BaudRate" "9600"
(**) eraser: serial speed 9600
(II) XINPUT: Adding extended input device "eraser" (type: Wacom Eraser)
(II) XINPUT: Adding extended input device "cursor" (type: Wacom Cursor)
(II) XINPUT: Adding extended input device "stylus" (type: Wacom Stylus)
(II) XINPUT: Adding extended input device "Configured Mouse" (type: MOUSE)
(II) XINPUT: Adding extended input device "Generic Keyboard" (type: KEYBOARD)
(II) XINPUT: Adding extended input device "NVIDIA Event Handler" (type: Other)
(**) Option "Device" "/dev/wacom"
(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
(**) Option "Device" "/dev/wacom"
(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
(**) Option "Device" "/dev/wacom"
(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
(EE) xf86OpenSerial: Cannot open device /dev/wacom
No such file or directory.
Error opening /dev/wacom : No such file or directory
(II) Configured Mouse: ps2EnableDataReporting: succeeded
(II) 3rd Button detected: disabling emulate3Button


Looks like the same warnings hubacap is getting... not sure what that wacom stuff is, since I don't have a tablet or anything like that. The Logitech G7 mouse and a Microsoft Keyboard are the only input devices I have.

You have both connecting through one reciever, correct? In that case, you'ld have to set up Xorg a bit differently, and you might have to drop the udev rule. I think some people have gotten it to work, but I haven't, so I can't really say how to have both working through one receiver. It might help to look through some comments in the old thread.

These may be helpful:
http://ubuntuforums.org/showpost.php?p=1126893&postcount=45
http://ubuntuforums.org/showpost.php?p=1155987&postcount=62

killerjay_47
July 25th, 2006, 05:48 PM
I was able to get mine working properly using this guide, and mine is a KB/Mouse combo on one receiver. Specifically, I have the Logitech LX700.

My details from the input devices:
I: Bus=0003 Vendor=046d Product=c512 Version=3007
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.1-1.2/input0
S: Sysfs=/class/input/input3
H: Handlers=kbd event3
B: EV=120003
B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe
B: LED=1f

I: Bus=0003 Vendor=046d Product=c512 Version=3007
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.1-1.2/input1
S: Sysfs=/class/input/input4
H: Handlers=kbd mouse1 event4 ts1
B: EV=7
B: KEY=7fffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0 0 1878 d800d100 1e0000 0 0 0
B: REL=143

My 19-local.rules:
KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", NAME="input/event9"

My xorg.conf before trying what detyabozhye has suggested. It works whenever the mouse is plugged in, but not when the mouse is dosconnected.
Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Device" "/dev/input/event9"
Option "Buttons" "10"
Option "ZAxisMapping" "4 5"
EndSection

My .xbindkeys is the same as his, with a couple more options added.

I hope some of this might be of help. Best of luck; I'm off to try this when the mouse is disconnected. BTW, I got the Ctrl-T working. Thanks.

Jay


EDIT: what you suggested worked, thanks. Now, how do I get the xbindkeys daemon to run automatically when I boot?

detyabozhye
July 25th, 2006, 06:22 PM
what you suggested worked, thanks. Now, how do I get the xbindkeys daemon to run automatically when I boot?

If you're running Gnome, go to "System > Preferences > Sessions" click on the "Startup Programs" tab, click "Add" and enter "xbindkeys".

In Xfce go to Xfce Menu -> Settings -> Autostarted Applications and click Add.

As for KDE, I'm not sure what the correct way is.

kpurcell
July 25th, 2006, 09:05 PM
I tried the simple approach, ignoring the udev stuff and just added the lines at the end of my mouse section in xorg.conf. It is as follows:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Buttons" "5"
Option "ZAxisMapping" "4 5"
Option "ButtonMapping" "1 2 3 6 7"
EndSection

So now my MX1000 cruise up button instead goes back. And my the thumb button closest to me does too. What I'd really like is to have the cruis up to cruis up and the cruise down to cruise down. I'd also like the side buttons to go band and forth like they are supposed to and the wheel button I'd like to double click when I push it. Any way to do that? Or at least some of it without all this crazy, complicated stuff. could someone post what the button mapping numbers mean and then I could just configure it the way I want.

detyabozhye
July 25th, 2006, 09:47 PM
I tried the simple approach, ignoring the udev stuff and just added the lines at the end of my mouse section in xorg.conf. It is as follows:

Quote:Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ExplorerPS/2"
Option "Buttons" "5"
Option "ZAxisMapping" "4 5"
Option "ButtonMapping" "1 2 3 6 7"
EndSection

So now my MX1000 cruise up button instead goes back. And my the thumb button closest to me does too. What I'd really like is to have the cruis up to cruis up and the cruise down to cruise down. I'd also like the side buttons to go band and forth like they are supposed to and the wheel button I'd like to double click when I push it. Any way to do that? Or at least some of it without all this crazy, complicated stuff. could someone post what the button mapping numbers mean and then I could just configure it the way I want.

Note the Protocol, it's "ExplorerPS/2", it's meant for MS IntelliMouse Explorer. It will not work with all the Logitech buttons correctly no matter what you set the "ButtonMapping" to, I tried it. I don't mind anyone using that method, but you'll have to live with some buttons functioning incorrectly.

BTW, you will still need to set up xbindkeys, LMCtl, etc IF you want it to do 800+ CPI, Back/Forward in Nautilus or whatever. The "simple" method is only a replacement for the udev and evdev part, not for the rest of this guide. If I wrote this guide using the "simple method", it would still be two thirds the length.

BatteryCell
July 25th, 2006, 10:53 PM
Lol well this ended for me early, when I first went to change xorg.conf (after the udev thing), the X server kinda booted then didnt. Im using nvidia drivers and indeed the little nvidia picture showed up as it was supposed to. However after that it went back to the loading screen (usually it then proceeds to login). Any reason why this happens?

detyabozhye
July 25th, 2006, 11:11 PM
Don't know, I had that a lot when testing the current evdev. Can you tell me a bit about your mouse, setup, and give me the output of "cat /proc/bus/input/devices"? The current evdev is just a bit too picky. My old guide (http://ubuntuforums.org/showthread.php?t=188302) is a bit more relliable, but a bit hacky as well and longer in length.

zergberg
July 25th, 2006, 11:30 PM
I have the Wacom thing too. I'm not sure why it's there, but you can safely comment out the device references if you also comment out "stylus", "cursor", and "eraser" in the "Server Layout" section of xorg.conf, near the bottom.

It doesn't help anything, but it at least supresses those annoying error messages that scroll off the relevant errors when X fails to start.

BatteryCell
July 25th, 2006, 11:47 PM
Heres the output of cat /proc/bus/input/devices
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=402000000 3802078f840d001 f2ffffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input2
H: Handlers=kbd event2
B: EV=40001
B: SND=6

I: Bus=0000 Vendor=001f Product=001f Version=0000
N: Name="Mouseemu virtual keyboard"
P: Phys=
S: Sysfs=/class/input/input3
H: Handlers=kbd event3
B: EV=100003
B: KEY=1ffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffff

I: Bus=0000 Vendor=001f Product=001e Version=0000
N: Name="Mouseemu virtual mouse"
P: Phys=
S: Sysfs=/class/input/input4
H: Handlers=mouse1 event4 ts1
B: EV=7
B: KEY=70000 0 0 0 0
B: REL=103

I: Bus=0005 Vendor=045e Product=007b Version=0039
N: Name="Microsoft Bluetooth keyboard"
P: Phys=00:50:F2:E1:B6:20
S: Sysfs=/class/input/input5
H: Handlers=kbd event5
B: EV=12000b
B: KEY=3 ffff000000000007 ff8018780803ffff fffeffdff3cfffff fffffffffffffffe
B: ABS=1f0000000000
B: LED=407

I: Bus=0003 Vendor=046d Product=c01e Version=2200
N: Name="Logitech USB-PS/2 Optical Mouse"
P: Phys=usb-0000:00:02.0-8/input0
S: Sysfs=/class/input/input14
H: Handlers=mouse0 event1 ts0
B: EV=7
B: KEY=ff0000 0 0 0 0
B: REL=103

Note that this is after I tried to do the guide.

As to the setup:
the comps a a64 runnin kubuntu dapper drake (Linux kubuntu 2.6.15-26-amd64-generic)
mouse is a mx518

graphics an evga 7900 gt
hd is a seagate 160 gig
cpu is a 3800
mobo is an asus a8n sli dlx
1 gig ram

Thats pretty much it, oh and thanks for the help :-)

hubacap
July 26th, 2006, 12:46 AM
Hmm, everything looks correct. Are you running regualr Xorg or Xgl?
Edit: If you're using two devices on one receiver, the post under this one may be helpful.

I am using Ubuntu right out of the box so I am assuming that it is Xorg, and I have only one device on this reciever, KB is ps2.

After creating the evdev rule and especially after a reboot shouldn't it show up on a ls /dev/input/ ? It wasn't, so I remembered another tutorial on the subject and added ACTION=="add" to my rules file to read:
ACTION=="add", KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", NAME="input/event9" It shows up now but X still wont start after double checking for typo's and syntax errors ( limited knowledge on syntax but I tried to duplicate my interpretation of your tutorial).

](*,)](*,)](*,)](*,)](*,) << I love this guy, he reminds me of me, never give up, he WILL break through that wall..... one day.

EDIT: Ok, didn't realise that I needed to look at the old log file so here is the error output pertaining to the mouse.
(EE) PreInit returned NULL for "Configured Mouse"
The /dev/wacom error is still present in both log files so I assume that it has nothing to do with the mouse problem.

Eugene Seppel
July 26th, 2006, 09:46 AM
Thank you for HOWTO!

And how can i overlock MX510 mouse, like in Windows?
USB max speed for mouse is 125Hz, but one program for Windows XP can overlock it up to 1000Hz (by changing driver).
I want 250Hz..

ewerx
July 26th, 2006, 11:11 AM
You have both connecting through one reciever, correct? In that case, you'ld have to set up Xorg a bit differently, and you might have to drop the udev rule. I think some people have gotten it to work, but I haven't, so I can't really say how to have both working through one receiver. It might help to look through some comments in the old thread.

These may be helpful:
http://ubuntuforums.org/showpost.php?p=1126893&postcount=45
http://ubuntuforums.org/showpost.php?p=1155987&postcount=62

Actually no. My keyboard is a regular Microsoft wired USB keyboard. My mouse is the Logitech G7 cordless. I have the G7 receiver connected to my monitor's USB hub, and the keyboard goes straight to the back of the PC.
I don't really get why I would have 2 devices under the Logitech receiver -- I only have 1 cordless device, the mouse. But I'll check out those links when I have time and see if they help...

BatteryCell
July 26th, 2006, 11:29 AM
Lol I feel stupid, the evdev driver wasnt installed... Ok I gotta go do the rest of the tutorial :D

BatteryCell
July 26th, 2006, 11:49 AM
Ok everything works (the on the fly 400 800 and 1600 are good enough for me :) )
However, I was just wondering how you would bind the change application button (in windows when u hit it it gives you a little box with all the windows open and you can pick which one, its the one on the mx518 right below the lower reso.) to ALT-TAB (which does the same thing).

Im guessing it would be something like:
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Tab]""
m:0x0 + b:8

in /root/.xbindkeysrc
Though I dont know which button the change app. button is...

Another qustion, the mouse pointer sometimes freezes on the screen and the only thing that will fix it is if I unplug and replug the mouse. Just wondering what is causing this because I have had to move the usb to a front port so that it isnt so hard to unplug and relug and its real ugly...
The only thing that I changed before this started happening is that I overclocked my cpu just a little, though I dont see how thats causing it and when I stop overclocking it still happened. (This comps a dual boot, and in windows the same thing happens cept a simple tap of the alt key fixes the mouse, which is still annoying).

detyabozhye
July 26th, 2006, 02:56 PM
Thank you for HOWTO!

And how can i overlock MX510 mouse, like in Windows?
USB max speed for mouse is 125Hz, but one program for Windows XP can overlock it up to 1000Hz (by changing driver).
I want 250Hz..

This may be helpful: http://www.linux-gamers.net/modules/wiwimod/index.php?page=HOWTO+USBPolling&back=HOWTO+INDEX+Hardware

detyabozhye
July 26th, 2006, 03:09 PM
After creating the evdev rule and especially after a reboot shouldn't it show up on a ls /dev/input/ ? It wasn't, so I remembered another tutorial on the subject and added ACTION=="add" to my rules file to read:
ACTION=="add", KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", NAME="input/event9" It shows up now but X still wont start after double checking for typo's and syntax errors ( limited knowledge on syntax but I tried to duplicate my interpretation of your tutorial).

Hmm, the udev rule should work without ACTION="add", what was your cat /proc/bus/input/devices again?

](*,)](*,)](*,)](*,)](*,) << I love this guy, he reminds me of me, never give up, he WILL break through that wall..... one day.

EDIT: Ok, didn't realise that I needed to look at the old log file so here is the error output pertaining to the mouse.
(EE) PreInit returned NULL for "Configured Mouse"
The /dev/wacom error is still present in both log files so I assume that it has nothing to do with the mouse problem.

Yeah, the wacom has nothing to do with it. Though on another note, it's weird that Ubuntu sets up Xorg as though it has a wacom device even if it doesn't in the first place. :-k

detyabozhye
July 26th, 2006, 03:12 PM
Actually no. My keyboard is a regular Microsoft wired USB keyboard. My mouse is the Logitech G7 cordless. I have the G7 receiver connected to my monitor's USB hub, and the keyboard goes straight to the back of the PC.
I don't really get why I would have 2 devices under the Logitech receiver -- I only have 1 cordless device, the mouse. But I'll check out those links when I have time and see if they help...

Yeah, but your reciever seems to be recognized as both a keyboard and mouse. So somehow, you'll need to target only the mouse part.

detyabozhye
July 26th, 2006, 03:21 PM
Ok everything works (the on the fly 400 800 and 1600 are good enough for me :) )
However, I was just wondering how you would bind the change application button (in windows when u hit it it gives you a little box with all the windows open and you can pick which one, its the one on the mx518 right below the lower reso.) to ALT-TAB (which does the same thing).

Im guessing it would be something like:
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Tab]""
m:0x0 + b:8

in /root/.xbindkeysrc
Though I dont know which button the change app. button is...

Use xev to find out which button it is. As for using it for ALT+TAB, at the moment, that's not really possible. When you do ALT+TAB, you hold ALT and press TAB a few times till you get to the app you want to get to. xbindkeys will only do a press and release of ALT+TAB. You would need to build an app yourself to do that. I started planning one, but never really got to it.

Another qustion, the mouse pointer sometimes freezes on the screen and the only thing that will fix it is if I unplug and replug the mouse. Just wondering what is causing this because I have had to move the usb to a front port so that it isnt so hard to unplug and relug and its real ugly...
The only thing that I changed before this started happening is that I overclocked my cpu just a little, though I dont see how thats causing it and when I stop overclocking it still happened. (This comps a dual boot, and in windows the same thing happens cept a simple tap of the alt key fixes the mouse, which is still annoying).

hmm, looks like a hardware issue to me. I don't know.

BatteryCell
July 26th, 2006, 03:34 PM
Um just pressing alt-F5 works too...and its button 8 so:
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[F5]""
m:0x0 + b:8
But that doesnt seem to work on mine...
And other people have said its hardware as well but i dont see how it could be seeing as I just bought a new mouse (takin the advice) and its still happening, and the vid cards pretty new 2 so...Maybe its the drivers...Ill check on that.

edit:
Wait it does work but only if all windows are minimized.

MilesTEG1
July 26th, 2006, 04:04 PM
Hello, does it function with the Logitech G5 ?
I have those lines with the cat /proc/bus/input/devices :
I: Bus=0003 Vendor=046d Product=c041 Version=4600
N: Name="Logitech USB Gaming Mouse"
P: Phys=usb-0000:00:02.0-1/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1 ts0
B: EV=7
B: KEY=ffff0000 0 0 0 0
B: REL=143

detyabozhye
July 26th, 2006, 04:29 PM
It should. You'll just need to set up xbindkeys differently.

BatteryCell
July 26th, 2006, 07:18 PM
Woa, now my mouse and keyboard are freezing up...any idea what could be happening?? It seems that whenever I try to apt-get or use adept they freeze and even when Im not they sometimes do. Any ideas? Maybe change my display driver from nvidia to nv?

detyabozhye
July 26th, 2006, 08:12 PM
hmm, I never ran into that problem. You could try fresh installing on another hard drive if you have one and add modifications to your system one at a time to see which one is making your comp run weird and then remove it or replace it on your main install.

hubacap
July 26th, 2006, 10:23 PM
Hmm, the udev rule should work without ACTION="add", what was your cat /proc/bus/input/devices again?


Freshly run cat /proc/bus/input/devices =

I: Bus=0003 Vendor=046d Product=c50e Version=2500
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1f.2-1/input0
S: Sysfs=/class/input/input2
H: Handlers=mouse0 event2 ts0
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143

I will try to be on earlier tomorrow so maybe we could chat about it if needed, I'll try to get gaim working tonight.

detyabozhye
July 26th, 2006, 11:20 PM
And you have the udev rule set up right now and it still gives you event2, right? If so, the problem might be in the udev rule.

MilesTEG1
July 27th, 2006, 02:40 AM
It should. You'll just need to set up xbindkeys differently.
How do I set up xbindkeys ?

detyabozhye
July 27th, 2006, 03:48 AM
Well, for example, the G5 usually has button 8 do back. You would also need to change a setting for firefox to do horizontal scrolling, etc. But first you need to get the mouse working then find out the button numbers in xev before setting up xbindkeys.

crispy_420
July 27th, 2006, 05:06 AM
OK my back/foward work in firefox but not nautilus. Did I do something wrong? When I use the standard keyboard shortcuts (ALT+left arrow), it works fine.

Also when I try to change the resolution by using:

sudo lmctl -8

I get this message:

001.002: 046d:c01d Unknown or Unsupported Logitech device
001.003: 046d:c30a Unknown or Unsupported Logitech device


I have a MX510 but other than these minor issues, I love my new ability in firefox.

detyabozhye
July 27th, 2006, 05:51 PM
Most likely something is wrong in .xbindkeysrc. Can you post it here? and the xev output for your side buttons.

As for LMCtl, I might have to replace that with lomoco in the tut, I have to check it out first.

matsur
July 27th, 2006, 06:30 PM
cd ~/
wget http://bg.rifetech.com/click.tgz
tar xvfz click.tgz
mv click .click


then compile it:

cd ~/.click
make

Then add this to you .xbindkeysrc (gedit ~/.xbindkeysrc):

"~/click/click 4"
m:0x0 + b:9
"~/click/click 5"
m:0x0 + b:10

Maybe I'm being dense, but shouldn't the line have ~/.click/click instead of ~/click/click as per the "mv click .click" above?

Also, I added"/usr/bin/xvkbd -xsendevent -text "\[Super_L]\[c]""
m:0x0 + b:8to .xbindkeysrc to have the app switcher button pause amaroK. However, it just prints a "c". What am I doing wrong?

Thanks

BatteryCell
July 27th, 2006, 07:18 PM
Um when I open up xvkbd I dont see any windows key (super l) so Im guessing thats why that doesnt work...

detyabozhye
July 27th, 2006, 07:45 PM
correct about the click, sorry bout that. I'm going to try the super thing.

Edit: Can't really find a solution to the super key. -_-

matsur
July 27th, 2006, 10:03 PM
I sorted out the Super situation by binding the amaroK dcop commands to mouse clicks instead of trying to get xvkbd to send the shortcut keystrokes. If anyone is curious, here is how I have set it up (m:0x40 refers to the Win key:"/usr/bin/dcop amarok player playPause"
m:0x0 + b:8
"/usr/bin/dcop amarok player prev"
m:0x40 + b:6
"/usr/bin/dcop amarok player next"
m:0x40 + b:7
"/usr/bin/dcop amarok player seekRelative -5"
m:0x40 + b:4
"/usr/bin/dcop amarok player seekRelative 5"
m:0x40 + b:5I've also extended cruise control a bit by having Shift + cruise control button execute page up or down:"~/.click/click 4"
m:0x0 + b:9
"~/.click/click 5"
m:0x0 + b:10
"/usr/bin/xvkbd -xsendevent -text "\[Prior]""
m:0x1 + b:9
"/usr/bin/xvkbd -xsendevent -text "\[Next]""
m:0x1 + b:10Thanks for the guide, it was indispensable in setting up my new mouse. One little thing you might consider changing... I didn't have the xserver-xorg-input-evdev package installed and it seems niether did a few others. Adding mention of it to the first post would eliminate some pain and suffering :-)

EDIT: I also got shift+Scroll wheel to increment system volume. DL this (http://hellewell.homeip.net/phillip/linux/download/programs/vol.c) tiny C file, cd to the download dir and "make vol". Move the executable "vol" somewhere appropriate. Then throw this in your .xbindkeysrc:"/usr/local/bin/vol +5"
m:0x1 + b:4
"/usr/local/bin/vol -5"
m:0x1 + b:5

crispy_420
July 27th, 2006, 10:55 PM
Here is my .xbindkeysrc

"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:6
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
m:0x0 + b:7

It was just a copy and paste job. I did nothing to change it.

Here is my xev output for my back key:

LeaveNotify event, serial 29, synthetic NO, window 0x3400001,
root 0x76, subw 0x0, time 3003977396, (56,175), root:(60,234),
mode NotifyGrab, detail NotifyAncestor, same_screen YES,
focus NO, state 16
^[[3D
EnterNotify event, serial 29, synthetic NO, window 0x3400001,
root 0x76, subw 0x0, time 3003977548, (56,175), root:(60,234),
mode NotifyUngrab, detail NotifyAncestor, same_screen YES,
focus NO, state 16

KeymapNotify event, serial 29, synthetic NO, window 0x0,
keys: 118 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


And foward:

LeaveNotify event, serial 29, synthetic NO, window 0x3400001,
root 0x76, subw 0x0, time 3004013103, (134,177), root:(138,236),
mode NotifyGrab, detail NotifyAncestor, same_screen YES,
focus NO, state 16
^[[3C
EnterNotify event, serial 29, synthetic NO, window 0x3400001,
root 0x76, subw 0x0, time 3004013310, (134,177), root:(138,236),
mode NotifyUngrab, detail NotifyAncestor, same_screen YES,
focus NO, state 16

KeymapNotify event, serial 29, synthetic NO, window 0x0,
keys: 118 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0


This what you asked for right?

BatteryCell
July 27th, 2006, 11:19 PM
I sorted out the Super situation by binding the amaroK dcop commands to mouse clicks instead of trying to get xvkbd to send the shortcut keystrokes. If anyone is curious, here is how I have set it up (m:0x40 refers to the Win key:"/usr/bin/dcop amarok player playPause"
m:0x0 + b:8
"/usr/bin/dcop amarok player prev"
m:0x40 + b:6
"/usr/bin/dcop amarok player next"
m:0x40 + b:7
"/usr/bin/dcop amarok player seekRelative -5"
m:0x40 + b:4
"/usr/bin/dcop amarok player seekRelative 5"
m:0x40 + b:5I've also extended cruise control a bit by having Shift + cruise control button execute page up or down:"~/.click/click 4"
m:0x0 + b:9
"~/.click/click 5"
m:0x0 + b:10
"/usr/bin/xvkbd -xsendevent -text "\[Prior]""
m:0x1 + b:9
"/usr/bin/xvkbd -xsendevent -text "\[Next]""
m:0x1 + b:10Thanks for the guide, it was indispensable in setting up my new mouse. One little thing you might consider changing... I didn't have the xserver-xorg-input-evdev package installed and it seems niether did a few others. Adding mention of it to the first post would eliminate some pain and suffering :-)

EDIT: I also got shift+Scroll wheel to increment system volume. DL this (http://hellewell.homeip.net/phillip/linux/download/programs/vol.c) tiny C file, cd to the download dir and "make vol". Move the executable "vol" somewhere appropriate. Then throw this in your .xbindkeysrc:"/usr/local/bin/vol +5"
m:0x1 + b:4
"/usr/local/bin/vol -5"
m:0x1 + b:5

Will this override the binds in firefox?

rmjb
July 27th, 2006, 11:38 PM
Well this worked for me, thanks!

Three things though:
1. For some reason my MX500 came up as "B16_b_02 USB-PS/2 Optical Mouse" in /proc/bus/input/devices
2. My cruise control buttons were working before so I didn't have to do the part with click
3. I just reused the eventX that was listed in /proc/bus/input/devices so I wouldn't have to reboot. I hope it sticks.

Again, thanks for a great HOWTO.

- rmjb

matsur
July 27th, 2006, 11:49 PM
Will this override the binds in firefox?
The volume part will, but I never use Shift+scroll to go through history anyway. You could of course tie any modifier to it, the hard part was finding the C app to do it. Before I found it I wrote a script around amixer which didnt work very well.

Clay85
July 28th, 2006, 12:45 AM
Thank you so much! I've been looking for this since MAY!

Worked perfectly the second time I tried it. First error was completely my fault. But it leads me to a question/problem.
before I changed anything:

enzo@reboot:~$ ls /dev/input/
event0 event1 event2 mice mouse0 ts0

Here was my error:
I thought, I'll use event3 since it's next in line. Thing is, I didn't change your code (my fault for not reading thouroughly) where you change the xorg to something like Option "device" "/dev/input/event9". So I told it event3, but it was trying event9 and my X server crashed. Thank you for underlining the word WARNING. Really saved me. :)

Here is my problem:

enzo@reboot:~$ ls /dev/input/
event2 event9 mice mouse0 ts0
enzo@reboot:~$


Where did event0 and 1 go and what did it do? Am I in trouble?

Edit: I just noticed the volume dial on my keyboard doesn't work anymore. I have the Logitech Wireless MX duo (I believe it's the mx700 mouse, not sure about the keyboard).

Paradoxdruid
July 28th, 2006, 01:25 AM
Thank you for this guide, I followed section 1 and it worked great for my Logitech MediaPlay mouse, and with a LOT less hassle and pain then using this project: http://daemon.prozone.ws/~david/projects/lmpcm_usb/.

I don't want or need cruise control, but I would like my Tilt wheel to work. I looked at http://blog.blackdown.de/2005/03/01/tilt-wheel-mouse/
, but adding in a ZAxisMap line makes X crash, so no go there. Any ideas on enabling the tilt wheel? Additionally, when I use windows, clicking the middle wheel in Firefox pops up a little "scroll up/down" icon and mouse movement then scrolls the page. Is this possible?

XBindKeys is also working... so far I have this:
#Volume High
"dcop kmix Mixer0 setVolume 1 70"
m:0x0 + b:13
VolUp

#Volume Low
"dcop kmix Mixer0 setVolume 1 20"
m:0x0 + b:14
VolDown

#Toggle Pause Video
"dcop kaffeine KaffeineIface pause"
m:0x0 + b:17
Pause

This is actually also an issue-- the "Master" volume in KMix does nothing, my real volume is controlled by the PCM volume. But I couldn't find a dcop command to allow me to increase the volume of the PCM device (rather than set an absolute). dcop kmix Mixer0 increaseVolume only increases the "Master" volume, and no additional parameters I've found change that.

The keys reported from xev are as follows: Left is b1, Middle b2, Right b3, scrollup b4, scrolldown b5, tilt left b11, tilt right b12, Media key b10, side forward b9, side back b8, Volume up b13, Volume down b14, Mediaforward b15, Mediaback b16, Play b17.

Thank you all for any help... I consider myself fairly linux literate, but getting my media mouse working has been... harrowing.

detyabozhye
July 28th, 2006, 03:37 PM
Here is my .xbindkeysrc



It was just a copy and paste job. I did nothing to change it.

Here is my xev output for my back key:



And foward:




This what you asked for right?

Yes, now the Left and Right are capitalized, right?
And can you also give me the xev output for those buttons with xnidkeys turned off?

$ killall xbindkeys
$ xev

detyabozhye
July 28th, 2006, 03:43 PM
Thank you so much! I've been looking for this since MAY!

Worked perfectly the second time I tried it. First error was completely my fault. But it leads me to a question/problem.
before I changed anything:

enzo@reboot:~$ ls /dev/input/
event0 event1 event2 mice mouse0 ts0

Here was my error:
I thought, I'll use event3 since it's next in line. Thing is, I didn't change your code (my fault for not reading thouroughly) where you change the xorg to something like Option "device" "/dev/input/event9". So I told it event3, but it was trying event9 and my X server crashed. Thank you for underlining the word WARNING. Really saved me. :)

Here is my problem:

enzo@reboot:~$ ls /dev/input/
event2 event9 mice mouse0 ts0
enzo@reboot:~$


Where did event0 and 1 go and what did it do? Am I in trouble?

Edit: I just noticed the volume dial on my keyboard doesn't work anymore. I have the Logitech Wireless MX duo (I believe it's the mx700 mouse, not sure about the keyboard).

Hmm, I think you'll need to somehow seperate the mouse and keyboard since they probably use the same receiver. I still haven't quite figured it out though. >_<

detyabozhye
July 28th, 2006, 03:59 PM
when I use windows, clicking the middle wheel in Firefox pops up a little "scroll up/down" icon and mouse movement then scrolls the page. Is this possible?

AFAIK, this is a Windows thing, it's just the way Windows works.

XBindKeys is also working... so far I have this:
#Volume High
"dcop kmix Mixer0 setVolume 1 70"
m:0x0 + b:13
VolUp

#Volume Low
"dcop kmix Mixer0 setVolume 1 20"
m:0x0 + b:14
VolDown

#Toggle Pause Video
"dcop kaffeine KaffeineIface pause"
m:0x0 + b:17
Pause

This is actually also an issue-- the "Master" volume in KMix does nothing, my real volume is controlled by the PCM volume. But I couldn't find a dcop command to allow me to increase the volume of the PCM device (rather than set an absolute). dcop kmix Mixer0 increaseVolume only increases the "Master" volume, and no additional parameters I've found change that.

That, I don't know.

I don't want or need cruise control, but I would like my Tilt wheel to work. I looked at http://blog.blackdown.de/2005/03/01/tilt-wheel-mouse/
, but adding in a ZAxisMap line makes X crash, so no go there. Any ideas on enabling the tilt wheel?

...

The keys reported from xev are as follows: Left is b1, Middle b2, Right b3, scrollup b4, scrolldown b5, tilt left b11, tilt right b12, Media key b10, side forward b9, side back b8, Volume up b13, Volume down b14, Mediaforward b15, Mediaback b16, Play b17.

Thank you all for any help... I consider myself fairly linux literate, but getting my media mouse working has been... harrowing.

Install xmodmap. Then do:

gedit ~/.Xmodmap

Paste this into there and save it:

pointer = 1 2 3 4 5 8 9 6 7 10 11 12 13 14 15

Then run xmodmap ~/.Xmodmap and if it complains about too little buttons add 16 17 etc untill it's satisfied. If it says there's too many, try deleting some starting at the end untill it works. Then give me the xev output.

rmjb
July 28th, 2006, 03:59 PM
Hmm, I think you'll need to somehow seperate the mouse and keyboard since they probably use the same receiver. I still haven't quite figured it out though. >_<

I think we will because is seems lmctl speeds up the sampling rate of the mouse. And since the mouse and keyboard probably use the same driver I'm having an interesting side effect... UT2004 is playing blazingly fast. I don't just mean the frames are fast, but the entire game is screaming. Bots move faster, I move faster guns fire faster.

I'm thinking it's because it's getting timing info from the keyboard and since lmctl might be speeding this up it's move faster too.

- rmjb

rmjb
July 28th, 2006, 04:02 PM
when I use windows, clicking the middle wheel in Firefox pops up a little "scroll up/down" icon and mouse movement then scrolls the page. Is this possible?

AFAIK, this is a Windows thing, it's just the way Windows works.
AFAIK, this is a Windows thing, it's just the way Windows works.


There is an option in Firefox to enable this.

- rmjb

detyabozhye
July 28th, 2006, 04:03 PM
I think we will because is seems lmctl speeds up the sampling rate of the mouse. And since the mouse and keyboard probably use the same driver I'm having an interesting side effect... UT2004 is playing blazingly fast. I don't just mean the frames are fast, but the entire game is screaming. Bots move faster, I move faster guns fire faster.

I'm thinking it's because it's getting timing info from the keyboard and since lmctl might be speeding this up it's move faster too.

- rmjb

Hmm, that's weird, LMCtl shouldn't affect keypress speed at all. :-k

rmjb
July 28th, 2006, 04:19 PM
I'll turn off lmctl and play a game and see what happens, but I'm sure this is why.

- rmjb

Paradoxdruid
July 28th, 2006, 06:02 PM
There is an option in Firefox to enable this.

- rmjb

deleted due to factual error

matsur
July 28th, 2006, 08:06 PM
Or check "Use autoscrolling" in Edit -> Preferences -> Advanced -> General.

Paradoxdruid
July 30th, 2006, 02:49 PM
Install xmodmap. Then do:
gedit ~/.Xmodmap
Paste this into there and save it:
pointer = 1 2 3 4 5 8 9 6 7 10 11 12 13 14 15
Then run xmodmap ~/.Xmodmap and if it complains about too little buttons add 16 17 etc untill it's satisfied. If it says there's too many, try deleting some starting at the end untill it works. Then give me the xev output.

Thanks for the advice. xmodmap wanted there to be 20 buttons.

The xev output remained the same for the buttons (from my last post above). Tilt left is button 11, tilt right is button 12. No key registers as 6 or 7. 8 and 9 are the side "forward/back" buttons on the left of the mouse. 4 is scroll up, 5 scoll down.

I notice you set 8 and 9 before 6 and 7 in the pointer line... should I try putting 11 and 12 there instead?

Thanks for the advice!

thecheat
July 30th, 2006, 07:16 PM
Only having one problem. When you say:

Make sure you keep the quote marks, save the file and run "xbindkeys" in the terminal I'm a total noob and don't know how to run that in terminal. Someone want to help me out real quick??

detyabozhye
July 31st, 2006, 02:39 AM
Only having one problem. When you say:

I'm a total noob and don't know how to run that in terminal. Someone want to help me out real quick??

Go to Application->Accessories->Terminal, type xbindkeys in there, and hit enter.

detyabozhye
July 31st, 2006, 02:40 AM
Thanks for the advice. xmodmap wanted there to be 20 buttons.

The xev output remained the same for the buttons (from my last post above). Tilt left is button 11, tilt right is button 12. No key registers as 6 or 7. 8 and 9 are the side "forward/back" buttons on the left of the mouse. 4 is scroll up, 5 scoll down.

I notice you set 8 and 9 before 6 and 7 in the pointer line... should I try putting 11 and 12 there instead?

Thanks for the advice!

OK, try swapping 11 12 places with 6 7.
See if that changes anything.

rmjb
July 31st, 2006, 06:46 AM
I'll turn off lmctl and play a game and see what happens, but I'm sure this is why.

- rmjb

Okay that wasn't why. I commented out the lmctl line in /etc/init.d/local and rebooted, played a game and it was still freakishly fast. I'll put lmct back on in /etc/init.d/local.

- rmjb

Aurdal
July 31st, 2006, 08:52 AM
How can I configure my 8th mousbutton to do Alt + Tab?

rmjb
July 31st, 2006, 09:33 AM
How can I configure my 8th mousbutton to do Alt + Tab?

Or better yet, bring up a window list?

- rmjb

detyabozhye
July 31st, 2006, 04:38 PM
The most practical solution that I know of is to write a custom window list program and launch it with button 8.

http://ubuntuforums.org/showpost.php?p=1303372&postcount=39

crispy_420
August 1st, 2006, 01:59 AM
Ok now everything works fine but one little thing.

I have a Logitech Elite Keyboard and it has a scroll wheel on it. Since messing with this it does not work. Is there a fix for that?

detyabozhye
August 1st, 2006, 04:56 PM
Does it do anything in xev when you use the scroll wheel on the keyboard?

BatteryCell
August 1st, 2006, 07:45 PM
Hm, is there any way to map unknown buttons, so like if I had a button on my keyboard that has a keycode but no "name" so to say, how would I map it?

Oh and to the windows list, if you map alt_l and f5 to button eight that brings up a windows list, but if you have any windows up then it doesnt work for me...so like the only way that it works for me is if no windows are maximized.

detyabozhye
August 1st, 2006, 10:45 PM
Hm, is there any way to map unknown buttons, so like if I had a button on my keyboard that has a keycode but no "name" so to say, how would I map it?

Um, I find the easiest way to do it is to use it in Keyboard Shortcuts, but I use Xfce, so I can map it to custom commands, but I don't know if that works in Gnome or KDE. You can try here for a way to do it in xbindkeys: http://hocwp.free.fr/xbindkeys/xbindkeys.html I haven't tried it though.

Oh and to the windows list, if you map alt_l and f5 to button eight that brings up a windows list, but if you have any windows up then it doesnt work for me...so like the only way that it works for me is if no windows are maximized.

Well, I guess we could try searching for a window list app or a way to comunnicate with that list via D-Bus or something.

rmjb
August 1st, 2006, 11:09 PM
One thing, my back button works in Firefox but not in Nautilus... I tried ALT+LEFT in Nautilus and that worked so I don't know why the back button doesn't.

Any ideas?

- rmjb

detyabozhye
August 1st, 2006, 11:26 PM
is xbindkeys configured and running?
$ xbindkeys

if it is, give me your .xbindkeysrc

rmjb
August 1st, 2006, 11:30 PM
Yeah it's running, needs to for the buttons to work in Firefox right? (I think).

Here's my ~/.xbindkeysrc:

###########################
# xbindkeys configuration #
###########################
#
# Version: 0.1.3
#
# If you edit this, do not forget to uncomment any lines that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier (on my keyboard):
# Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#
# Another way to specifie a key is to use 'xev' and set the
# keycode with c:nnn or the modifier with m:nnn where nnn is
# the keycode or the state returned by xev
#
# This file is created by xbindkey_config
# The structure is :
# # Remark
# "command"
# m:xxx + c:xxx
# Shift+...




#keystate_numlock = enable
#keystate_scrolllock = enable
#keystate_capslock = enable



#Back Button
"/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:8

#Forward Button
""/usr/X11R6/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
m:0x0 + b:9

#
# End of xbindkeys configuration


- rmjb

detyabozhye
August 2nd, 2006, 03:11 AM
Firefox will also go back and forward on button 6 and 7, so xbindkeys isn't required for Firefox.
xvkbd should be in /usr/bin/ now instead of /usr/X11R6/bin/.
What button numbers do you get in xev for back and forward?

hubacap
August 2nd, 2006, 03:25 AM
Hmm, everything looks correct.

Ok, first thing I done was set the pistol down and stepped away from the computer... Then, I glued my hair back to it's original place.

I started this project over completely and got it all to work... YAY!!:grin: (except step 3, see edit below) Not sure what I was doing wrong and didn't try to analize it. I just started from scratch.

I did make a couple of changes because I went to the GUI version of XBindKeys-config <<main menu>Debian>Apps>Tools>XBindKeys-config>> and found some things that didn't look right in that editor, although I think it would have worked without the change.

My xbindkeysrc:
#back
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[left]""
m:0x0 + b:8

#fwd
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[right]""
m:0x0 + b:9

#ccup
"~/.click/click 4"
m:0x0 + b:11

#ccdn
"~/.click/click 5"
m:0x0 + b:12 The biggest thing is that it added a name (ie: #back) to the keybindings and a return (blank line) inbetween keybindings to separate them.

The only thing I would like to do is add an alt+tab for button 10 so I can switch between 2 programs easily. I tried different bindings to try to get the result I wanted to no avail. I noticed a "pause, hold" function in the keysymdef.h so I used it in several ways but never got any acceptable results. Could you supply some insight on this. You seem to know what you're doing... not so much on this end. Still too new to Linux, but learning.

My alt-tab section of xbindkeysrc(commented out at the moment):
#side_middle
#"/usr/bin/xvkbd -sendevent -text "\[Alt_L]\[Tab]""
# m:0x0 + b:10


BTW: Thanks for the project and all the help you have provided and will provide.

Edit: After I wrote this I did step 3 with poor results. Mouse reacted VERY slowly to the point of being unusable. It seems to be very precise (more precise than I) without lmctl loaded so it is not an issue.

Thanks again for the walkthrough and help.=D>

I am running Ubunto 6.06 and a Logitech MX1000 mouse.

rmjb
August 2nd, 2006, 06:27 AM
Firefox will also go back and forward on button 6 and 7, so xbindkeys isn't required for Firefox.
xvkbd should be in /usr/bin/ now instead of /usr/X11R6/bin/.
What button numbers do you get in xev for back and forward?

Nah, before this guide the back and forward buttons didn't work in Firefox, so this guide fixed that and I went through the xev thing with the buttons also.
xvkbd is in /usr/bin/xvkbd and /usr/bin/X11/xvkbd

- rmjb

detyabozhye
August 3rd, 2006, 01:27 AM
The only thing I would like to do is add an alt+tab for button 10 so I can switch between 2 programs easily. I tried different bindings to try to get the result I wanted to no avail. I noticed a "pause, hold" function in the keysymdef.h so I used it in several ways but never got any acceptable results. Could you supply some insight on this. You seem to know what you're doing... not so much on this end. Still too new to Linux, but learning.

My alt-tab section of xbindkeysrc(commented out at the moment):
#side_middle
#"/usr/bin/xvkbd -sendevent -text "\[Alt_L]\[Tab]""
# m:0x0 + b:10


I haven't figured this out myself and never had the intention to do so. But since yall keep bugging me about it, I might play around with it. :D Just remember, without writing a new app that implements the window list, it will never act the way it does in Windows.

BTW: Thanks for the project and all the help you have provided and will provide.

Edit: After I wrote this I did step 3 with poor results. Mouse reacted VERY slowly to the point of being unusable. It seems to be very precise (more precise than I) without lmctl loaded so it is not an issue.

Thanks again for the walkthrough and help.=D>

I am running Ubunto 6.06 and a Logitech MX1000 mouse.

You're welcome. Section 3 is optional, but that behavior you described is the opposite of what usually happens, I really need to look into lomoco when I get a chance.

detyabozhye
August 3rd, 2006, 01:31 AM
Nah, before this guide the back and forward buttons didn't work in Firefox, so this guide fixed that and I went through the xev thing with the buttons also.
xvkbd is in /usr/bin/xvkbd and /usr/bin/X11/xvkbd

- rmjb

Before this guide, your buttons weren't sending out the button 6 and 7 or 8 and 9 event at all, the evdev driver fixed that part, not xbindkeys.

Try the following configurations (one at a time ;)):

#Back Button
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:8

#Forward Button
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
m:0x0 + b:9

#Back Button
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:6

#Forward Button
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
m:0x0 + b:7

rmjb
August 3rd, 2006, 09:02 AM
Before this guide, your buttons weren't sending out the button 6 and 7 or 8 and 9 event at all, the evdev driver fixed that part, not xbindkeys.

Ohh... well that makes sense. Will try it when I get back home.

- rmjb

ricesteam
August 3rd, 2006, 07:56 PM
W00t finally got my Logitech G7 fully functioning. Here are my config files for reference (yours will be different)


xorg.conf

Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Dev Name" "Logitech USB Receiver"
Option "Dev Phys" "usb-0000:00:1d.0-1/input0"
Option "Device" "/dev/input/event1"
Option "Buttons" "8"
Option "ZAxisMapping" "4 5 7 8"
EndSection


~/.xbindkeysrc (I use the Opera browser)

#Back Button
"/usr/bin/xvkbd -xsendevent -text "\[BackSpace]""
m:0x0 + b:8
#Right scroll
"/usr/bin/xvkbd -xsendevent -text "\[Right]""
m:0x0 + b:6
#Left Scroll
"/usr/bin/xvkbd -xsendevent -text "\[Left]""
m:0x0 + b:7


Originally I had lots of trouble with xbindkeys. If you can't get it working, do what detyabozhye suggest and config your keys one by one. Remember to killall xbindkeys and rerun it to refresh the settings.

edit: "right" and "left" should both have capital first letters. ie "Right", "Left"

rmjb
August 3rd, 2006, 11:18 PM
Just a heads up, I got some linux header updates through update-manager and when I rebooted my mouse did not work.

When going through the guide initially I did not set my input/eventX to 9 but to what input/eventX was in /proc/bus/input/devices (2 in my case) and set the udev rule accordingly.

Anyhow after the update /proc/bus/input/devices listed my mouse as 3 even though the udev rule said 2.

After setting it to 9, as I should have done in the first place, and rebooting I have back my mouse.

- rmjb

zero17388
August 6th, 2006, 10:51 AM
hi everybody, It works!!!!! i have a wireless logitech desktop (mouse and keyboard on the same receiver) and i've tried your new Howto many times but it didn't work neither with gnome nor xgl.
Under gnome all my mouse's buttons were recognise by xev but my keyboard was just totally crazy (keys were upside down) and I couldn't load X under xgl ](*,) .
So I tried many things and thanks to the german site (I don't understand a word of germen but a french guy did), i've tried this: no udev, only the xorg.conf:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "Name" "Logitech USB Receiver"
Option "Device" "/dev/input/event2"
Option "Emulate3Buttons" "false"
Option "WHEELRelativeAxisButtons" "4 5"
Option "HWHEELRelativeAxisButtons" "7 6"
Option "SendCoreEvents" "true"
EndSection

and here's the cat:

I: Bus=0003 Vendor=046d Product=c512 Version=3900
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:10.1-2/input1
S: Sysfs=/class/input/input2
H: Handlers=kbd mouse0 event2 ts0
B: EV=7
B: KEY=7fffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0 0 1878 d800d100 1e0000 0 0 0
B: REL=143

Ihope it could help some people because it really mades me crazy... And sorry for my poor english but I'm french...:rolleyes:

ricesteam
August 6th, 2006, 03:11 PM
I have the same problem as well...

Can you tell me the steps on how to set your mouse to 9 ???

I don't understand what you mean by that.


Just a heads up, I got some linux header updates through update-manager and when I rebooted my mouse did not work.

When going through the guide initially I did not set my input/eventX to 9 but to what input/eventX was in /proc/bus/input/devices (2 in my case) and set the udev rule accordingly.

Anyhow after the update /proc/bus/input/devices listed my mouse as 3 even though the udev rule said 2.

After setting it to 9, as I should have done in the first place, and rebooting I have back my mouse.

- rmjb

ConstableRoark
August 6th, 2006, 04:33 PM
So has anyone found a solution to the problem of the inactive media keys on the Logitech MX Duo and similar products?

rmjb
August 6th, 2006, 11:49 PM
I have the same problem as well...

Can you tell me the steps on how to set your mouse to 9 ???

I don't understand what you mean by that.

Follow part 2 of section 1:
http://ubuntuforums.org/showthread.php?t=219894

- rmjb

detyabozhye
August 7th, 2006, 03:58 PM
So has anyone found a solution to the problem of the inactive media keys on the Logitech MX Duo and similar products?

OK, before you did this guide, was your mouse and keyboard (assuming they use one reciever) hooked up by USB or PS/2?

I'm assuming that they are now hooked up by USB, as they wouldn't be able to work with evdev on PS/2.

The kernel USB drivers don't recognize some media keys, so if you can't get anything in xev when you press media keys, most likely you won't be able to get them to work without patching the kernel (which I'm not all too sure about how to do).

zero17388
August 8th, 2006, 07:12 AM
well I still have a pb, the event number of my mouse changes at startup, so the udev should that but my keyboard and my mouse have the same name, "Logitech USB Receiver" so it doesn't work.
The pb comes from the "PC Speaker" which changes its event number between the number 2 and the number 0 and so change all the event numbers.Is it possible to desactivate the "PC Speaker"? because I don't care about it...

zero17388
August 8th, 2006, 07:52 AM
Maybe i've found something, in fact I use the udev rules to move the event number of "PC Speaker" to "event9" and so it seems that the event number of my keyboard an mouse are not changing any more!!! So I could configure my xorg.conf. Here are my different settings:

##cat /proc/bus/input/devices
I: Bus=0003 Vendor=046d Product=c512 Version=3900
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:10.1-2/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120003
B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe
B: LED=1f

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1
B: EV=40001
B: SND=6

I: Bus=0003 Vendor=046d Product=c512 Version=3900
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:10.1-2/input1
S: Sysfs=/class/input/input2
H: Handlers=kbd mouse0 event2 ts0
B: EV=7
B: KEY=7fffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0 0 1878 d800d100 1e0000 0 0 0
B: REL=143


##udev rule in /etc/udev/rules.d/19-local.rules :

KERNEL=="event[0-9]*", SYSFS{../name}=="PC Speaker", NAME="input/event9"

##ls /dev/input/ :
event0 event2 event9 mice mouse0 ts0

##/etc/X11/xorg.conf :
Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "Name" "Logitech USB Receiver"
Option "Device" "/dev/input/event2"
Option "Emulate3Buttons" "false"
Option "WHEELRelativeAxisButtons" "4 5"
Option "HWHEELRelativeAxisButtons" "9 8"
Option "SendCoreEvents" "true"
EndSection

Hope it will works for a long but after 3 restart, still working... Hope it could help... And thanks detyabozhye, for your help maybe I will need your help soon...

thomasf
August 8th, 2006, 10:33 AM
The kernel USB drivers don't recognize some media keys, so if you can't get anything in xev when you press media keys, most likely you won't be able to get them to work without patching the kernel (which I'm not all too sure about how to do).

Yes, that's true. I use Logitech MX 3100 wireless set (keyboard + MX1000 mouse) and I have to decide - fully functional keyboard(connected by PS/2) or fully functional mouse (connected by USB). If I use USB connection, most multimedia keys don't work. I spent hours googling for solution but it seems we have to wait for appropiate kernel patch. However, I found something interesting on KernelTrap.org - http://kerneltrap.org/node/6460
As you can see user LEETE posted a kernel patch. I tried to apply it but something went wrong. I'm a beginner not familiar with progamming and kernel patching issues so maybe I'm making some mistakes. This is what I've done:
1)I've made empty text file in /usr/src/linux. I've named it hid_patch
2)I've pasted the patch posted on KernelTrap into hid_patch
3)In the terminal I've issued command:
root@ubuntu:/usr/src/linux# patch -p0 < hid_patch
patching file drivers/usb/input/hid-core.c
patch: **** malformed patch at line 4: value[n] = min < 0 ? snto32(extract(data, offset + n * size, size), size) :

Any ideas?

USB keyboards are present on the market for years...I'm surprised that Linux support them only partially.

detyabozhye
August 8th, 2006, 02:15 PM
@zero17388: Nice find! and you're welcome. ^_^

@thomasf: AFAIK, the 2.4 series kernel had better support for media keys on a USB keyboard, not sure though. The problem with patching the kernel in Ubuntu is the kernel is updated more often then some other Linux distros.

thomasf
August 8th, 2006, 05:17 PM
The problem with patching the kernel in Ubuntu is the kernel is updated more often then some other Linux distros.

I tried to patch kernel 2.6.17.8(from kernel.org) but I understand what you mean - there must have been some changes in code or simpy patch is broken.

zero17388
August 9th, 2006, 06:34 AM
I still have a pb, when the "PC Speaker" is intitially at "event0" my jeyboard is at "event1" and my mouse at "event2" so my xorg is good. But when "PC Speaker" is initially at "event2" kb is at "event0" and mouse at "event1" so my xorg isn't good any more... So tried to force "PC Speaker" at "event0" with udev but I don't know what will happen when at startup my keyboard will be at "event0" before the udev ???? Wait and see...

zero17388
August 9th, 2006, 06:44 AM
So tried to force "PC Speaker" at "event0" with udev but I don't know what will happen when at startup my keyboard will be at "event0" before the udev

it doesn't work, there's no conflict but my kb and PC Speaker are on event0 and my mouse at event1 when xorg is configure for event2... Don't know what to do, maybe delete PC Speaker, if you have any idea you're welcome...

thomasf
August 9th, 2006, 09:55 AM
Don't know what to do, maybe delete PC Speaker, if you have any idea you're welcome...

After executing command sudo rmmod pcspkr PC speaker disappears from /proc/bus/input/devices so maybe you should blacklist pcspkr. Try to add "blacklist pcspkr" to /etc/modprobe.d/blacklist and tell whether it helps or not.

zero17388
August 9th, 2006, 10:48 AM
After executing command sudo rmmod pcspkr PC speaker disappears from /proc/bus/input/devices so maybe you should blacklist pcspkr. Try to add "blacklist pcspkr" to /etc/modprobe.d/blacklist and tell whether it helps or not.

Thanks a lot thomasf, indeed pcskr has disappear and now everything is working like a charm :D

ztripez
August 9th, 2006, 11:59 AM
I'm using a Logitech diNovo desktop and can't get it to work at all.

A cat /proc/bus/input/devices returns:

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=046d Product=c70b Version=4003
N: Name="Logitech Logitech BT Mini-Receiver"
P: Phys=usb-0000:00:02.0-9.2/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1
B: EV=120003
B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe
B: LED=1f

I: Bus=0003 Vendor=046d Product=c70c Version=4003
N: Name="Logitech Logitech BT Mini-Receiver"
P: Phys=usb-0000:00:02.0-9.3/input0
S: Sysfs=/class/input/input2
H: Handlers=kbd mouse0 event2 ts0
B: EV=f
B: KEY=c0002 400 0 0 fff0001 f80 78000 6039fa d841d7ad 9e0000 0 0 0
B: REL=1c3
B: ABS=1 0

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input3
H: Handlers=kbd event3
B: EV=40001
B: SND=6

As you can se i got 2 "Logitech Logitech BT Mini-Receiver" (The bluetooth dongle).

When i make the rule I input
"Logitech Logitech BT Mini-Receiver" instead of "Logitech USB-PS/2 Optical Mouse" but as you can se i got 2 instances for that name (kb and mouse) and how do i tell the rule wich one to choose?


When i follow the guide X won't start at all.

zero17388
August 9th, 2006, 02:05 PM
I'm using a Logitech diNovo desktop and can't get it to work at all.

A cat /proc/bus/input/devices returns:

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=046d Product=c70b Version=4003
N: Name="Logitech Logitech BT Mini-Receiver"
P: Phys=usb-0000:00:02.0-9.2/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1
B: EV=120003
B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe
B: LED=1f

I: Bus=0003 Vendor=046d Product=c70c Version=4003
N: Name="Logitech Logitech BT Mini-Receiver"
P: Phys=usb-0000:00:02.0-9.3/input0
S: Sysfs=/class/input/input2
H: Handlers=kbd mouse0 event2 ts0
B: EV=f
B: KEY=c0002 400 0 0 fff0001 f80 78000 6039fa d841d7ad 9e0000 0 0 0
B: REL=1c3
B: ABS=1 0

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input3
H: Handlers=kbd event3
B: EV=40001
B: SND=6

As you can se i got 2 "Logitech Logitech BT Mini-Receiver" (The bluetooth dongle).

When i make the rule I input
"Logitech Logitech BT Mini-Receiver" instead of "Logitech USB-PS/2 Optical Mouse" but as you can se i got 2 instances for that name (kb and mouse) and how do i tell the rule wich one to choose?


When i follow the guide X won't start at all.

Maybe look to my previous posts, I had the same pb but thanks to thomasf now it's ok, so first you have to know if the event number of your mouse (which is 2 in your exemple). If it changes maybe your pb is the same as mine. Have you used the the udev? How looks your xorg.conf?

thomasf
August 9th, 2006, 07:48 PM
@zero17388 - I'm glad I could help :)

It seems that I found solution to udev rule problem with USB base station used to connect 2 devices (mouse + keyboard). I've tested it on Logitech MX3100 (keyboard + MX1000 mouse). It seems that it works.

tomek@ubuntu:~$ cat /proc/bus/input/devices
I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=40001
B: SND=6

I: Bus=0003 Vendor=046d Product=c512 Version=3007
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.1-3/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1
B: EV=120003
B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe
B: LED=1f

I: Bus=0003 Vendor=046d Product=c512 Version=3007
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.1-3/input1
S: Sysfs=/class/input/input2
H: Handlers=kbd mouse0 event2 ts0
B: EV=7
B: KEY=7fffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0 0 1878 d800d100 1e0000 0 0 0
B: REL=143

I: Bus=0001 Vendor=1461 Product=000b Version=0001
N: Name="cx88 IR (AverTV Studio 303 (M12"
P: Phys=pci-0000:01:08.0/ir0
S: Sysfs=/class/input/input3
H: Handlers=kbd event3
B: EV=100003
B: KEY=403c310 82140000 0 0 0 0 244c000 20180 4001 921680 0 0 efd


I analyzed files and directories in /sys/class/input/input1 (keyboard) and /sys/class/input/input2 (mouse) and noticed that /sys/class/input/input1/device/bInterfaceNumber and /sys/class/input/input2/device/bInterfaceNumber are diffrent.
bInterfaceNumber for input1 (keyboard) is 00 and for input2 (mouse) - 01.
This is modified udev rule which utilizes this fact:
KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", SYSFS{../device/bInterfaceNumber}=="01", NAME="input/event9"
I guess that KERNEL=="event[0-9]*", SYSFS{../device/bInterfaceNumber}=="01", NAME="input/event9" should be enough.

Can someone test it and check whether it works or not?

@ztripez - You have a bit diffrent hardware but you can try this udev rule. If, however, it won't work, solution to your problem is probably similar.

Damiel
August 10th, 2006, 02:05 AM
just changing the name and the device in this config made my logitech mx510 work perfectly in firefox and opera (including the cruise buttons). thanks! :D

thanks to detyabozhye too for the great xbindkeys guide.

hi everybody, It works!!!!! i have a wireless logitech desktop (mouse and keyboard on the same receiver) and i've tried your new Howto many times but it didn't work neither with gnome nor xgl.
Under gnome all my mouse's buttons were recognise by xev but my keyboard was just totally crazy (keys were upside down) and I couldn't load X under xgl ](*,) .
So I tried many things and thanks to the german site (I don't understand a word of germen but a french guy did), i've tried this: no udev, only the xorg.conf:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "Name" "Logitech USB Receiver"
Option "Device" "/dev/input/event2"
Option "Emulate3Buttons" "false"
Option "WHEELRelativeAxisButtons" "4 5"
Option "HWHEELRelativeAxisButtons" "7 6"
Option "SendCoreEvents" "true"
EndSection

...

Ihope it could help some people because it really mades me crazy... And sorry for my poor english but I'm french...:rolleyes:

zero17388
August 10th, 2006, 10:55 AM
@zero17388 - I'm glad I could help :)

It seems that I found solution to udev rule problem with USB base station used to connect 2 devices (mouse + keyboard). I've tested it on Logitech MX3100 (keyboard + MX1000 mouse). It seems that it works.

I analyzed files and directories in /sys/class/input/input1 (keyboard) and /sys/class/input/input2 (mouse) and noticed that /sys/class/input/input1/device/bInterfaceNumber and /sys/class/input/input2/device/bInterfaceNumber are diffrent.
bInterfaceNumber for input1 (keyboard) is 00 and for input2 (mouse) - 01.
This is modified udev rule which utilizes this fact:
KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", SYSFS{../device/bInterfaceNumber}=="01", NAME="input/event9"
I guess that KERNEL=="event[0-9]*", SYSFS{../device/bInterfaceNumber}=="01", NAME="input/event9" should be enough.

Can someone test it and check whether it works or not?

@ztripez - You have a bit diffrent hardware but you can try this udev rule. If, however, it won't work, solution to your problem is probably similar.

It works for me too, I've removed my blacklist and so activate pcskr and with your udev it's working perfectly. Thanks again, again and ... again :-P

trxDraxon
August 10th, 2006, 02:26 PM
I have a MX518 and I have gotten the back and forward and app switcher buttons to work but I cant get the dpi up and down buttons to work. I am not really sure what to try next as I am pretty new to getting stuff working under linux.

raistlin@dragonstear:~$ cat /proc/bus/input/devices
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff ffffffff
B: MSC=10
B: LED=7

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1
B: EV=40001
B: SND=6

I: Bus=0003 Vendor=046d Product=c01e Version=2200
N: Name="Logitech USB-PS/2 Optical Mouse"
P: Phys=usb-0000:00:02.1-3/input0
S: Sysfs=/class/input/input2
H: Handlers=mouse0 event2 ts0
B: EV=7
B: KEY=ff0000 0 0 0 0 0 0 0 0
B: REL=103



raistlin@dragonstear:~$ sudo lmctl -8
001.003: 046d:0a01 Unknown or Unsupported Logitech device
002.002: 046d:c01e Unknown or Unsupported Logitech device

./xbindkeysrc
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:6
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
m:0x0 + b:7
"/usr/bin/xvkbd -xsendevent -text "\[x]""
m:0x0 + b:8


Also,under xev the dpi up and down buttons do not register events at all.

thomasf
August 10th, 2006, 04:52 PM
Did you edit xorg.conf in order to use evdev? Default driver doesn't register events from all buttons.

trxDraxon
August 10th, 2006, 07:30 PM
Yes I did, this is what I added to it:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Device" "/dev/input/event9" #this should be that underlined name from 19-local.rules
EndSection

detyabozhye
August 10th, 2006, 08:09 PM
raistlin@dragonstear:~$ sudo lmctl -8
001.003: 046d:0a01 Unknown or Unsupported Logitech device
002.002: 046d:c01e Unknown or Unsupported Logitech device

I replaced LMCtl with lomoco in the tutorial, try that instead of LMCtl.

zergberg
August 10th, 2006, 08:16 PM
OK, before you did this guide, was your mouse and keyboard (assuming they use one reciever) hooked up by USB or PS/2?

I'm assuming that they are now hooked up by USB, as they wouldn't be able to work with evdev on PS/2.

The kernel USB drivers don't recognize some media keys, so if you can't get anything in xev when you press media keys, most likely you won't be able to get them to work without patching the kernel (which I'm not all too sure about how to do).
Oddly, the kernel recognizes *most* of the keys for me, but only without evdev on. Granted, some aren't there and some appear as mouse buttons, but the media keys themselves were fine.

I think this is more related to evdev's handling of mouse/keyboard receiver combos (MX Cordless Desktop here) than kernel problems, at least for some buttons.

detyabozhye
August 10th, 2006, 08:59 PM
Might be both, but the kernel issue is a known one for some keyboards.

trxDraxon
August 10th, 2006, 10:32 PM
Okay got the cruise buttons to work with lomoco. They now change the DPI on the fly no problem. But they still dont create an event in xev. What I want to get done is be able to map them to a key say F for use as a keybind in games. Not sure what im doing wrong if im just over looking something since im a newb. I followed the guild exactly and everything works just fine.

thomasf
August 11th, 2006, 05:54 AM
Oddly, the kernel recognizes *most* of the keys for me, but only without evdev on.

I confirm that.That's my case - extra keys stop working when evdev is enabled in xorg.conf (though evdev is turned on theoretically only for mouse). I found quite interesting topic on Gentoo forum - http://forums.gentoo.org/viewtopic-t-445810.html Maybe we should try newer version of evdev? But guys from Gentoo forum probably used the newest one...

UPDATE: I've checked Xorg CVS - evdev 1.1.2 is the newest one. It's already included in Ubuntu.

detyabozhye
August 11th, 2006, 03:12 PM
Well, I guess we could try using the evdev driver for the keyboard as well, although I don't know what the results will be.

Tom Brokaw
August 11th, 2006, 04:50 PM
Cool How-to, thanks for posting it. I have a question:
To the best of your knowledge, will this work if the mouse is going through a KVM? Or does it absolutely have to be plugged into a USB port?

Thanks!

detyabozhye
August 11th, 2006, 07:55 PM
Um, I think someone had trouble with using it with a KVM when he would switch then switch back. AFAIK, that should be fixed in Edgy.

thomasf
August 12th, 2006, 11:26 AM
Well, I guess we could try using the evdev driver for the keyboard as well, although I don't know what the results will be.

Unfortunately, it doesn't work. With evdev, keyboard went mad - arrows stopped working, del key acted as printscreen etc. I didn't investigate this problem (it was useless because extra keys didn't work), maybe it's layout issue.

BatteryCell
August 12th, 2006, 10:33 PM
Ok I finally figured out how to do the alt-tab thing with the mouse, well kind of. Theres a program called Kompose, which in my opinion is actually better than alt-tab, and you can configure it so that when you move your mouse to a particular part of the screen it will automatically come up. Not exactly a button on the mouse but I find that it works just as well.
To install just search for Kompose in synaptic or adept.
After that, just start it and then right click on the icon that appears in the system tray, configure compose, and then pick how you want it to auto-activate.

glycerin
August 13th, 2006, 02:10 AM
Can anyone tell me which out of all these instructions that I need to use to configure all buttons/resolution with my Microsoft Intellimouse Explorer 4.0 mouse?
I: Bus=0003 Vendor=045e Product=0095 Version=0419
N: Name="Microsoft Microsoft IntelliMouse� Explorer"
P: Phys=usb-0000:00:0f.2-1/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1 ts0
B: EV=7
B: KEY=1f0000 0 0 0 0 0 0 0 0
B: REL=1c3

Dougie187
August 13th, 2006, 02:28 PM
Hey, Thanks for the guide. Though it's not quite working for me. Two questions. I was wondering if anyone has gotten Lomoco to work for wireless mice. I am using a Logitech v400 right now, Best laptop mouse I have ever used. Anyways when I type sudo lomoco -8 it prints out "003.002: 046d:c518 Unsupported Logitech device: USB Receiver".

And for the next question. I was curious if you could tell me what
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:8
does. Particularly what the m:0x0 is doing. I think i got the rest of it but when you told us how to do the cruise control it kind of threw me off a bit. So maybe if you could explain what the xbindkeys takes as input that would help. Thanks!

EDIT: Two things. First I got my mouse to work with the back and forward buttons using the KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", SYSFS{../device/bInterfaceNumber}=="01", NAME="input/event9"
line. Since its wireless usb it has both the usb mouse and keyboard in events. Also What im looking for in the xbindkeyssrc thing is i want be able to bind other keys. Like say my tablet buttons because im running a tablet pc. Or maybe the windows key.

thomasf
August 14th, 2006, 09:56 AM
Hey, Thanks for the guide. Though it's not quite working for me. Two questions. I was wondering if anyone has gotten Lomoco to work for wireless mice. I am using a Logitech v400 right now, Best laptop mouse I have ever used. Anyways when I type sudo lomoco -8 it prints out "003.002: 046d:c518 Unsupported Logitech device: USB Receiver".

AFAIK lomoco doesn't support all Logitech mice. Look here http://lomoco.linux-gamers.net/

detyabozhye
August 14th, 2006, 07:10 PM
Can anyone tell me which out of all these instructions that I need to use to configure all buttons/resolution with my Microsoft Intellimouse Explorer 4.0 mouse?
I: Bus=0003 Vendor=045e Product=0095 Version=0419
N: Name="Microsoft Microsoft IntelliMouse� Explorer"
P: Phys=usb-0000:00:0f.2-1/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1 ts0
B: EV=7
B: KEY=1f0000 0 0 0 0 0 0 0 0
B: REL=1c3

Well, I'd say start with the evdev part and see what works and what doesn't, then we can help out further.

detyabozhye
August 14th, 2006, 07:32 PM
Hey, Thanks for the guide. Though it's not quite working for me. Two questions. I was wondering if anyone has gotten Lomoco to work for wireless mice. I am using a Logitech v400 right now, Best laptop mouse I have ever used. Anyways when I type sudo lomoco -8 it prints out "003.002: 046d:c518 Unsupported Logitech device: USB Receiver".

Isn't the v400 at a high resolution by default? I don't know, but I'd assume it is, being a Laser mouse.

And for the next question. I was curious if you could tell me what
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:8
does. Particularly what the m:0x0 is doing. I think i got the rest of it but when you told us how to do the cruise control it kind of threw me off a bit. So maybe if you could explain what the xbindkeys takes as input that would help. Thanks!

The m:0x0 is the state of the keyboard. And the v400 doesn't have cruise control AFAIK.

EDIT: Two things. First I got my mouse to work with the back and forward buttons using the KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", SYSFS{../device/bInterfaceNumber}=="01", NAME="input/event9"
line. Since its wireless usb it has both the usb mouse and keyboard in events. Also What im looking for in the xbindkeyssrc thing is i want be able to bind other keys. Like say my tablet buttons because im running a tablet pc. Or maybe the windows key.[/QUOTE]

I don't get what you mean in the first part. Are you saying you're afraid the mouse will interfere with the keyboard? As for mapping those keys, I'm sure it's possible, as long as they fire an xev event, but I don't know xbindkeys enough for that.

Dougie187
August 16th, 2006, 11:50 PM
So. I think the v400 is 800dpi by default. But im not sure. I thought lomoco could be used for more then that so i wanted to check it out. I know that the v400 doesnt have Cruise. I just wanted it for binding other keys. I haven't gotten it to work yet. I haven't read anything that helped yet so if anyone knows how to bind keys, especially tablet buttons, that would help alot.

Fisslefink
August 17th, 2006, 01:28 AM
This method worked for me with a Logitech UltraX Media Center Remote (Model R-RC6). I added the rule to /etc/udev/rules.d/20-names.rules

This remote does not have a keyboard and a mouse component, per se, but the USB dongle sends commands from the remote as two separate devices:

event1: All keys that resemble keyboard keys (ie. Home, 0-9, up, down, left, right, clear, enter, back)
event2: All keys that are special to the remote (ie. play, pause, stop, close, repeat, info)

As with the Logitech MX 1000 keyboard, the boot detection order of the USB devices can change depending on where they are plugged in. The rule below makes event2 into a static device at /dev/input/logitechremote so that my xorg.conf section (see below) will find it no matter where it is plugged in.

Here is my /etc/udev/rules.d/20-names.rules with the addition in bold:

# This file establishes the device names according to Ubuntu policy.
# See udev(8) for syntax.
#
# Permissions and ownership of devices must not be set here, but in
# 40-permissions.rules; user-friendly symlinks to devices should be
# set in 60-symlinks.rules.

# CPU devices, group under /dev/cpu
KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
KERNEL=="microcode", NAME="cpu/microcode"

# Device mapper targets
KERNEL=="device-mapper", NAME="mapper/control"
KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"

# IEEE1394 devices, group under their own directories
KERNEL=="dv1394-[0-9]*", NAME="dv1394/%n"
KERNEL=="video1394-[0-9]*", NAME="video1394/%n"

# Input devices, group under /dev/input
KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", SYSFS{../device/bInterfaceNumber}=="01", NAME="input/logitechremote"
KERNEL=="event[0-9]*", NAME="input/%k"
KERNEL=="mice", NAME="input/%k"
KERNEL=="mouse[0-9]*", NAME="input/%k"
KERNEL=="js[0-9]*", NAME="input/%k"
KERNEL=="ts[0-9]*", NAME="input/%k"
KERNEL=="uinput", NAME="input/%k"

# ISDN devices, group under /dev/capi
KERNEL=="capi", NAME="capi20"
KERNEL=="capi[0-9]*", NAME="capi/%n"

# Packet CD devices, group under /dev/pktcdvd
KERNEL=="pktcdvd", NAME="pktcdvd/control"
KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k"

# Sound devices, group under /dev/snd
KERNEL=="controlC[0-9]*", NAME="snd/%k"
KERNEL=="hwC[D0-9]*", NAME="snd/%k"
KERNEL=="midiC[D0-9]*", NAME="snd/%k"
KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k"
KERNEL=="seq", NAME="snd/%k"
KERNEL=="timer", NAME="snd/%k"

# USB devices (usbfs replacement), group under /dev/bus/usb
SUBSYSTEM!="usb_device", GOTO="usb_device_end"
IMPORT{program}="usb_device_name --export %k"
ENV{USB_BUS}=="?*", ENV{USB_DEV}=="?*", \
NAME="bus/usb/$env{USB_BUS}/$env{USB_DEV}"
LABEL="usb_device_end"

# Video devices, group dvb devices under /dev/dvb
SUBSYSTEM!="dvb", GOTO="dvb_end"
IMPORT{program}="dvb_device_name --export %k"
ENV{DVB_ADAPTER}=="?*", ENV{DVB_DEV}=="?*", \
NAME="dvb/adapter$env{DVB_ADAPTER}/$env{DVB_NAME}"
LABEL="dvb_end"

# Video devices, group cards under /dev/dri
KERNEL=="card[0-9]*", NAME="dri/%k"

# Zaptel devices, group under /dev/zap
KERNEL=="zapctl", NAME="zap/ctl"
KERNEL=="zaptimer", NAME="zap/timer"
KERNEL=="zapchannel", NAME="zap/channel"
KERNEL=="zappseudo", NAME="zap/pseudo"
KERNEL=="zap[0-9]*", NAME="zap/%n"

# Work-around for IDE devices that don't report media changes
BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \
ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME{all_partitions}="%k"

# SCSI CD-ROM devices use /dev/scdN now
BUS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n"

# USB printers need to be /dev/usb*
BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb%k"

# Other devices
KERNEL=="hw_random", NAME="hwrng"
KERNEL=="tun", NAME="net/%k"


Here are the relevant lines from my /etc/X11/xorg.conf:
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen" 0 0
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "remote" "SendCoreEvents"
EndSection

Section "InputDevice"
Identifier "remote"
Driver "evdev"
Option "Name" "Logitech USB Receiver"
Option "XkbRules" "xorg"
Option "XkbModel" "evdev"
Option "Device" "/dev/input/logitechremote"
Option "Protocol" "evdev"
EndSection

Hope this helps someone. Thanks to the other posters on this thread!

Fisslefink

detyabozhye
August 17th, 2006, 04:56 PM
So. I think the v400 is 800dpi by default. But im not sure. I thought lomoco could be used for more then that so i wanted to check it out. I know that the v400 doesnt have Cruise. I just wanted it for binding other keys. I haven't gotten it to work yet. I haven't read anything that helped yet so if anyone knows how to bind keys, especially tablet buttons, that would help alot.

Well, you would do something like this:

"/full/path/to-app -any -needed arguements"
m:0x0 + b:8 #<- replace with the button number you get in xev

apakatt
August 17th, 2006, 10:36 PM
I have a problem.
The forward / backward doesnt work in Konqueror but it works in Opera and Firefox.
If i check Settings - Shortcuts, forward and backward is binded to alt+left and alt+right.

Any idea what the problem could be?

rmjb
August 18th, 2006, 09:38 AM
I have a problem.
The forward / backward doesnt work in Konqueror but it works in Opera and Firefox.
If i check Settings - Shortcuts, forward and backward is binded to alt+left and alt+right.

Any idea what the problem could be?

I had this similar problem (works in the browser, not the file manager).

My post on this is here:
http://ubuntuforums.org/showthread.php?t=219894&page=9#post1327523

And here's detyabozhye's solution and explanation as to why it happened:
http://ubuntuforums.org/showthread.php?t=219894&page=9#post1332116

Good luck.

- rmjb

Mr. Sinister
August 20th, 2006, 02:18 AM
I followed the older version and got my mx610 to work. Then I munged things up with an update. Since then (even following this new guide), I cannot get it to work. I get the following error:
(II) evdev brain: Rescanning devices (1).
(**) Option "CorePointer"
(**) Configured Mouse-usb-0000:00:02.1-9.4/input1: Core Pointer
(II) Configured Mouse-usb-0000:00:02.1-9.4/input1: Found 1 absolute axes.
(II) Configured Mouse-usb-0000:00:02.1-9.4/input1: Configuring as pointer.
(**) Configured Mouse-usb-0000:00:02.1-9.4/input1: Configuring in Absolute mode.
(**) Configured Mouse-usb-0000:00:02.1-9.4/input1: AbsoluteScreen: -1.

*** If unresolved symbols were reported above, they might not
*** be the reason for the server aborting.

Backtrace:
0: /usr/bin/X(xf86SigHandler+0x86) [0x80b4a86]
1: [0xffffe420]
2: /usr/lib/xorg/modules/input/evdev_drv.so [0xb73804a3]
3: /usr/lib/xorg/modules/input/evdev_drv.so [0xb7381655]
4: /usr/lib/xorg/modules/input/evdev_drv.so(evdevNewDriver+0x44) [0xb7381c3f]
5: /usr/lib/xorg/modules/input/evdev_drv.so [0xb7380b8e]
6: /usr/bin/X(InitInput+0x1a0) [0x809cfe5]
7: /usr/bin/X(main+0x368) [0x806df94]
8: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xd2) [0xb7d99ea2]
9: /usr/bin/X(FontFileCompleteXLFD+0x81) [0x806d611]

Any ideas?
I'm using an mx610(lefty), which has two inputs under /proc/bus/input/devices.
I: Bus=0003 Vendor=046d Product=c518 Version=4202
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.1-9.4/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1 ts0
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143

I: Bus=0003 Vendor=046d Product=c518 Version=4202
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.1-9.4/input1
S: Sysfs=/class/input/input2
H: Handlers=kbd event2
B: EV=f
B: KEY=c0002 400 0 0 1 f80 78000 6039fa d84157ad 8e0000 0 0 0
B: REL=40
B: ABS=1 0

rmjb
August 20th, 2006, 11:07 AM
Try using the udev rule to set your mouse to event9... other devices might be grabing the lower event numbers.

- rmjb

tocky
August 20th, 2006, 11:24 AM
After I've given this tutorial several tries, I've finally managed to get it work properly, with my Logitech Mx610. Thank you very much:-D

MikeBenza
August 20th, 2006, 11:44 AM
I'm an idiot. Apparently the number lock LED doesn't work on my laptop...that got hit at some point, and made me think my keymap was borked. And I made a whole post about it....then I realized the proclivity for keys on the right side of the keyboard to make numbers. And I can't delete this, so maybe some mod will spare me the embarassment.

ijanos
August 20th, 2006, 02:38 PM
Hi! Nice howto, now my MX500 is fully functional. Except that lomoco is not start at boot. I think i did everything right, and i can see the local service is enabled but it simply not start. I see no clue in dmesg nor in the syslog. Any help?

n00blar
August 20th, 2006, 11:33 PM
Great HOWTO, but some reason it worked on my Logitech MX500 for a bit and then it stopped working after a couple of reboots, and now I can't figure out what's wrong. ](*,)

Here's what my config looks like.

1.) cat /proc/bus/input/devices

shows:

I: Bus=0003 Vendor=046d Product=c025 Version=1800
N: Name="Logitech USB-PS/2 Optical Mouse"
P: Phys=usb-0000:00:0b.0-5/input0
S: Sysfs=/class/input/input3
H: Handlers=mouse1 event3 ts1
B: EV=7
B: KEY=ff0000 0 0 0 0 0 0 0 0
B: REL=103

2.) ls /dev/input/
reads:

event0 event1 event2 event9 mice mouse0 mouse1 ts0 ts1

3.) sudo gedit /etc/udev/rules.d/19-local.rules

reads:

KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB-PS/2 Optical Mouse", NAME="input/event9"

4.) InputDevice section in xorg.conf

reads:


Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Device" "/dev/input/event9"
EndSection

I've rebooted my computer and still no luck.

Any ideas?

rmjb
August 21st, 2006, 08:11 AM
Great HOWTO, but some reason it worked on my Logitech MX500 for a bit and then it stopped working after a couple of reboots, and now I can't figure out what's wrong.
I've rebooted my computer and still no luck.

Any ideas?

Well, it looks like your mouse is mapping to event 3 instead of 9 as it should according to the udev rule and of course your xorg.conf file is expecting your mouse on event9... maybe you can check the format, placement and permissions of your udev rule to see if it's set up properly??

- rmjb

detyabozhye
August 21st, 2006, 04:26 PM
@Mr. Sinister: Your reciever is for both a keyboard and a mouse. A few pages back, someone mentioned what they used to get the udev rule to grab only the mouse part, so you might want to check that out as well.

@ijanos: hmm, not sure.

@rmjb: Thanks for helping out man! :)

rmjb
August 21st, 2006, 04:57 PM
No probs, we're all a community, I just hope I don't give the users wrong advice some time.

- rmjb

n00blar
August 21st, 2006, 07:20 PM
Well, it looks like your mouse is mapping to event 3 instead of 9 as it should according to the udev rule and of course your xorg.conf file is expecting your mouse on event9... maybe you can check the format, placement and permissions of your udev rule to see if it's set up properly??

- rmjb

Hmm, sorry to sound so dumb, but you kinda lost me there. :confused:

I've gone over the instructions and I really don't know what I'm missing.
All the files were created using sudo, so I'm assuming they have the right permissions.

I've changed the 19-local.rules to read input/event3 and I also changed my xorg.conf to /dev/input/event3 and still no luck.

It worked fine until I rebooted my system, so I don't really know what changed.

Thanks for the help though.

eternalsword
August 22nd, 2006, 12:57 AM
I have a g7 and I was trying to bind the left/right wheel clicks to go through Firefox tabs, but when I restarted X, the mouse didn't work at all. when I removed the entries from the xbindkeysrc and rebooted, the mouse worked fine. I haven't done anything with udev. Here's my info

cat /proc/bus/input/devices


I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=40001
B: SND=6

I: Bus=0003 Vendor=413c Product=2003 Version=0301
N: Name="Dell Dell USB Keyboard"
P: Phys=usb-0000:00:1d.3-1/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1
B: EV=120003
B: KEY=10000 7 ff87207a c14057ff febeffdf ffefffff ffffffff fffffffeB: LED=7

I: Bus=0003 Vendor=046d Product=c51a Version=4100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.3-2/input0
S: Sysfs=/class/input/input2
H: Handlers=mouse0 event2 ts0
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143

I: Bus=0003 Vendor=046d Product=c51a Version=4100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.3-2/input1
S: Sysfs=/class/input/input3
H: Handlers=kbd event3
B: EV=f
B: KEY=c0002 400 0 0 1 f80 78000 6039fa d84157ad 8e0000 0 0 0
B: REL=40
B: ABS=1 0


xorg.conf


Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Dev Name" "Logitech USB Receiver"
Option "Dev Phys" "usb-0000:00:1d.3-2/input0"
Option "Device" "/dev/input/event2"
Option "Buttons" "8"
Option "ZAxisMapping" "4 5 7 8"
EndSection


event3 didn't work at all had an infinite atomic loop or something like that, so I tried event2 and all of the buttons are being read by xev. in xev, the left/right wheel click events are 6 and 7, so do I need to change my ZAxisMapping?

kiikkuja
August 22nd, 2006, 04:50 AM
Thank you for the HOWTO...now my Logitech desktop comfort mouse works even with the nautilus!!!!

spamathon
August 22nd, 2006, 01:00 PM
Hey guys, firstly thanks for the great guide. Secondly, here's my config for anyone wanting the same setup:
"/usr/bin/xvkbd -xsendevent -text "\[Control]\[Page_Down]""
m:0x0 + b:6
"/usr/bin/xvkbd -xsendevent -text "\[Control]\[Page_Up]""
m:0x0 + b:7
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:8
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
m:0x0 + b:9
I'm using an MX610 (righty) and I like to have the left and right tilt of the scroll wheel cycle left and right through my tabs in Fx.

Damn, what an arduous task. Setting up evdev and xbindkeys was fine, but trying to find the text codes for xvkvd was a pain in the ****. I couldn't find them listed anywhere...

In XP I bind the tilts to Ctrl+Tab and Ctrl+Shift+Tab as it has proven a little more reliable than Ctrl+PgUp and Ctrl+PgDn. So naturally, I tried to copy that. No dice. xvkbd doesn't seem to like \[Control]\[Shift]\[Tab] or \C\S\t (from man pages) or any combination of those I could think of.

I ended up running xvkbd (once I figured out it was just a virtual keyboard) then trying to simulate what I wanted. Turns out the Ctrl+Shift+Tab doesn't actually work properly in xvkbd (for me at least). Firefox responds to the keypresses from my real keyboard fine; so I figure it must be a problem with xvkbd. Hence, just settled for Ctrl+PgUp.

Works fine mostly, sometimes it moves two tabs with only one tilt (same prob both ways) - about one in every ten tilts. Not sure if this is the mouse or evdev or xbindkeys or xvkbd or Firefox. Too many links and not enough experience with Linux to figure it out. Any help would be greatly appreciated. :)

detyabozhye
August 22nd, 2006, 03:13 PM
I have a g7 and I was trying to bind the left/right wheel clicks to go through Firefox tabs, but when I restarted X, the mouse didn't work at all. when I removed the entries from the xbindkeysrc and rebooted, the mouse worked fine. I haven't done anything with udev. Here's my info

cat /proc/bus/input/devices


I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=40001
B: SND=6

I: Bus=0003 Vendor=413c Product=2003 Version=0301
N: Name="Dell Dell USB Keyboard"
P: Phys=usb-0000:00:1d.3-1/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1
B: EV=120003
B: KEY=10000 7 ff87207a c14057ff febeffdf ffefffff ffffffff fffffffeB: LED=7

I: Bus=0003 Vendor=046d Product=c51a Version=4100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.3-2/input0
S: Sysfs=/class/input/input2
H: Handlers=mouse0 event2 ts0
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143

I: Bus=0003 Vendor=046d Product=c51a Version=4100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:1d.3-2/input1
S: Sysfs=/class/input/input3
H: Handlers=kbd event3
B: EV=f
B: KEY=c0002 400 0 0 1 f80 78000 6039fa d84157ad 8e0000 0 0 0
B: REL=40
B: ABS=1 0


xorg.conf


Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Dev Name" "Logitech USB Receiver"
Option "Dev Phys" "usb-0000:00:1d.3-2/input0"
Option "Device" "/dev/input/event2"
Option "Buttons" "8"
Option "ZAxisMapping" "4 5 7 8"
EndSection


event3 didn't work at all had an infinite atomic loop or something like that, so I tried event2 and all of the buttons are being read by xev. in xev, the left/right wheel click events are 6 and 7, so do I need to change my ZAxisMapping?

xbindkeys settings would never make your X not want to start up. xbindkeys is only loaded after you log into your account. I think your problem is that the event number changed on reboot, I had the same problem and made the udev rule to overcome it. Since your reciever does both mouse and keyboard you will need to modify the udev rule to check things other than the name. There is a post about that a few pages back somewhere. My mouse is wired, so I can't really test that though.

detyabozhye
August 22nd, 2006, 03:15 PM
Hey guys, firstly thanks for the great guide. Secondly, here's my config for anyone wanting the same setup:
"/usr/bin/xvkbd -xsendevent -text "\[Control]\[Page_Down]""
m:0x0 + b:6
"/usr/bin/xvkbd -xsendevent -text "\[Control]\[Page_Up]""
m:0x0 + b:7
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:8
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
m:0x0 + b:9
I'm using an MX610 (righty) and I like to have the left and right tilt of the scroll wheel cycle left and right through my tabs in Fx.

Damn, what an arduous task. Setting up evdev and xbindkeys was fine, but trying to find the text codes for xvkvd was a pain in the ****. I couldn't find them listed anywhere...

In XP I bind the tilts to Ctrl+Tab and Ctrl+Shift+Tab as it has proven a little more reliable than Ctrl+PgUp and Ctrl+PgDn. So naturally, I tried to copy that. No dice. xvkbd doesn't seem to like \[Control]\[Shift]\[Tab] or \C\S\t (from man pages) or any combination of those I could think of.

I ended up running xvkbd (once I figured out it was just a virtual keyboard) then trying to simulate what I wanted. Turns out the Ctrl+Shift+Tab doesn't actually work properly in xvkbd (for me at least). Firefox responds to the keypresses from my real keyboard fine; so I figure it must be a problem with xvkbd. Hence, just settled for Ctrl+PgUp.

Works fine mostly, sometimes it moves two tabs with only one tilt (same prob both ways) - about one in every ten tilts. Not sure if this is the mouse or evdev or xbindkeys or xvkbd or Firefox. Too many links and not enough experience with Linux to figure it out. Any help would be greatly appreciated. :)

The tilt wheel sends a repeated signal until you let go of it. I don't know how you would go about disabling that. Maybe lomoco might do that, but I kinda doubt it.

sneekie
August 22nd, 2006, 09:16 PM
I'm have an ibm thinkpad. My mouse works fine now, however, I no longer can use the touchpoint or touchpad. Anyone else experiencing this problem?

detyabozhye
August 22nd, 2006, 11:29 PM
Can you give me your cat /proc/bus/input/devices?

sneekie
August 23rd, 2006, 12:00 AM
I: Bus=0011 Vendor=0001 Product=0001 Version=ab54
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 fb40f001 72ffffdf ffefffff ffffffff ffffffff
B: MSC=10
B: LED=7

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1
B: EV=40001
B: SND=6

I: Bus=0011 Vendor=0002 Product=000a Version=0000
N: Name="TPPS/2 IBM TrackPoint"
P: Phys=isa0060/serio1/input0
S: Sysfs=/class/input/input2
H: Handlers=mouse0 event2 ts0
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3

I: Bus=0003 Vendor=046d Product=c01e Version=2200
N: Name="Logitech USB-PS/2 Optical Mouse"
P: Phys=usb-0000:00:1d.1-1/input0
S: Sysfs=/class/input/input3
H: Handlers=mouse1 event3 ts1
B: EV=7
B: KEY=ff0000 0 0 0 0 0 0 0 0
B: REL=103

I: Bus=0011 Vendor=1014 Product=5450 Version=0001
N: Name="/usr/sbin/thinkpad-keys"
P: Phys=
S: Sysfs=/class/input/input4
H: Handlers=kbd event4
B: EV=3
B: KEY=3 1 20000000 100000 e0000 0 0 0

detyabozhye
August 23rd, 2006, 12:16 AM
OK, try this in xorg.conf (remember to backup):

In Section "ServerLayout", replace:

InputDevice "Configured Mouse"

with:

InputDevice "Configured Mouse"
InputDevice "Logitech Mouse"

Add a section like this:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mouse0" #note the device option
Option "ZAxisMapping" "4 5"
EndSection

Then change these lines in your Logitech mouse section:

Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"

to:

Identifier "Logitech Mouse"
Driver "evdev"
Option "SendCoreEvents" "True"

(The Driver "evdev" part doesn't change, but it just happens to be right in between the lines that do need to be changed.)

sneekie
August 23rd, 2006, 12:48 AM
THANKS! works perfectly! Does the corepointer option say that its the main mouse pointer? Just wanted to learn what it was that I changed.

detyabozhye
August 23rd, 2006, 01:02 AM
You're welcome! ^_^ Yes, that's exactly what CorePointer means.

nanocosm
August 23rd, 2006, 04:21 AM
For Logitech V500 mouse you can use this .xconfigrc:

I remapped the Left/Right scroll to Cursorkeys Left/Right
This scrolls to Left/Right e.g. in Firefox instead of PageBack/PageForward

To autoload xbindkeys at startup go to
System -> Preferences -> Sessions -> "Startup Programs" Tab -> Add -> and type xbindkeys

###########################
# xbindkeys configuration #
###########################
#
# Version: 0.1.3
#
# If you edit this, do not forget to uncomment any lines that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier (on my keyboard):
# Control, Shift, Mod1 (Alt), Mod2 (NumLock),
# Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#
# Another way to specifie a key is to use 'xev' and set the
# keycode with c:nnn or the modifier with m:nnn where nnn is
# the keycode or the state returned by xev
#
# This file is created by xbindkey_config
# The structure is :
# # Remark
# "command"
# m:xxx + c:xxx
# Shift+...




#keystate_numlock = enable
#keystate_scrolllock = enable
#keystate_capslock = enable


#ScrollLeft-ButtonPress - Ignore this event!
""
m:0x0 + b:7 (mouse)

#ScrollLeft-ButtonRelease
#Just send CursorKey Left
"/usr/bin/xvkbd -xsendevent -text "\[Left]""
m:0x0 + b:11 (mouse)



#ScrollRight-ButtonPress - Ignore this event!
""
m:0x0 + b:6 (mouse)
#ScrollRight-ButtonRelease
#Just send CursorKey Right
"/usr/bin/xvkbd -xsendevent -text "\[Right]""
m:0x0 + b:12 (mouse)

#
# End of xbindkeys configuration

MilesTEG1
August 23rd, 2006, 04:25 AM
Nobody has a G5 mouse here ?
If yes, do you have all buttons functional ?
Can you give the scipt you use ?

Tom Brokaw
August 23rd, 2006, 04:03 PM
Um, I think someone had trouble with using it with a KVM when he would switch then switch back. AFAIK, that should be fixed in Edgy.

I got it to work fine with my KVM. The only thing different was that it detects as "ImExPS/2 Generic Explorer Mouse", so the rule you make has to reflect that instead of the Logitech USB or whatever. Again, thanks for the How-to.

detyabozhye
August 23rd, 2006, 04:09 PM
Nobody has a G5 mouse here ?
If yes, do you have all buttons functional ?
Can you give the scipt you use ?

Well, do Section 1, then give me your xev output for the side button and other special buttons, and I'll tell you how to set up your .xbindkeysrc.

MilesTEG1
August 24th, 2006, 01:09 PM
Well, do Section 1, then give me your xev output for the side button and other special buttons, and I'll tell you how to set up your .xbindkeysrc.

Hello,
I follow this instructions : Logitech G5 setpoint - enable all buttons (http://ubuntuforums.org/showpost.php?p=1413357&postcount=17)
Sure. You need to use the evdev driver to make them all work. Apparently the xorg-evdev package included in dapper is/was broken. I don't know if it still is, I installed an old version as instructed in the howto I used. I can't remember where it was so I uploaded the copy I kept.

Right-click - Save As... (http://www.cs.helsinki.fi/u/aaltoset/xserver-xorg-input-evdev_1.0.0.5-0ubuntu2_i386.deb)

It's a 32-bit package, though, you'll have to try something else if you have a 64-bit install.


When you have the driver installed, you need a device name for your mouse. Since you have the same mouse I believe it's the same as mine, but to be sure, type
cat /proc/bus/input/devices
The output is something like this:

I: Bus=0003 Vendor=046d Product=c041 Version=4600
N: Name="Logitech USB Gaming Mouse"
P: Phys=usb-0000:00:11.2-2/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143

The bolded part is what you need. Now, create a new udev rule for your mouse with
sudo nano /etc/udev/rules.d/10-mouse.rules The filename above is just an example that should work.
Put this in the file:
KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Gaming Mouse", NAME="input/g5" Note the name. It must be the same the /proc output gives you. The NAME with caps is the device name you give to the mouse. You can make up your own or use the one in my example.

Then insert this to /etc/X11/xorg.conf, note the device name if you used something else than in the example before. It's also a good idea to backup the file in case something goes wrong.

Section "InputDevice"
Identifier "Logitech G5"
Driver "evdev"
Option "CorePointer"
Option "Device" "/dev/input/g5"
EndSection
Comment out your old mouse settings (so that everything from Section to EndSection has a # in front of it). Then find the Section named ServerLayout. Remove the reference to the old mouse settings and add the new ones, so it's something like this:


Section "ServerLayout"
(other lines...)
InputDevice "Logitech G5" "CorePointer"
EndSection
After that, you should have all the buttons recognized, including tilting the wheel horizontally. You need to restart something to make the new udev rule to apply. I don't know what exactly so for the sake of simplicity, reboot.

X should start, if it doesn't, then revert to your backup xorg.conf and try to find out what went wrong. Now you can configure the buttons. All the guides I have read say you have to use xkbdkeys or whatever it was to map keys to get for example back/forward working in firefox but I've never needed it.

After rebooting, my G5 mouse works great.
In firefox I have the left/right middle button function.
But the side button don't work. The resolution buttons don't allow me more resolution like in windows...

Here you have the xev output :
Whell Up -> button 4
Whell Down -> button 5
Whell Left -> button 6
Whell Right -> button 7
Left Clic -> button 1
Middle Clic -> button 2
Right Clic -> button 3
Side button -> button 8

But the 2 others buttons (for changing resolution) don't allow me to have more than 3 resolutions...

For the Whell left & right, can it be possible to have this function in nautilus and other program ?
How can I set it to only few programs ?

Ps : I don't use the following instructions, because with it i loose the autoscroll capabilities in firefox...
I just used xmodmap so that the thumb button pastes highlighted text and opens links in new tabs in firefox, tilting the wheel horizontally is back/fwd in firefox and horizontal scroll in other apps.
To get this, type xmodmap -e "pointer = 1 3 8 4 5 6 7 2 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32" If you want a different configuration, try rearranging the first 8 numbers and see what which button does (I have never really been able to understand the logic in it, I just use trial and error. Maybe I'm just too dumb.)

You might want to add that command to run on startup. Chances are you are using Gnome, which I can't use that much. On KDE you can do it with an autostart config file:

nano ~/.kde/Autostart/mouse.desktop
Add this:


[Desktop Entry]
Encoding=UTF-8
Exec=xmodmap -e "pointer = insertyourbuttonmappingshere"
GenericName[en_US]=
StartupNotify=false
Terminal=false
TerminalOptions=
Type=Application
X-KDE-autostart-after=kdesktop"


Thanks
++
Miles

detyabozhye
August 24th, 2006, 02:20 PM
To get Firefox to use the tilt wheel for horizontal scroll (the standard behavior for the tilt wheel) you need to set mousewheel.horizscroll.withnokey.action to 0 in Firefox in about:config

To make the side button go back (standard behavior for side button) do:
sudo apt-get install xvkbd xbindkeys
gedit ~/.xbindkeysrc
In there paste:
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:8

To have different behavior in different apps, you might have to use imwheel.

pt123
August 25th, 2006, 10:24 PM
I have the Logitech MX 510 mouse on the PS/2 connector on my computer than using a USB connection would this guide still work for my setup?

detyabozhye
August 26th, 2006, 12:22 AM
Evdev only works on USB.

adam.tropics
August 27th, 2006, 07:15 AM
This is so weird, all was working, but i had an older version of evdev, so i upgraded, silly me! Still ok, except the left and right tilt have started to work back to front (right to left), and the button numbers, according to xev have changed. Added to that, changing the numbers in the xbindkeysrc has no effect at all! Any ideas?

rlreich
August 27th, 2006, 09:36 AM
I setup everything they way it was written but when I rebooted I got a xserver fail. Now I can't get Ubu to start except in command line. Any idea what I did wrong or how to fix it?](*,)

mdwuznik
August 27th, 2006, 10:34 AM
Do any of you know sth about the way the new hyped-up Revolution from Logitech would work under linux?

jadugarr
August 27th, 2006, 10:56 AM
Thanks for the guide, worked great for my mx510. It let me finally lift the hold on upgrading the evdev package (previously downgraded to Breezy version). I think the whole reason the dapper version wasn't working for me was that I had my device named /dev/input/mx510 instead of event*.

spookshow
August 27th, 2006, 11:04 AM
I setup everything they way it was written but when I rebooted I got a xserver fail. Now I can't get Ubu to start except in command line. Any idea what I did wrong or how to fix it?](*,)


you might have done what i did, and changed the identifier in the "InputDevice" section, and not changing it to the same name as the identifier in the "ServerLayout" section, silly me. i had x constantly not load for me until i figured that out this morning


questions about xbindkeys
i want my tilt left and tilt right to be page up and page down, as well as my back button to be, well, back.. what would i put in xbindkeysrc for that? (did some looking around, found a few things, but nothing seems to be working properly)
i have a logitech g7 mouse, and have use xev to find all the buttons (which, for some reason isn't actually showing my left and right tilt when i click em over.. any ideas?)

detyabozhye
August 27th, 2006, 06:21 PM
This is so weird, all was working, but i had an older version of evdev, so i upgraded, silly me! Still ok, except the left and right tilt have started to work back to front (right to left), and the button numbers, according to xev have changed. Added to that, changing the numbers in the xbindkeysrc has no effect at all! Any ideas?

Do you have xmodmap set up (do you have a ~/.Xmodmap file)?
If you do, try without it. If you still have problems, post your xev output here without xmodmap.

detyabozhye
August 27th, 2006, 06:28 PM
I setup everything they way it was written but when I rebooted I got a xserver fail. Now I can't get Ubu to start except in command line. Any idea what I did wrong or how to fix it?](*,)

Well, the description is pretty vague here, but the problem is most likely in either the udev rule or in the xorg.conf file.

detyabozhye
August 27th, 2006, 06:30 PM
Do any of you know sth about the way the new hyped-up Revolution from Logitech would work under linux?

Dunno, we'll need some time to get all the stuff working in it.

mdwuznik
August 28th, 2006, 03:29 AM
Sure, anyone who owns one/got one for testing ?

adam.tropics
August 28th, 2006, 04:56 AM
Do you have xmodmap set up (do you have a ~/.Xmodmap file)?
If you do, try without it. If you still have problems, post your xev output here without xmodmap.

No, I'm not using xmodmap, but I just tried it, and confused the hell out of myself....been staring at this way too long!

Anyway xev says left and right tilt is 7 and 6 respectively, and so I put that in .Xbindkeysrc and still sideways scroll is back to front! I am wondering if I need a setting in xorg other than that on the howto, but have no idea. Maybe I will stare at this fresh tomorrow!

detyabozhye
August 28th, 2006, 06:44 PM
No, I'm not using xmodmap, but I just tried it, and confused the hell out of myself....been staring at this way too long!

Anyway xev says left and right tilt is 7 and 6 respectively, and so I put that in .Xbindkeysrc and still sideways scroll is back to front! I am wondering if I need a setting in xorg other than that on the howto, but have no idea. Maybe I will stare at this fresh tomorrow!

That is correct, you need to set a setting in firefox to make it stop going back and forward when you use the tilt wheel and set up the back button to go back in .xbindkeysrc (most likely button 8 ).

MilesTEG1
August 29th, 2006, 03:00 AM
Hello,
I follow this instructions : Logitech G5 setpoint - enable all buttons (http://ubuntuforums.org/showpost.php?p=1413357&postcount=17)
except this : Now you can configure the buttons. All the guides I have read say you have to use xkbdkeys or whatever it was to map keys to get for example back/forward working in firefox but I've never needed it. I just used xmodmap so that the thumb button pastes highlighted text and opens links in new tabs in firefox, tilting the wheel horizontally is back/fwd in firefox and horizontal scroll in other apps.
To get this, type xmodmap -e "pointer = 1 3 8 4 5 6 7 2 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32" If you want a different configuration, try rearranging the first 8 numbers and see what which button does (I have never really been able to understand the logic in it, I just use trial and error. Maybe I'm just too dumb.)

You might want to add that command to run on startup. Chances are you are using Gnome, which I can't use that much. On KDE you can do it with an autostart config file:

nano ~/.kde/Autostart/mouse.desktop
Add this:


[Desktop Entry]
Encoding=UTF-8
Exec=xmodmap -e "pointer = insertyourbuttonmappingshere"
GenericName[en_US]=
StartupNotify=false
Terminal=false
TerminalOptions=
Type=Application
X-KDE-autostart-after=kdesktop"


The instructions you see just before, I don't use it. So I don't have used the xmodmap command because with it i loose the autoscroll capabilities in firefox... (like in windows when you push the middle button and let it pushed, you will get a transpartent circle with little arrows up and right with a black point in center.)

After rebooting, my G5 mouse works great.
In firefox I have the left/right middle button function.
But the side button don't work. The resolution buttons don't allow me more resolution like in windows...

Here you have the xev output :
Whell Up -> button 4
Whell Down -> button 5
Whell Left -> button 6
Whell Right -> button 7
Left Clic -> button 1
Middle Clic -> button 2
Right Clic -> button 3
Side button -> button 8

But the 2 others buttons (for changing resolution) don't allow me to have more than 3 resolutions...

For the Whell left & right, can it be possible to have this function in nautilus and other program ?

How can I set it to only few programs ?
[/quote]


Thanks
++
Miles

cokhavim
August 29th, 2006, 05:11 AM
No, I'm not using xmodmap, but I just tried it, and confused the hell out of myself....been staring at this way too long!

Anyway xev says left and right tilt is 7 and 6 respectively, and so I put that in .Xbindkeysrc and still sideways scroll is back to front! I am wondering if I need a setting in xorg other than that on the howto, but have no idea. Maybe I will stare at this fresh tomorrow!

hey, i had this problem too, and i found an answer! i just looked at the man pages for evdev and found the option to map the correct buttons to the correct axis. so, here's the relevant section of my xorg.conf:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Device" "/dev/input/event9"
Option "HWHEELRelativeAxisButtons" "7 6"
EndSection

happy mousing!

rlreich
August 29th, 2006, 10:45 PM
This thread has gotten so long I'm not sure what I'm reading part of the time. I did everything at the beginning of this thread as far as changing the conf files and got a xserver crash when I rebooted. When I tried to rename the xorg.conf file i got the following error

E: Could not lock file /var/lib/apt/lists/lock-open
(Permission denied)
E: Unable to lock the list directory

This was after I had signed in with the root account and password. Any idea how to work around this? I've tried going back to previous updates as well.

detyabozhye
August 30th, 2006, 04:14 PM
The instructions you see just before, I don't use it. So I don't have used the xmodmap command because with it i loose the autoscroll capabilities in firefox... (like in windows when you push the middle button and let it pushed, you will get a transpartent circle with little arrows up and right with a black point in center.)

After rebooting, my G5 mouse works great.
In firefox I have the left/right middle button function.
But the side button don't work. The resolution buttons don't allow me more resolution like in windows...

Here you have the xev output :
Whell Up -> button 4
Whell Down -> button 5
Whell Left -> button 6
Whell Right -> button 7
Left Clic -> button 1
Middle Clic -> button 2
Right Clic -> button 3
Side button -> button 8

But the 2 others buttons (for changing resolution) don't allow me to have more than 3 resolutions...

For the Whell left & right, can it be possible to have this function in nautilus and other program ?

How can I set it to only few programs ?


Thanks
++
Miles

You would have to use imwheel to set it to only a few programs. Try searching the forums for imwheel. I personally didn't have much luck with it so I can't tell you how to make it all work properly.

detyabozhye
August 30th, 2006, 04:19 PM
This thread has gotten so long I'm not sure what I'm reading part of the time. I did everything at the beginning of this thread as far as changing the conf files and got a xserver crash when I rebooted. When I tried to rename the xorg.conf file i got the following error

E: Could not lock file /var/lib/apt/lists/lock-open
(Permission denied)
E: Unable to lock the list directory

This was after I had signed in with the root account and password. Any idea how to work around this? I've tried going back to previous updates as well.

O_O Wow, that's weird. Try starting up in recovery mode (on the grub screen (http://yekubuntu.free.fr/warty/images/grub.png)).

rlreich
August 31st, 2006, 04:06 AM
I tried that also. Never could get it to work.

BLTicklemonster
September 1st, 2006, 10:19 PM
Using an MX310, this guide worked great. Way easier than the one I used before. I just came back to ubuntu after a long haitus, and let me tell you, it's the same as before. Every single thing I try to do, be it load video drivers, or get my mouse working, every thing I try messes up ubuntu. No matter that I diligently follow the instructions to a T. I noticed before that even following my own notes on how to do things would never work the same way twice. This guide, however, worked right off the bat.

Thank you very much!!!

detyabozhye
September 2nd, 2006, 03:47 PM
You're welcome. ^_^

BLTicklemonster
September 4th, 2006, 12:48 AM
Yer welcome.

(my hard drive I'd loaded ubuntu on started clicking, so I had to install alllllll over again. And yep, your guide worked again!)

detyabozhye
September 4th, 2006, 07:54 PM
Yer welcome.

(my hard drive I'd loaded ubuntu on started clicking, so I had to install alllllll over again. And yep, your guide worked again!)

hehe, my little Western Digital 7.5GB testing HD on which I had Edgy installed started clicking and died before yesterday as well.

msak007
September 5th, 2006, 01:22 AM
Thanks for this how-to, now I can use the forward / back buttons on my MX700 in Konqueror too :). I have a couple suggestions though. I haven't read the whole thread (just the first post which is all I needed) so I apologize if any of this has been suggested or mentioned before (I assume any modifications would be in the first post), but do you really need to restart the machine? You can issue a sudo /etc/init.d/udev restart to restart udev and detect new rulesets / hardware, and then just start xbindkeys manually for the current session. Also you may want to put in there for the KDE folks to get xbindkeys to start automatically, you can do the following:

1. Create a startup script
kedit ~/.kde/Autostart/start-xbindkeys 2. Insert this into it
#!/bin/sh
xbindkeys 3. Make it executable
chmod +x start-xbindkeys
Once again thanks for this easy to follow how-to, my buttons all work now.

EDIT: I almost forgot, for my MX700 I'm using the USB --> PS/2 adapter that came with it, so the output of cat /proc/bus/input/devices for me was "PS2++ Logitech MX Mouse" instead of "Logitech USB Receiver".

gannina
September 5th, 2006, 03:17 AM
I'm using a Logitech mouse that has a scroll wheel that can also scroll left and right. I ran xev and it came up with buttons 11, and 12. I setup my local-19 file exactly like the one in your guide and my forward and back buttons work, but I'm not sure how to get the scrollwheel to go side to side.

KhaaL
September 5th, 2006, 05:29 AM
for some reason, the local-rules file made my sound die. I entered exactly:

KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB-PS/2 Optical Mouse", NAME="input/event9"

where the last "input/event9" was adjusted as pointed out in the guide. What made me wonder, however, should the first KERNEL=="event[0-9]*" be changed too, or left as it is?

detyabozhye
September 5th, 2006, 02:39 PM
I'm using a Logitech mouse that has a scroll wheel that can also scroll left and right. I ran xev and it came up with buttons 11, and 12. I setup my local-19 file exactly like the one in your guide and my forward and back buttons work, but I'm not sure how to get the scrollwheel to go side to side.

The scroll left and right should generate buttons 6 and 7 in xev. You would need to set up xmodmap to get it working I believe. Try this:

gedit ~/.Xmodmap

Paste this in there:
pointer = 1 2 3 4 5 8 9 10 11 6 7 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

save and close
xmodmap ~/.Xmodmap

If if complains about too many buttons, delete some off the end untill you have the right amount. Then try xev.

detyabozhye
September 5th, 2006, 02:41 PM
for some reason, the local-rules file made my sound die. I entered exactly:

KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB-PS/2 Optical Mouse", NAME="input/event9"

where the last "input/event9" was adjusted as pointed out in the guide. What made me wonder, however, should the first KERNEL=="event[0-9]*" be changed too, or left as it is?

Hmm, that's weird. Do you still get a sound device in /proc/bus/input/devices?

detyabozhye
September 5th, 2006, 02:53 PM
Thanks for this how-to, now I can use the forward / back buttons on my MX700 in Konqueror too :). I have a couple suggestions though. I haven't read the whole thread (just the first post which is all I needed) so I apologize if any of this has been suggested or mentioned before (I assume any modifications would be in the first post), but do you really need to restart the machine? You can issue a sudo /etc/init.d/udev restart to restart udev and detect new rulesets / hardware,

Didn't know that, haven't tried it. I'll try it next time I need to set up something like this.

and then just start xbindkeys manually for the current session. Also you may want to put in there for the KDE folks to get xbindkeys to start automatically, you can do the following:

1. Create a startup script
kedit ~/.kde/Autostart/start-xbindkeys 2. Insert this into it
#!/bin/sh
xbindkeys 3. Make it executable
chmod +x start-xbindkeys
Once again thanks for this easy to follow how-to, my buttons all work now.

You're welcome. I'll add it.

bartman
September 6th, 2006, 07:23 AM
Hi!
Thanks for the guide, my MX510 now works much better with FireFox. I, however, had a problem. I use a laptop so the mouse isn't plugged in all the time and if it isn't, Xorg hangs at startup.

I wrote a little script which verifies if /dev/input/event8 exists and copies a correct xorg.conf in its place. But I didn't know where to put it. So I went to the #ubuntu IRC channel where a helpful fellow suggested using the update-rc.d command. After reading through the man page it was a breeze:
$ sudo cp logitech-mice.sh /etc/init.d/logitech-mice.sh
$ sudo update-rc.d logitech-mice.sh start 69 S .
First I needed to move my script into a folder update-rc.d scans when adding a daemon/service. That folder is /etc/init.d.

Then I actually configured my script to run at the startup (S) runlevel with priority number 69. The number is essential because my X server has the priority number of 70 and I need th script to run before the X server starts.

Here's the script:
# logitech-mice.sh Script to set appropriate xorg.conf regarding mouse presence
#
#/bin/bash
if [ -e /dev/input/event8 ] && [ -e /etc/X11/xorg.conf-logitech ]
then
rm /etc/X11/xorg.conf
cp /etc/X11/xorg.conf-logitech /etc/X11/xorg.conf
echo " * Logitech MX510 mouse found!"
fi
if [ ! -e /dev/input/event8 ] && [ -e /etc/X11/xorg.conf-backup ]
then
rm /etc/X11/xorg.conf
cp /etc/X11/xorg.conf-backup /etc/X11/xorg.conf
echo " * Logitech MX510 mouse NOT found!"
fi
exit

Of course if you want the same, you need to change event8 to whichever eventX you configured. I also have 2 backuped xorg.confs:
- xorg.conf-backup which is a backup I made before tweaking it
- xorg.conf-logitech which contains configuration for my Logitech mouse.

Now if only somehow i could run this script whenever the udev rule run as well. I found this file:
$ cat /etc/udev/rules.d/030_sl-modem-daemon.rules
# start/stop the daemon when the USB modem is connected
KERNEL=="slusb[0-9]*", GROUP="dialout", RUN+="/etc/init.d/sl-modem-daemon"
I tried adding RUN+="/etc/init.d/logitech-mice.sh"to the udev rule I created for my mouse but it doesn't work.

Any ideas?

detyabozhye
September 6th, 2006, 03:41 PM
Take a look at this page: http://ubuntuforums.org/showthread.php?t=219894&page=16

bartman
September 7th, 2006, 09:02 AM
LOL, what a simple solution.

Thanks.

KhaaL
September 7th, 2006, 03:29 PM
Hmm, that's weird. Do you still get a sound device in /proc/bus/input/devices?

I got the guide working, i followed it again. and I got one thing to say about lomoco: WOW! I thing even typing feels more accurate now :p

One question though, when I goto system -> Preferences -> Mouse -> Motion tab, The acceleration and sensitivity values don't affect my mouse... know how to fix this, or how I can change these values manually (that is, by fiddling with a file?)

detyabozhye
September 7th, 2006, 04:47 PM
Don't know, mouse settings always worked for me in both Gnome and Xfce.

kendals
September 13th, 2006, 12:07 AM
I just cannot get my mouse to work. It's a Logitech G7 (USB), and I've followed your guide to the dot.

I've added the rule, installed evdev thingie, replaced the default xorg.conf mouse section with your one- everything! Yet the mouse still won't budge- tried restarting, and no luck. Batteries are fine- it worked before I reinstalled Ubuntu, but I just don't know how to fix it...

Here's my cat /proc/bus/input/devices list:

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0003 Vendor=046d Product=c50e Version=2510
N: Name="Logitech USB RECEIVER"
P: Phys=usb-0000:00:1d.1-1/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1 ts0
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143

I: Bus=0011 Vendor=0002 Product=0008 Version=0000
N: Name="PS/2 Mouse"
P: Phys=isa0060/serio4/input1
S: Sysfs=/class/input/input2
H: Handlers=mouse1 event2 ts1
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3

I: Bus=0011 Vendor=0002 Product=0008 Version=7321
N: Name="AlpsPS/2 ALPS GlidePoint"
P: Phys=isa0060/serio4/input0
S: Sysfs=/class/input/input3
H: Handlers=mouse2 event3 ts2
B: EV=f
B: KEY=420 0 70000 0 0 0 0 0 0 0 0
B: REL=3
B: ABS=1000003


My ls /dev/input/:

event0 event2 event3 event9 mice mouse0 mouse1 mouse2 ts0 ts1 ts2

Finally, my rules stuff:

KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB RECEIVER", NAME="input/event9"

So yeah- it all appears right using your guide, yet the mouse is not moving, and batteries are fine (tried shifing USB position, resetting mouse, etc. to no avail) :(

BLTicklemonster
September 13th, 2006, 06:32 AM
Do I have to do this all over again for kde?

kendals
September 13th, 2006, 07:45 AM
*bump!*

BLTicklemonster
September 13th, 2006, 08:54 AM
I: Bus=0003 Vendor=046d Product=c50e Version=2510
N: Name="Logitech USB RECEIVER"
P: Phys=usb-0000:00:1d.1-1/input0
S: Sysfs=/class/input/input1
H: Handlers=mouse0 event1 ts0
B: EV=7
B: KEY=ffff0000 0 0 0 0 0 0 0 0
B: REL=143

I: Bus=0011 Vendor=0002 Product=0008 Version=0000
N: Name="PS/2 Mouse"
P: Phys=isa0060/serio4/input1
S: Sysfs=/class/input/input2
H: Handlers=mouse1 event2 ts1
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3




My ls /dev/input/:

event0 event2 event3 event9 mice mouse0 mouse1 mouse2 ts0 ts1 ts2

Finally, my rules stuff:

KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB RECEIVER", NAME="input/event9"

So yeah- it all appears right using your guide, yet the mouse is not moving, and batteries are fine (tried shifing USB position, resetting mouse, etc. to no avail) :(

Isn't receiver ... are you using a wireless mouse? receiver wouldn't be the mouse. I think you need to use the ps2 part not the usb receiver part.

Just for the heck of it, try something like this:

KERNEL=="event[0-9]*", SYSFS{../name}=="PS/2 Mouse", NAME="input/event9"

And if it works, be utterly amazed, because I'm out of my league here.

Now; my mx310's buttons don't work in kde. what to do?

detyabozhye
September 13th, 2006, 02:40 PM
Do I have to do this all over again for kde?

No, you would only need to add xbindkeys to your autostarted applications in KDE.

detyabozhye
September 13th, 2006, 02:56 PM
@kendals:
Can I get you cat /etc/X11/xorg.conf

BLTicklemonster
September 13th, 2006, 05:02 PM
... which I just did, and it works fine. THEN I came along and checked my email and saw your reply. Sorry I wasn't wearing my thinking cap last night. Thanks for all this neat info!

kendals
September 14th, 2006, 01:55 AM
@kendals:
Can I get you cat /etc/X11/xorg.conf

Never mind- turns out that for no reason, the USB receiver for my LX7 Logitech stopped receiving data from the mouse, so I got it replaced (only 7 months old, phew! Within the 12 months which saved sending to Logitech)... :)

Guide worked perfectly after that :)

KhaaL
September 14th, 2006, 01:25 PM
I don't know if this is caused by the edev/lomoco stuff, but my wacom board is now completly unusable. I'm running edgy eft knot-2, so it MIGHT be something to do with that... any wacom users experiencing the same thing?

detyabozhye
September 14th, 2006, 06:35 PM
From the top of my head, I think it's probably something to do with xorg.conf. You'll probably need to do something there to get the wacom working.

someusernoob
September 15th, 2006, 09:38 AM
Seriously, configuring my new MX 400 mouse with your tutorial was easier then installing the Logitech drivers under Windows (i ended up once with a BSOD)*.

I only needed the forward and back button to work, side scrolling is annoying anyway. But it worked, it worked great :D thank you very much.

*this was a conlict between my chipset drivers, my nvidia drivers and setpoint... before someone thinks im trolling or flaiming

Zieher
September 15th, 2006, 02:10 PM
Hi,

first off, great HowTo. I appreciate the work done by the community, it was a reason for me to switch OS

(XP Home wouldn't let the BT-stack be started as SYSTEM, and Logicrap's software would only work correctly when logged on as admin - and for a multiuser desktop that is a waste of resource and a danger to system health)

I have a MX900 via its original BT-cradle, it works fine on the "mouse" driver, although it has one problem with the cruise control buttons: scroll up gives buttonpress b:6 and then the consecutive buttonpresses b:4 to scroll and a b:6 release after releasing cruise control button. I have tried to get it to work with evdev, but it doesn't seem to work correctly (followed your guide on page 1).

The BT-cradle is in HCI mode, because I want to sync my phone with Evolution (but that is an entirely different story). So it is not just a wireless extension of the USB Receiver.

Since I only need fwd and bck function in firefox (which I get w/o keybinding) I would be happy the way it is, except for the double function on my cruise control button.

cat:


I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1
B: EV=40001
B: SND=6

I: Bus=0003 Vendor=046d Product=c705 Version=2704
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:03.0-2.1/input0
S: Sysfs=/class/input/input2
H: Handlers=mouse0 event2 ts0
B: EV=7
B: KEY=ff0000 0 0 0 0 0 0 0 0
B: REL=103

I: Bus=0005 Vendor=046d Product=b001 Version=2201
N: Name="Logitech Bluetooth Mouse"
P: Phys=00:07:61:16:2D:CF
S: Sysfs=/class/input/input3
H: Handlers=mouse1 event3 ts1
B: EV=f
B: KEY=ff0000 0 0 0 0 0 0 0 0
B: REL=103
B: ABS=300 0


all I need to know, is if evdev will fix the double function on my mouse, or if I ought to give up and forget the cruise control:roll:

detyabozhye
September 16th, 2006, 03:00 PM
It should, I got cruise control buttons working fine using evdev while the "mouse" driver made the cruise up (I think) also do another button.

infinityPlusOne
September 18th, 2006, 01:43 AM
Thank you! This works great with my MX 700. I can scroll and use my forward/back keys when browsing. I am a happy camper.

Cheers,

infinityPlusOne

detyabozhye
September 18th, 2006, 07:02 PM
do itashi mashi te (you're welcome.) ^_^

Zieher
September 30th, 2006, 05:07 AM
Hmmm, for some reason I can't get evdev to control the mouse. I set up udev rules as in first page. Either I write the rule to include "Logitech USB Receiver" and nothing happens (though movement of mouse will wake up system) or I include "Logitech Bluetooth Mouse" and X crashes on startup. xorg.conf is also setup by instructions on 1st page.

Can't post the codes (.conf, udev rule) right now because I'm currently on another machine. I'll do this in a while.

Funnily enough, "mouse" works fine with my MX900 except for the "cruise up". Momentarily I can live with the "flaw".

Does anybody know if this setup has its problems with bluetooth mice, or it's just my ineptness?

BLTicklemonster
September 30th, 2006, 12:00 PM
Each time I have tried doing my mouse lately (been busy trying edgy, but I finally have dapper back right now), I get some kind of wacom or something in my input devices. I get stuck out of x because this appears out of the blue each time I try to get the mouse settings right. I removed the lines from xorg.conf, but still could not get into x, then I noticed:

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen" 0 0
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"

The stylus, cursor, and eraser are each part and parcel of the wacom or whatever it was. I #-ed them and now I can boot.

Thing is, what the heck?

Also, it sure would be nice if you could take an entire section you don't want, and just

/*
comment
the
whole
thing
out
like
this
instead
of
#
at
the
head
of
each
line
or
ctrl-k
to
remove
a
line
at
a
time
*/

But /* is not recognized, so you have to # each line. Shame.

So I guess I try to remember the name of that wacom or whatever it is and remove from synaptic, maybe? Why did it show up? I have a tablet, but it's not hooked up.

detyabozhye
September 30th, 2006, 02:00 PM
Hmmm, for some reason I can't get evdev to control the mouse. I set up udev rules as in first page. Either I write the rule to include "Logitech USB Receiver" and nothing happens (though movement of mouse will wake up system) or I include "Logitech Bluetooth Mouse" and X crashes on startup. xorg.conf is also setup by instructions on 1st page.

Can't post the codes (.conf, udev rule) right now because I'm currently on another machine. I'll do this in a while.

Funnily enough, "mouse" works fine with my MX900 except for the "cruise up". Momentarily I can live with the "flaw".

Does anybody know if this setup has its problems with bluetooth mice, or it's just my ineptness?

Yeah, get me the /proc/bus/input/devices, udev rule, and xorg.conf so I can see what's wrong.

Your mouse is wireless, correct? And the reciever can be for keyboard as well?

detyabozhye
September 30th, 2006, 02:02 PM
Each time I have tried doing my mouse lately (been busy trying edgy, but I finally have dapper back right now), I get some kind of wacom or something in my input devices. I get stuck out of x because this appears out of the blue each time I try to get the mouse settings right. I removed the lines from xorg.conf, but still could not get into x, then I noticed:

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen" 0 0
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "stylus" "SendCoreEvents"
InputDevice "cursor" "SendCoreEvents"
InputDevice "eraser" "SendCoreEvents"

The stylus, cursor, and eraser are each part and parcel of the wacom or whatever it was. I #-ed them and now I can boot.

Thing is, what the heck?

Also, it sure would be nice if you could take an entire section you don't want, and just

/*
comment
the
whole
thing
out
like
this
instead
of
#
at
the
head
of
each
line
or
ctrl-k
to
remove
a
line
at
a
time
*/

But /* is not recognized, so you have to # each line. Shame.

So I guess I try to remember the name of that wacom or whatever it is and remove from synaptic, maybe? Why did it show up? I have a tablet, but it's not hooked up.

I got the wacom thing in Edgy as well. It should be fine to just delete all the wacom, stylus, eraser stuff from xorg.conf. Are you saying it keeps coming back though?

spockrock
September 30th, 2006, 05:10 PM
has anyone gotten an mx700 mouse to work in edgy?
creating a udev rule just causes x to crash, and without the rule my buttons are all messed up when using xev.


Section "InputDevice"
Identifier "Mouse0"
Driver "evdev"
Option "SendCoreEvents" "true"
Option "Device" "/dev/input/event9"
EndSection

detyabozhye
September 30th, 2006, 06:12 PM
In Edgy Eft, I got it to work without the udev rule using the Name Option in xorg.conf, I haven't tried it in Dapper though, so I'm not going to edit the tutorial yet:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Name" "Logitech USB-PS/2 Optical Mouse"
EndSection

BLTicklemonster
September 30th, 2006, 07:24 PM
It only comes back if I have to dpkg reconfigure because of a video driver problem (which I was having when I tried edgy on a fresh install. I gave up and came back after a while. I'll let them smooth it out a bit more), or if I did dpkg reconfigure phigh.

But why does it come up? Quite odd.

spockrock
September 30th, 2006, 08:14 PM
detyabozhye tried that no dice.....

bjorkiii
October 1st, 2006, 07:31 AM
:) Just like to say thanks for the information i have finally have back and forward buttons on mx1000.

bjorkiii
October 1st, 2006, 12:29 PM
](*,) I keep right clicking and clicking back , i keep forgetting the side buttons work.

detyabozhye
October 1st, 2006, 04:27 PM
detyabozhye tried that no dice.....

Give me the output for these commands:

cat /proc/bus/input/devices
cat /etc/X11/xorg.conf
cat /etc/udev/rules.d/19-local.rules

BLTicklemonster
October 1st, 2006, 06:20 PM
Just reported this wacom thing as a bug:

Bug #63445

Zieher
October 1st, 2006, 06:54 PM
re: your answer (http://www.ubuntuforums.org/showpost.php?p=1563820&postcount=213)

Here goes (sorry, had to help a firend touch up his flat)


cat proc...
I: Bus=0003 Vendor=046d Product=c705 Version=2704
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:03.0-2.1/input0
S: Sysfs=/class/input/input2
H: Handlers=mouse0 event2 ts0
B: EV=7
B: KEY=ff0000 0 0 0 0 0 0 0 0
B: REL=103

I: Bus=0005 Vendor=046d Product=b001 Version=2201
N: Name="Logitech Bluetooth Mouse"
P: Phys=00:07:61:16:2D:CF
S: Sysfs=/class/input/input7
H: Handlers=mouse1 event3 ts1
B: EV=f
B: KEY=ff0000 0 0 0 0 0 0 0 0
B: REL=103
B: ABS=300 0


xorg.conf
Section "InputDevice"
Identifier "Logitech MX900"
Driver "evdev"
Option "Device" "/dev/input/event9"
Option "CorePointer"
Option "SendCoreEvents" "true"
Option "Resolution" "800"
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Logitech MX900" "CorePointer"
EndSection

19-local.rule
KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech Bluetooth Mouse", NAME="input/event9"

edit: um, yeah, the MX900 is a dual mode (HID or HCI) bluetooth mouse. I have it running in HCI mode, since I need true bt capability of the mouse cradle to sync my mobile (cellular for transatlants). again, it's not acute, it's just my hang to get it working as originally advised...

thanks for your listening, it's refreshing to know you're not alone =)

side note (why I'm here in ubuntuworld):
lol, it is actually a logitech product, where neither the original OS (WinXP) nor the actual driver and utils kept their promise - it all only worked when logged in as admin. log on as restricted borked the mouse, plus Win would start a bt stack for EVERY user logged in at the time... what do these people get paid for?!?!

spockrock
October 2nd, 2006, 01:50 PM
Give me the output for these commands:

cat /proc/bus/input/devices
cat /etc/X11/xorg.conf
cat /etc/udev/rules.d/19-local.rules

cat /proc/bus/input/devices

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1
B: EV=40001
B: SND=6

I: Bus=0003 Vendor=046d Product=c50b Version=2100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.0-1/input0
S: Sysfs=/class/input/input2
H: Handlers=kbd event2
B: EV=120003
B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe
B: LED=1f

I: Bus=0003 Vendor=046d Product=c50b Version=2100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.0-1/input1
S: Sysfs=/class/input/input3
H: Handlers=kbd mouse0 event3 ts0
B: EV=7
B: KEY=ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0 0 1878 d800d100 1e0000 0 0 0
B: REL=103


xorg.conf

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder3) Thu Sep 14 15:50:24 PDT 2006

Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" #"CorePointer"
InputDevice "Mouse0"
InputDevice "Keyboard0" "CoreKeyboard"
#Option "AIGLX" "true"
EndSection

Section "Files"
FontPath "/usr/share/X11/fonts/misc/"
FontPath "/usr/share/X11/fonts/TTF/"
FontPath "/usr/share/X11/fonts/OTF"
FontPath "/usr/share/X11/fonts/Type1/"
FontPath "/usr/share/X11/fonts/CID/"
FontPath "/usr/share/X11/fonts/100dpi/"
FontPath "/usr/share/X11/fonts/75dpi/"
EndSection

Section "Module"
Load "i2c" #added
Load "bitmap" #added
Load "extmod"
Load "dbe" #commented out
# Load "dri"
Load "glx"
Load "record" #commented out
Load "xtrap" #commented out
Load "freetype" #commented out
Load "type1" #commented out
EndSection

##xorg mouse
#Section "InputDevice"
# Identifier "Mouse0"
# Driver "mouse"
# Option "Protocol" "auto"
# Option "Device" "/dev/input/mice"
# Option "ZAxisMapping" "4 5 6 7"
#EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "evdev"
Option "SendCoreEvents" "true"
# Option "Name" "Logitech USB Receiver"
Option "Device" "/dev/input/event9"
# Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 10 11"
# Option "Dev Name" "Logitech USB Receiver"
# Option "Buttons" "10"
# Option "CorePointer"
# Option "Protocol" "evdev"
# Option "Dev Phys" "usb-*/input1"
# Option "ZAxisMapping" "4 5"
# Option "Emulate3Buttons" "true"
EndSection

Section "Monitor"

#DisplaySize 360 270 # mm
### Comment all HorizSync and VertSync values to use DDC:
Identifier "Monitor0"
VendorName "GSM"
ModelName "T910BU"
HorizSync 30.0 - 98.0
VertRefresh 50.0 - 160.0
Option "DPMS"
EndSection

Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "SWcursor" # [<bool>]
#Option "HWcursor" # [<bool>]
#Option "NoAccel" # [<bool>]
#Option "ShadowFB" # [<bool>]
#Option "UseFBDev" # [<bool>]
#Option "Rotate" # [<str>]
#Option "VideoKey" # <i>
#Option "FlatPanel" # [<bool>]
#Option "FPDither" # [<bool>]
#Option "CrtcNumber" # <i>
#Option "FPScale" # [<bool>]
#Option "FPTweak" # <i>
Identifier "Card0"
Driver "nvidia"
VendorName "nVidia Corporation"
BoardName "GeForce 7800 GT"
Screen 0
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "true"
Option "MetaModes" "1600x1200,1600x1200"
Option "TwinViewOrientation" "RightOf"
Option "SecondMonitorHorizSync" "50-75"
Option "SecondMonitorVertRefresh" "60-80"
Option "RenderAccel" "true"
Option "NoLogo" "True"
Option "Coolbits" "1"
Option "AddARGBGLXVisuals" "True"
Option "TripleBuffer" "true"
SubSection "Display"
Viewport 0 0
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection


19-local.rules

KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", NAME="input/event4"


Ok I do know that in rules I tell it event 4, and in xorg I am looking at event 9. The problem is that when If I change it so they they are both either event 9 or event 4 then X fails to load. I have tried a bazillion combinations, and I dunno why in edgy this fails, but in dapper it worked perfectly.

detyabozhye
October 2nd, 2006, 04:10 PM
re: your answer (http://www.ubuntuforums.org/showpost.php?p=1563820&postcount=213)

Here goes (sorry, had to help a firend touch up his flat)


cat proc...
I: Bus=0003 Vendor=046d Product=c705 Version=2704
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:03.0-2.1/input0
S: Sysfs=/class/input/input2
H: Handlers=mouse0 event2 ts0
B: EV=7
B: KEY=ff0000 0 0 0 0 0 0 0 0
B: REL=103

I: Bus=0005 Vendor=046d Product=b001 Version=2201
N: Name="Logitech Bluetooth Mouse"
P: Phys=00:07:61:16:2D:CF
S: Sysfs=/class/input/input7
H: Handlers=mouse1 event3 ts1
B: EV=f
B: KEY=ff0000 0 0 0 0 0 0 0 0
B: REL=103
B: ABS=300 0


xorg.conf
Section "InputDevice"
Identifier "Logitech MX900"
Driver "evdev"
Option "Device" "/dev/input/event9"
Option "CorePointer"
Option "SendCoreEvents" "true"
Option "Resolution" "800"
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Logitech MX900" "CorePointer"
EndSection

19-local.rule
KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech Bluetooth Mouse", NAME="input/event9"

edit: um, yeah, the MX900 is a dual mode (HID or HCI) bluetooth mouse. I have it running in HCI mode, since I need true bt capability of the mouse cradle to sync my mobile (cellular for transatlants). again, it's not acute, it's just my hang to get it working as originally advised...

thanks for your listening, it's refreshing to know you're not alone =)

side note (why I'm here in ubuntuworld):
lol, it is actually a logitech product, where neither the original OS (WinXP) nor the actual driver and utils kept their promise - it all only worked when logged in as admin. log on as restricted borked the mouse, plus Win would start a bt stack for EVERY user logged in at the time... what do these people get paid for?!?!

Well, the first thing that I noticed is this:

Option "CorePointer"
Option "SendCoreEvents" "true"

You should have only one or the other, not both for one device AFAIK. Try it with only Option "CorePointer". If that doesn't work, try using "Logitech USB Receiver" in the udev rule again.

detyabozhye
October 2nd, 2006, 04:17 PM
cat /proc/bus/input/devices

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1
B: EV=40001
B: SND=6

I: Bus=0003 Vendor=046d Product=c50b Version=2100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.0-1/input0
S: Sysfs=/class/input/input2
H: Handlers=kbd event2
B: EV=120003
B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe
B: LED=1f

I: Bus=0003 Vendor=046d Product=c50b Version=2100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.0-1/input1
S: Sysfs=/class/input/input3
H: Handlers=kbd mouse0 event3 ts0
B: EV=7
B: KEY=ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0 0 1878 d800d100 1e0000 0 0 0
B: REL=103


xorg.conf

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (buildmeister@builder3) Thu Sep 14 15:50:24 PDT 2006

Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" #"CorePointer"
InputDevice "Mouse0"
InputDevice "Keyboard0" "CoreKeyboard"
#Option "AIGLX" "true"
EndSection

Section "Files"
FontPath "/usr/share/X11/fonts/misc/"
FontPath "/usr/share/X11/fonts/TTF/"
FontPath "/usr/share/X11/fonts/OTF"
FontPath "/usr/share/X11/fonts/Type1/"
FontPath "/usr/share/X11/fonts/CID/"
FontPath "/usr/share/X11/fonts/100dpi/"
FontPath "/usr/share/X11/fonts/75dpi/"
EndSection

Section "Module"
Load "i2c" #added
Load "bitmap" #added
Load "extmod"
Load "dbe" #commented out
# Load "dri"
Load "glx"
Load "record" #commented out
Load "xtrap" #commented out
Load "freetype" #commented out
Load "type1" #commented out
EndSection

##xorg mouse
#Section "InputDevice"
# Identifier "Mouse0"
# Driver "mouse"
# Option "Protocol" "auto"
# Option "Device" "/dev/input/mice"
# Option "ZAxisMapping" "4 5 6 7"
#EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "evdev"
Option "SendCoreEvents" "true"
# Option "Name" "Logitech USB Receiver"
Option "Device" "/dev/input/event9"
# Option "ButtonMapping" "1 2 3 4 5 6 7 8 9 10 11"
# Option "Dev Name" "Logitech USB Receiver"
# Option "Buttons" "10"
# Option "CorePointer"
# Option "Protocol" "evdev"
# Option "Dev Phys" "usb-*/input1"
# Option "ZAxisMapping" "4 5"
# Option "Emulate3Buttons" "true"
EndSection

Section "Monitor"

#DisplaySize 360 270 # mm
### Comment all HorizSync and VertSync values to use DDC:
Identifier "Monitor0"
VendorName "GSM"
ModelName "T910BU"
HorizSync 30.0 - 98.0
VertRefresh 50.0 - 160.0
Option "DPMS"
EndSection

Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "SWcursor" # [<bool>]
#Option "HWcursor" # [<bool>]
#Option "NoAccel" # [<bool>]
#Option "ShadowFB" # [<bool>]
#Option "UseFBDev" # [<bool>]
#Option "Rotate" # [<str>]
#Option "VideoKey" # <i>
#Option "FlatPanel" # [<bool>]
#Option "FPDither" # [<bool>]
#Option "CrtcNumber" # <i>
#Option "FPScale" # [<bool>]
#Option "FPTweak" # <i>
Identifier "Card0"
Driver "nvidia"
VendorName "nVidia Corporation"
BoardName "GeForce 7800 GT"
Screen 0
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "true"
Option "MetaModes" "1600x1200,1600x1200"
Option "TwinViewOrientation" "RightOf"
Option "SecondMonitorHorizSync" "50-75"
Option "SecondMonitorVertRefresh" "60-80"
Option "RenderAccel" "true"
Option "NoLogo" "True"
Option "Coolbits" "1"
Option "AddARGBGLXVisuals" "True"
Option "TripleBuffer" "true"
SubSection "Display"
Viewport 0 0
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection


19-local.rules

KERNEL=="event[0-9]*", SYSFS{../name}=="Logitech USB Receiver", NAME="input/event4"


Ok I do know that in rules I tell it event 4, and in xorg I am looking at event 9. The problem is that when If I change it so they they are both either event 9 or event 4 then X fails to load. I have tried a bazillion combinations, and I dunno why in edgy this fails, but in dapper it worked perfectly.

OK, I think your problem is that you have two devices that register as "Logitech USB Reciever", the reciever works for both keyboard and mouse. You're going to have to get udev or xorg.conf to get only the mouse part. The problem is that I don't remember how to do that. It should be somewhere in this thread though. BTW, when changing the udev rule, run sudo /etc/init.d/udev restart.

spockrock
October 3rd, 2006, 12:42 AM
ok I have tried, but I am at the same point, my up cruise button shows up as button 4 and button 8, button 8 being one of my side buttons. I am frazzled, grated I am in edgy, so I will just sit patiently and try to figure this, out, btw your guide worked perfectly in dapper. I am starting to wonder maybe the evdev driver in edgy maybe not working correctly. who knows......oh well.

detyabozhye
October 3rd, 2006, 06:54 PM
Dunno, Edgy got it right with this on first try for me:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Name" "Logitech USB-PS/2 Optical Mouse"
EndSection

spockrock
October 3rd, 2006, 09:36 PM
Dunno, Edgy got it right with this on first try for me:
Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Name" "Logitech USB-PS/2 Optical Mouse"
EndSection

ok and you did this with a udev rule??

detyabozhye
October 3rd, 2006, 09:50 PM
Nope, no udev.

spockrock
October 3rd, 2006, 10:07 PM
OMG OMG OMG OMG I LOVE YOU MORE THEN YOU COULD EVER IMAGINE....it was the udev, I will post my xorg shortly so no one else has to rack thier brain on it.

ok fixed the keyboard remap issue. w00t thank you detyabozhye so much!!!

spockrock
October 3rd, 2006, 10:57 PM
Ok here is my edgy configuration for the mxduo.
ok no udev rule, just edit your xorg.conf


Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "evdev"
Option "SendCoreEvents" "True"
Option "Name" "Logitech USB Receiver"
Option "Device" "/dev/input/event3"
EndSection


the event number is the event number taken from cat /proc/bus/input/devices, same with the name I will highlight,with bold, the parts you need to watch. I found that you have to have the Device option otherwise your wireless keyboard will map your keys all weird. Keyboard layout is above that pretty standard. Also not that in serverlayout make sure you mouse isn't A CorePointer. Delete or comment it out.


I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 f2ffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=0010 Vendor=001f Product=0001 Version=0100
N: Name="PC Speaker"
P: Phys=isa0061/input0
S: Sysfs=/class/input/input1
H: Handlers=kbd event1
B: EV=40001
B: SND=6

I: Bus=0003 Vendor=046d Product=c50b Version=2100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.0-1/input0
S: Sysfs=/class/input/input2
H: Handlers=kbd event2
B: EV=120003
B: KEY=10000 7 ff800000 7ff febeffdf ffefffff ffffffff fffffffe
B: LED=1f

I: Bus=0003 Vendor=046d Product=c50b Version=2100
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.0-1/input1
S: Sysfs=/class/input/input3
H: Handlers=kbd mouse0 event3 ts0
B: EV=7
B: KEY=ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff 0 0 1878 d800d100 1e0000 0 0 0
B: REL=103

detyabozhye
October 4th, 2006, 12:17 AM
The event number might chang however (not sure about Edgy, does in Dapper), it might be safer to use the "Phys" or "Dev Phys" option instead of the "Device" option though if it doesn't change the event number it should be fine.

John.Michael.Kane
October 4th, 2006, 12:39 AM
@kendals before the modifications of this guide did your LX7 work out the gate with dapper?

spockrock
October 4th, 2006, 01:47 AM
The event number might chang however (not sure about Edgy, does in Dapper), it might be safer to use the "Phys" or "Dev Phys" option instead of the "Device" option though if it doesn't change the event number it should be fine.

ok I will keep that in mind, I have rebooted several times, and I ams still ok, but thanks for the headsup.

Zieher
October 4th, 2006, 05:31 AM
Ok, I don't know what's wrong. I've managed to get the mouse to work with evdev, with evdev without udev, and it still works with mouse. but under all situations I stll get two buttonpresses for cruise up (namely cruise up and page back) ](*,)
I think I'll have to get used to the thought of letting it be.

John.Michael.Kane
October 4th, 2006, 09:30 AM
Zieher which logitech mouse are you using? I was planning on getting an LX7.

Zieher
October 4th, 2006, 09:44 AM
MX900 Bluetooth mouse w/ original bt cradle

detyabozhye
October 4th, 2006, 03:36 PM
Ok, I don't know what's wrong. I've managed to get the mouse to work with evdev, with evdev without udev, and it still works with mouse. but under all situations I stll get two buttonpresses for cruise up (namely cruise up and page back) ](*,)
I think I'll have to get used to the thought of letting it be.

hmm, weird. Maybe file a bug?

John.Michael.Kane
October 4th, 2006, 07:10 PM
detyabozhye you know if this guide works with LX7 wireless logictec mice

detyabozhye
October 4th, 2006, 07:52 PM
It should, but I don't know for sure.

binatice
October 9th, 2006, 09:48 PM
I got Ubuntu loaded and running on my laptop with realative ease. Every thing but my USB Mouse is work good I am using a Logitech Notebook Mouse (http://www.logitech.com/index.cfm/products/details/US/EN,CRID=3,CONTENTID=8142) When I use the left or middle mouse buttons they seems to have the properties of both the middle and the left button combined. AKA when I highlight text with the left button and then click in a text box with the left button it acts as if I clicked the middle button, and visa-versa. In Firefox I click on a link with the left mouse button it opens the link in the current window and in an extra tab as if I clicked the middle button, again visa-versa.

I have played with this guide to no avail ](*,) if anyone else has anyother suggestions they will be most helpful. Also, if you think I need to get a new mouse altogether, please make a suggestion. Thanks to eveyone in advance.

detyabozhye
October 9th, 2006, 10:07 PM
Same with "mouse" driver too? O_o Weird. I'm guessing it might be the mouse messing up, does it work with other computers/OS's?

binatice
October 10th, 2006, 01:47 AM
I works fine on Windows XP. I really don't think it is the mouse it's self, but it might be. I bought the mouse about 3 months ago.

detyabozhye
October 10th, 2006, 02:08 AM
So, you get the same problem with the "mouse" and the "evdev" driver, or only with evdev?

binatice
October 10th, 2006, 03:10 AM
I don't quite understand the question, but I utilized the How to here and it displays the same problems as before. If that is what your asking.

detyabozhye
October 10th, 2006, 04:52 PM
Well, before the guide you were most likely using the mouse driver. And it was bad then too, correct?

erdu
October 10th, 2006, 06:19 PM
I'd love to use button 10 on my mx1000 to close a window. My global shortcut for closing windows is Alt + z. However, when I write

"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[z]""
m:0x0 + b:10

in my .xbindkeysrc file, nothing happens, the window doesn't close. If I write:

"/usr/bin/xvkbd -xsendevent -text "\[Control]\[w]""
m:0x0 + b:10

some windows close, some don't. Those that close, do produce a beep from the computer speaker after closing though. Any idea how I could use b:10 to close any window? Thanks...

NoTiG
October 10th, 2006, 10:43 PM
A couple of questions....... i got the evdev driver to load and everything. However....

i want to bind my thumb button my my mouse to acting as Control....... i know from using xev, that the button is button 8. in my configuration file i tried binding it like this:

"/usr/bin/xvkbd -xsendevent -text "\[Control]""
m:0x0 + b:8

And it doesnt seem to work....... how do i bind it to act like control? I tried binding it to ^... but it just prints that character...

Secondly........ using xev, my mouse buttons 1-8 were detected (i didnt notice a 2) .... that includes scroll weel up down and tilt left and right. But...... the two buttons above the scrollwheel on my mouse did not send any signals to xev.....

detyabozhye
October 10th, 2006, 11:14 PM
A couple of questions....... i got the evdev driver to load and everything. However....

i want to bind my thumb button my my mouse to acting as Control....... i know from using xev, that the button is button 8. in my configuration file i tried binding it like this:

"/usr/bin/xvkbd -xsendevent -text "\[Control]""
m:0x0 + b:8

And it doesnt seem to work....... how do i bind it to act like control? I tried binding it to ^... but it just prints that character...

xvkbd will only do a kepress event, not a key down and keyup event. I don't know if it's possible to do a key down and key up using xbindkeys.

Secondly........ using xev, my mouse buttons 1-8 were detected (i didnt notice a 2) .... that includes scroll weel up down and tilt left and right. But...... the two buttons above the scrollwheel on my mouse did not send any signals to xev.....

2 is scroll-wheel click.