Jump to content

redhat9 mouse wheel


Recommended Posts

Is there a simple way to get my mouse wheel to work in redhat 9? Its a logitech mouseman, and it drives me nuts no being able to scroll up and down a page. I would think that by now this feature would be automatically set at install, after all it sees I have a "third" button (which shows as a wheel, but NOOOOOOOOO!! lol

Link to comment
Share on other sites

This should help you. ramfree17 had already quoted it from old forums (see here), but being in a quote prevents it from being found by the search feature...

--------------------------------

3 buttons + wheel (button). i want to use the 3rd button and not the wheel as the 3rd button.
The solution is in two steps:

 

- step 1: configure properly your mouse, so that all your buttons are recognized, whatever the numbers assigned to them.

- step 2: use the xmodmap command to reassign the buttons numbers.

 

I think I can help you for both steps, but I have a Logitech optical USB MouseMan+ (code M-BD53) with wheel and thumb button (the one which is for right-handed persons only), and I don't know how much of my experience will apply to your mouse. I'll try to explain all along, so that you're able to adapt. Here's how I would do that:

 

step 1

 

Login as root (or better: su - root, if you know what I mean). In /etc/X11/. In my case, here is the total section:

Section "InputDevice"

 Identifier "Mouse1"

 Driver "mouse"

 Option "Protocol" "ExplorerPS/2"

 Option "Device" "/dev/psaux"

 Option "Buttons" "8"

 Option "ZAxisMapping" "6 7"

 Option "Resolution" "400"

EndSection

I'll now comment it. Identifier and Driver can (must?) be left unchanged. Protocol and Device are totally unrelated: you can perfectly use the "PS/2" protocol (a good start) with an USB device.

 

Normally, Device should be left unchanged if your mouse works (else is wouldn't work...). But if that's not the case (you're in "keyboard-only usage"), try putting the good device (usually /dev/usbmouse for USB or /dev/psaux for PS/2).

Here I use the "ExplorerPS/2" protocol, which enables me to use all buttons (the "MouseManPlusPS/2" protocol does not allow the usage of the thumb button for me).

 

First remove the ZAxisMapping line (you'll put it back later), and set Buttons to a high-enough value (9 for example). Restart X. Open xev in a terminal window. In the little square xev window, click each button, and see what number it is given by X. Let's call those buttons LB (left button), MB (middle button), RB (right button), UB (up button, that is one click up with the wheel), DB (down button, that is one click down with the wheel), and TB (thumb).

 

You can now put the Option "ZAxisMapping" line again. After "ZAxisMapping", put "UB DB", that is "6 7" in my case. You can also assign to Buttons the value corresponding to the button with the highest number.

 

You're done with this file: all your buttons should have a number, hence be recognized.

 

step 2

 

Now you should know that all applications expect LB, MB, RB, UB, and DB to be 1, 2, 3, 4, and 5 in that order. But it is not the case for all protocols (eg. my mouse's protocol). So you have to tell X to adjust to your protocol. The way to do that is to execute a command similar to the following:

xmodmap -display :0 -e "pointer = 1 2 3 8 7 4 5 6" >/dev/null 2>&1

This is the line for me. With this line, I tell that the 8 buttons of the protocols are to be rearranged:

- 1 becomes 1 (no change because LB was was already 1)

- 2 becomes 2 (no change because MB was already 2)

- 3 becomes 3 (no change because RB was already 3)

- 4 becomes 8 (none of my mouse's buttons is numbered 4 in xev, so I replace 4 with a number unused by X: 8 )

- 5 becomes 7 (none of my mouse's buttons is numbered 5 in xev, so I replace 5 with a number unused by X: 7)

- 6 becomes 4 (xev reports UB to be 6, but I need it to be 4, so that it can be used by X)

- 7 becomes 5 (xev reports DB to be 7, but I need it to be 5, so that it can be used by X)

- 8 becomes 6 (xev reports TB to be 8; X does not use button 6 but well... maybe it will be of some use one day).

 

You have to adapt this command to your needs, and to the numbers xev reports. In your case, I understand you want the thumb button to replace the middle button (number 2), probably because it is easier to click on the thumb button than clicking on the wheel. In that case, using the numbers reported by xev for my mouse, I would have written (remember that TB is 8 for me):

"pointer = 1 6 3 8 7 4 5 2"

 

That way, button 8 becomes button 2. Cool, isn't it? And the whell button (MB) is assigned the number 6 (who knows, maybe some application will make use of it one day...)

 

There remains to place this command in a file, so that it gets executed each time you login to your window manager, or better yet: each time you start X. I tried to find such a place (if possible independant of the window manager I use), and I did not find it. So I finally placed the command in /etc/profile. In Mandrake8.1, it works for all users except root (but then, I never login as root, I only su, so that's OK) but in other versions of Mandrake, or other distributions, you may have to place the command somewhere else.

 

Note also that I executed the command with parameters -display :0 and with >/dev/null 2>&1. That's because I expect DISPLAY to be not set and errors to occur when I log in the console. If you find a better place for executing your command, where you're sure that it is executed only if X is running, then I strongly advise to replace -display :0 with -display $DISPLAY (if $DISPLAY is set of course, which it should); and please tell me about this better place :)

 

That's all. I hope this helps.

--------------------------------

 

Yves.

 

[NOTE:]EDITED, because parts of the post somehow disapeared over time!!

Edited by theYinYeti
Link to comment
Share on other sites

Guest beeboy

You would think after all this time linux would have better mouse support. My printer and scanner are well - supported but not my mouse. Each time I install a new version of Mandrake I'm hoping for 3d acceleration and a working mouse but no - its the same old same old.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...