[SOLVED] Need optical mouse with side buttons that works out of the box with Lucid.
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Once you get your new mouse, plug it in (mostly, it should "just work" even if the button assignments are not quite what you wish) and then follow the above to generate your xorg.conf
Now draw a rough sketch of your mouse, and label what all the buttons currently do.
Eg "Left button" "Right Button" "scroll down" "Does nothing".
Then fire up xev in a terminal
A small window will open in addition to your terminal window. Position the mouse pointer in the xev window.
Now, when you press your mouse buttons, you'll see (in the terminal window) what they are reporting as happening (Eg, you press/release the left button, it'll probably be referred to as "Button 1"). You'll probably also see a lot of information about MotionNotify events, you can ignore this.
Annotate the drawing of your mouse to label the buttons as what xev reports their numbers as.
You should then be able to make a table a bit like this:
Code:
Button Name xev Number Current Action Desired action Needs Fixing?
--------------+------------------+---------------------+------------------+--------------
Left 1 Left Button Left Button
Right 3 Right Button Right Button
Middle 2 Middle Middle
Wheel Forward 5 Scroll back Scroll forward Y
Wheel Back 4 Scroll forward Scroll back Y
Etc.
Post your xorg.conf (In CODE tags please) and your table of what needs fixing (again, in CODE tags please, or it will not line up and will be very difficult to read), then we'll have something to work with.
Quote:
I think I understand how to create this file now but I don't know what needs to go in it to map the buttons?
To be honest, neither do I, I just have a 3-button mouse, and it works.
But I expect we'll be able to sort it out, if you give us the information we need about which buttons you have (names), what xev says they are numbered as, and what you'd like them to do instead.
Once you get your new mouse, plug it in (mostly, it should "just work" even if the button assignments are not quite what you wish) and then follow the above to generate your xorg.conf
Now draw a rough sketch of your mouse, and label what all the buttons currently do.
Eg "Left button" "Right Button" "scroll down" "Does nothing".
Then fire up xev in a terminal
A small window will open in addition to your terminal window. Position the mouse pointer in the xev window.
Now, when you press your mouse buttons, you'll see (in the terminal window) what they are reporting as happening (Eg, you press/release the left button, it'll probably be referred to as "Button 1"). You'll probably also see a lot of information about MotionNotify events, you can ignore this.
Annotate the drawing of your mouse to label the buttons as what xev reports their numbers as.
You should then be able to make a table a bit like this:
Code:
Button Name xev Number Current Action Desired action Needs Fixing?
--------------+------------------+---------------------+------------------+--------------
Left 1 Left Button Left Button
Right 3 Right Button Right Button
Middle 2 Middle Middle
Wheel Forward 5 Scroll back Scroll forward Y
Wheel Back 4 Scroll forward Scroll back Y
Etc.
Post your xorg.conf (In CODE tags please) and your table of what needs fixing (again, in CODE tags please, or it will not line up and will be very difficult to read), then we'll have something to work with.
To be honest, neither do I, I just have a 3-button mouse, and it works.
But I expect we'll be able to sort it out, if you give us the information we need about which buttons you have (names), what xev says they are numbered as, and what you'd like them to do instead.
There was nothing in xorg.conf for input devices. Mice or otherwise. I installed a Logitech LX8 laser mouse I just removed from another running system and installed it on this one. xev listed the buttons exactly the same as the other 2 mice I tried. I don't know what code tags are but I will try to make the chart you requested and see if this works. I couldn't figure out how to post the chart like you did so I attached a file.
There was nothing in xorg.conf for input devices. Mice or otherwise.
That is strange, because in order to help you I generated an xorg.conf and posted the steps I used above, and my xorg.conf has entries for my mouse and keyboard. If you did not have a mouse plugged in at the time, it won't be in xorg.conf, so you could try it again with a mouse plugged in.
I did ask you to post your /etc X11/xorg.conf would you please do so (in CODE tags please).
LQ CODE tags HOWTO:
"Quick replies" to LQ remove formatting and reduce multiple spaces / tabs to one space.
This messes up code posts, which lose their fixed space fonts and column spacing.
To enable CODE tags (and much other useful stuff) at the bottom of this "Quick Reply" window, click on "Go Advanced"
Paste your code into the editing window.
Select your code with the mouse.
Click the # [Place mouse over it and it reads "Wrap CODE tags around selected text"] button. Code tags will be added at the start and end of the selected text.
Click "Preview Post".
See?
Now scroll down to your post-editing window to make any changes, then "Preview Post" again.
When you are happy with the look of your post, click "Submit Reply".
It saves posting map.txt as an attachment, and makes LQ easier to read
I am a bit busy right now, but will look at map.txt. Meanwhile please post your (re-generated) xorg.conf (in CODE tags )
That is strange, because in order to help you I generated an xorg.conf and posted the steps I used above, and my xorg.conf has entries for my mouse and keyboard. If you did not have a mouse plugged in at the time, it won't be in xorg.conf, so you could try it again with a mouse plugged in.
I did ask you to post your /etc X11/xorg.conf would you please do so (in CODE tags please).
LQ CODE tags HOWTO:
"Quick replies" to LQ remove formatting and reduce multiple spaces / tabs to one space.
This messes up code posts, which lose their fixed space fonts and column spacing.
To enable CODE tags (and much other useful stuff) at the bottom of this "Quick Reply" window, click on "Go Advanced"
Paste your code into the editing window.
Select your code with the mouse.
Click the # [Place mouse over it and it reads "Wrap CODE tags around selected text"] button. Code tags will be added at the start and end of the selected text.
Click "Preview Post".
See?
Now scroll down to your post-editing window to make any changes, then "Preview Post" again.
When you are happy with the look of your post, click "Submit Reply".
It saves posting map.txt as an attachment, and makes LQ easier to read
I am a bit busy right now, but will look at map.txt. Meanwhile please post your (re-generated) xorg.conf (in CODE tags )
There must be something other than xorg.conf that contains mouse information like a driver with generic button mapping. My reasoning is all of the mice I have installed act the same way and work correctly (if you're right handed). Every time I install one I have looked at xorg.conf and there is never anything for input devices. When I run lsusb it usually doesn't have the correct mouse listed but does see a different mouse each time. Right now I have a Logitech LX8 installed. lsusb sees it as a Logitech v220. a v220 does not have side buttons but the LX8 does. The LX8 side buttons work (forward and back but just backward for me) but they do work.
It seems to me that you have not managed to generate a proper xorg.conf (see my previous posts) because here is mine ( as generated by Xorg -configure, and subsequently modified, as commented ):
Code:
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "keyboard"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "yes"
Option "ZAxisMapping" "4 5"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
Section "Device"
Identifier "Configured Video Device"
Driver "nvidia"
# Next line added by tred to fix up flaky Sony hardware for NVIDIA brightness keys
Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection
Section "Screen"
Identifier "Default Screen"
Device "Configured Video Device"
Monitor "Configured Monitor"
# next 2 lines added by tred to fix HW problems with a sony laptop display and the NVIDIA module
Option "Connected Monitor" "DFP-0"
Option "CustomEDID" "DFP-0: /proc/acpi/video/NGFX/LCD/EDID"
SubSection "Display"
Modes "1920x1080" "1600x1024" "1280x1024" "800x600"
EndSubSection
EndSection
You can see that I have all the right sections for "InputDevice" keyboard and mouse etc.
I do not think you have followed my previous instructions properly, or you should have a complete xorg.conf file to modify by now. Remember, I am running ubuntu 10.04 (32bit) as you apparently are. My system is updated to be "current".
You did not take any notice of my advice about code tags, so I am thinking you are not reading my posts carefully enough, or not prepared to learn.
Time for you to re-read this thread, from the beginning, very carefully I think.
Make sure you can generate an xorg.conf with your mouse plugged in.
Perhaps compare the newly configured file at /root/xorg.conf.new with the current one at /etc/X11/xorg.conf ?
Then, maybe, we can progress.
"I was in a hurry, I maybe mistyped something, it gave some error that I couldn't be bothered to read, or report here, but it still doesn't work" simply isn't good enough for LQ. We need all the gory details to be able to help you help yourself.
I have read and understand your map.txt Thank you for that information.
But you still need a proper xorg.conf to modify, and you need to post it here before I can suggest to you what to change. At the moment, your posted xorg.conf is very incomplete.
I think you have some "homework" to do.
Please post your results here when you have done it.
Button Name xev number Current Action Desired action Needs Fixing?
--------------+--------------+---------------------+------------------+--------------
left 1 left click left click
right 3 right click right click
wheel 2 wheel click wheel click
up 4 wheel up wheel up
down 5 wheel down wheel down
tilt L 6 tilt left tilt left
tilt R 7 tilt right tilt right
side L 8 left side right side Y
side R 9 right side left side Y
Buttons 1-7 all work as expected and desired. It's just buttons 8 and 9 that you'd like to be leftified
So you just need to swap them.
Try adding this line (in bold) to your /etc/X11/xorg.conf (You'll need to be root to do this)
Button Name xev number Current Action Desired action Needs Fixing?
--------------+--------------+---------------------+------------------+--------------
left 1 left click left click
right 3 right click right click
wheel 2 wheel click wheel click
up 4 wheel up wheel up
down 5 wheel down wheel down
tilt L 6 tilt left tilt left
tilt R 7 tilt right tilt right
side L 8 left side right side Y
side R 9 right side left side Y
Buttons 1-7 all work as expected and desired. It's just buttons 8 and 9 that you'd like to be leftified
So you just need to swap them.
Try adding this line (in bold) to your /etc/X11/xorg.conf (You'll need to be root to do this)
Also since I changed Xorg per your instructions, Ubuntu stops during boot with the following error:
Code:
Ubuntu is running in low graphics mode
The following error was encountered you may need to update your configuration to solve this:
(EE)[drm] failed to open device
(EE) No device detedted
OK
Once I click ok I get these choices:
Code:
o Run in low
o Reconfigure graphics
o Troubleshoot
o Exit to console Login
o Restart X
I've been choosing restart X to get it to finish booting.
It didn't work. Does Firefox use it's own mapping? I tried forward and back using eBay. Here's xorg.conf again
You need to be more specific than "it didn't work". So I have some questions for you:
Q1] You mean the buttons are not swapped or they do not work at all?
Q2] Did they work before (but the "wrong" way round) ?
Note that FF3 uses side buttons differently from FF2. In FF3 buttons 8 and 9 are used for forward / back. This seems to be the way your mouse is already configured. I don't have side buttons.
Quote:
Also since I changed Xorg per your instructions, Ubuntu stops during boot with the following error:
Ubuntu is running in low graphics mode
The following error was encountered you may need to update your configuration to solve this:
(EE)[drm] failed to open device
(EE) No device detedted
Adding only one line in xorg.conf (Option "ButtonMapping" - it looks OK, and you put it in the right place) should not account for this error.
I don't use drm, I use the NVIDIA proprietry driver.
Quote:
I've been choosing restart X to get it to finish booting.
Q3] I am not sure what you mean by this, if you "restart X", does it eventually give you a normal display? Or is the resolution wrong?
To help you with your testing, you should be able go back to how you were before you generated xorg.conf (with the display resolution as it was, and your side-buttons as they were) just by renaming xorg.conf (so it won't be used) like this:
You need to be more specific than "it didn't work". So I have some questions for you:
Q1] You mean the buttons are not swapped or they do not work at all?
Q2] Did they work before (but the "wrong" way round) ?
Note that FF3 uses side buttons differently from FF2. In FF3 buttons 8 and 9 are used for forward / back. This seems to be the way your mouse is already configured. I don't have side buttons.
Adding only one line in xorg.conf (Option "ButtonMapping" - it looks OK, and you put it in the right place) should not account for this error.
I don't use drm, I use the NVIDIA proprietry driver.
Q3] I am not sure what you mean by this, if you "restart X", does it eventually give you a normal display? Or is the resolution wrong?
To help you with your testing, you should be able go back to how you were before you generated xorg.conf (with the display resolution as it was, and your side-buttons as they were) just by renaming xorg.conf (so it won't be used) like this:
xev shows button 8 on the left side and 9 on the right.
Q2- The side buttons have always worked just backwards for me. Reversing 9 and 8 in the button mapping didn't change anything. Once I seen what you were trying to accomplish it made sense to me but unfortunately didn't reverse the function of the buttons.
Q3-If you look at my last post at the bottom you will see the choices I had to clear the error and continue booting. I chose restart X.
Code:
Once I click ok I get these choices:
Code:
o Run in low
o Reconfigure graphics
o Troubleshoot
o Exit to console Login
o Restart X
I've been choosing restart X to get it to finish booting. I don't know if the resolution changed. It looks the same to me. When I installed Lucid I changed the resolution to 1280X1024 and it's been that way.
Q5- The buttons are still the same as they have been. Left button goes back (8) and the right button goes forward (9). BTW, my Firefox is current version 3. I think you are incorrect about how Firefox uses the side button assignments. I've used many mice with side buttons and ALL of them use the left side as back and the right side as forward. It's the default setting.This includes XP. However, you can reverse the function with XP. I've been using side buttons reversed for years. This is why I want Ubuntu to do this also.
Q4- I will get back to you on this after I attempt to correct it without going back the way it was which was wrong anyway as you pointed out.
BTW, thank you very much for your help so far. I'm learning a lot.
Sorry, I have experienced a hard drive failure. Shame on me for using a used drive! What the hell, it's a learning system to wean me off of Microsoft hopefully. Once I get back where I was, I will report back.
Well, I reinstalled 10.04 Lucid and restored most of what I had before. I did notice that xorg.conf was almost empty again. I had to install the nvidia driver so I could get the screen to be 1280 X 1024 again. Since I did that the xorg.conf file is loaded again like when I correctly did your Xorg routine. The xorg.conf section for the mouse is a little different but has no effect with the operation of the mouse.
Glad to see you are up and running again. And that you have the NVIDIA module installed (nouveau was unable to handle my nvidia chipset).
While you were away I borrowed a 7 button mouse, and played with it.
You are right: those lines in xorg should swap the buttons, but they have no effect at all.
I expect something has changed in the way X works, but I cannot find the documentation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.