The Linux, the Logitech, and the Firefox

User Help for Mozilla Firefox
Old martimus8
Posts: 0
Joined: December 31st, 1969, 5:00 pm

The Linux, the Logitech, and the Firefox

Post by Old martimus8 »

    SUMMARY
    I thought I would do a KB on how to ENABLE the Horizontal Scroll in Firefox under Mandriva Linux 2006 PowerPack+ (It should be the same for Mandriva LE 2006). The documentation that I found was somewhat incomplete and spread out. WHAT WILL BE COVERED is my current LINUX DISTRIBUTION, Mouse hardware and Firefox version. If you don't understand something please elaborate after you search the web first. I will do my best to answer any "features" that I have missed in this article to the best of my knowledge.

    Some things may be different for you...
    • Your distribution of Linux
    • Your mouse revision
    • Your version of Mozilla Firefox
    There are several variants of this configuration, but this setup seems to be the most robust and as far as I can tell the most portable and very usuable in Firefox under Mandriva Linux.

    If you wish additional information search on the web for "gentoo wiki How To for mouse nav buttons".

    PLEASE MAKE A BACKUP OF ANY CHANGES THAT YOU DO AND USE AT YOUR OWN RISK! :)

    HARDWARE
    Logitech MX-1000 Cordless Laser Mouse
    • Logitech USB Receiver plugged into an available USB Port (M/N C-BN34)
    • M-RAG97 Laser Mouse (MX1000 P/N 852152-0100)

      This mouse is commonly referred to as a 12 button mouse and I've even seen a reference that it has 32 buttons. :\

      X axis is typically referred to as "moving your mouse left or right".
      Y axis is typically referred to as "moving your mouse up or down".
      Z axis is typically referred to as "using the scroll wheel" to move up and down a web page quickly.
      W axis is typically referred to as "using the horizontal (tilt) scroll wheel" to move left and right on a web page quickly.

      The way it appears the kernel handles events from this mouse type is X, Y, Z and W axes and 10 real buttons (the two additional buttons are on the W axis )

      XWindows via whatever driver is chosen and configured will map those existing key events (buttons) into the Z and W axes...sometimes correctly, sometimes INCORRECTLY.
    OPERATING SYSTEM
    Mandriva Linux 2006 PowerPack+
    (Mandriva Linux Control Center 2006.0 (Official) Software Packages Update are current as of this writing)
    • Kernel 2.6.12-12mdk (Default installed kernel)
      • udev (Kernel module installed by default)
      • evdev (Xorg server module installed by default)
    • Xorg 6.9.0-5.7.20060mdk
    • KDE 3.4.2-55.5.20060mdk
    THE ULTIMATE WEB BROWSER
    Mozilla Firefox 1.5.0.4 (Mozilla Pre-compiled Build)
    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
    thru
    Mozilla Firefox 2.0 (Mozilla Pre-compiled Build)
    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0

    INSTALLATION

    • Plug in your mouse and reboot the computer just to make sure Mandriva has done all of it's automatic configuration, which is WHAT WE DO NOT WANT later.
    • Find out the reported name of your USB Logitech MX-1000 by running #less /proc/bus/usb/devices

      For my mouse it returned a lot of entries including this:
      T: Bus=01 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
      D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
      P: Vendor=046d ProdID=c50e Rev=25.10
      S: Manufacturer=Logitech
      S: Product=USB RECEIVER
      C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 70mA
      I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
      E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms

      NOTE: The text in green is what you are after on your system. You will need this EXACT TEXT to put into the next step. On most of the sites I visited, the web pages used the Logitech and USB Receiver entries, but mine is upper case... for this reason pay attention to the case of every alphanumeric character.

      In order to be more in sync with Mandrivas automatic configuration and to support a broader range of Logitech mice, I have recently changed the udev rule to use the numeric values instead of the text values.
    • Make a udev rule text file called 10-local.rules at /etc/udev/rules.d
      # udev rule for Logitech MX-1000 Cordless Laser Mouse

      KERNEL=="event*", \
      SYSFS{idVendor}=="046d", \
      SYSFS{idProduct}=="c50e", \
      SYMLINK="input/mx1000", \
      GROUP="root",OWNER="root",MODE="0664"

      Confirm permissions are set using #chmod 664 /etc/udev/rules.d/10-local.rules

      (more information can be found on udev rules by using $man udev and of course the internet)

      REBOOT
    • Find and Backup/Modify your input device called Mouse1 in the xorg.conf located at /etc/X11

      Code: Select all

      Section "InputDevice"
          Identifier "Mouse1"
          Driver "evdev"
          Option "Device" "/dev/input/mx1000"
      EndSection

      NOTES: If you plug in another mouse later on, Mandriva's automatic configuration is going to add another Mouse1 entry into the file and mess up the buttons and potentially lose mouse functionality altogether.

      To confirm the presence of this driver, check to see if /usr/X11R6/lib/modules/input/evdev_drv.so exists. Mandriva currently has not included documentation on the evdev driver, so I visited a Kubuntu installation and read their man page. Web searches for documentation of this driver have proven to be of little help.
    • Create a text file called .Xmodmap at the /etc/X11/xinit containing:
      ! Reorder middle click, right click, Z and W axes
      pointer = 1 3 2 4 5 6 7 8 9 10 11 12

      Confirm permissions are set using #chmod 664 /etc/X11/xinit/.Xmodmap

      NOTE: My mouse and Mandriva currently requires reordering of the buttons to make everything work in KDE and KDM and Firefox. I ran $/usr/X11R6/bin/xev in XWindows to tell me the button values and what needed to be reordered. (If you are looking for this binary but can't find it, it is typcially installed from the X11R6-contrib-6.9.0-5.7.20060mdk.rpm or newer). Events (buttons) 2 and 3 were mapped backwards; Events 4 and 5 should be the Z axis;. Events 6 and 7 should be the W axis, which is why I put in the above numeric sequence. Firefox currently only recognizes events 1 through 7 for mice. Once you think you have reordered them correctly, check xev again. Another mouse I have been testing out reorders 6 & 7 when 3 & 4 are reordered, so I had to reorder my order. :)
    • Create a shell script text file called Xmodmap at ~/.kde/Autostart containing:
      #!/bin/sh
      xmodmap /etc/X11/xinit/.Xmodmap

      Confirm permissions are set using $chmod 774 ~/.kde/Autostart/Xmodmap

      NOTE: Mandriva and KDE currently doesn't automatically call the binary executable xmodmap at the needed time that evdev is finished loading, so I have to tell it to call it using the configuration file made in the previous step.

      RESTART X
    • Create a text file called .Xmodmap at ~ containing:
      ! Reorder middle click, right click, Z and W axes
      pointer = 1 3 2 4 5 6 7 8 9 10 11 12

      Confirm permissions are set using $chmod 664 ~/.Xmodmap

      NOTE: Mandriva and GNOME needs access to this file to set the button mappings. If you wish to use a symbolic link to the global .Xmodmap made for KDE/KDM, you can, instead of creating a new text file (e.g. $ln --symbolic /etc/X11/xinit/.Xmodmap ~/.Xmodmap ... Symbolic links don't have permissions, but their targets do.).

      RESTART X
    • Set Firefox Preferences (about:config in URI address bar)

Code: Select all

mousewheel.horizscroll.withnokey.action        user set   integer   0
mousewheel.horizscroll.withnokey.numlines      default    integer   -1
mousewheel.horizscroll.withnokey.sysnumlines   user set   boolean   true
      FINAL NOTES:
      If you are running the SmoothWheel extension, you may have to disable it. The current version of SmoothWheel was designed to replace the DOMMouseScroll Listener and is forced to treat ALL scroll events as a vertical (Z axis) scroll. The authors most recent post for this extension is here. Apparently this release of Firefox hasn't fully implemented the DOM Level 2 specification for the DOMMouseScroll event. When an event is reviewed, the .button property always returns 0 (meaning Firefox button 0 (or left click)) which is not correct. OOPS!!!

      If it still isn't working, make sure some other extension is not interfering.

Good luck! :)

EDIT: Additional clarification of event sequence, a few grammar/comments fixerz, and a more detailed explanation of why SmoothWheel interferes
EDIT: Additional clarification of where to find, the recently elusive, xev.
EDIT: Warning about loss of mouse use; Repeat xev to confirm reorder; Symbolic link example; Works in FF 2.0 too
EDIT: Changed udev rule; Location of evdev driver check
Last edited by Old martimus8 on November 11th, 2006, 10:51 am, edited 24 times in total.
User avatar
craigevil
Posts: 3103
Joined: February 20th, 2005, 2:12 pm
Location: OZ
Contact:

Post by craigevil »

You should do a page for the KB with the above info.
Raspberry PI 400 Distro: Raspberry Pi OS Base: Debian Sid Kernel: 5.15.26-v8+ aarch64 DE: MATE Ram 4GB
Debian - "If you can't apt install something, it isn't useful or doesn't exist"
My Giant Sources.list
Old martimus8
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old martimus8 »

craigevil wrote:You should do a page for the KB with the above info.
    Don't really know how to do that on Mozilla's site here...but thanks...sometimes I need some hand-holding on certain things...I dove into this right after I bought my drawing tablet a couple weeks ago ...still working on that one, but this will help clear my head for that task as well as help others. :)
User avatar
malliz
Folder@Home
Posts: 43796
Joined: December 7th, 2002, 4:34 am
Location: Australia

Post by malliz »

Post here
http://forums.mozillazine.org/viewtopic ... 25#2245025
With a link and the mods will see it
What sort of man would put a known criminal in charge of a major branch of government? Apart from, say, the average voter.
"Terry Pratchett"
Old martimus8
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old martimus8 »

TECH STUFF (Best viewed on at least 1024x768 Screen)

For those of you who like technical stuff (systems analysis and hardware i/o)...this is how I derived the .Xmodmap values from observation of what my Linux distribution was doing all the way to my .Xmodmap. This is how this particular mouse "boots up" on defaults. It is possible that there are "enhanced modes" that are off by default...but I haven't gotten that far yet. But for those using Firefox in Linux, one can successfully have 12 buttons and do the horizontal scroll too :) (and let the kernel/xorg handle the mousemove/mousedown/mouseidle events) :D

Code: Select all

DESCRIPTION        TYPE      VIRTUAL STATES       Linux   Xorg     .Xmodmap
----------------------------------------------------------------------------
Left Click         Physical  mousedown/mouseidle  Key272  1        1
Right Click        Physical  mousedown/mouseidle  Key273  2        3
Middle Click       Physical  mousedown/mouseidle  Key274  3        2

Left Wheel Click   Virtual   mousedown/mouseidle  Key280  n/a      n/a
Right Wheel Click  Virtual   mousedown/mouseidle  Key281  n/a      n/a

Up Wheel           Physical  mousedown/mouseidle  Rel8     6       4
                                                              > ?    > Z
Down Wheel         Physical  mousedown/mouseidle  Rel8     7       5
Near-Side Click    Physical  mousedown/mouseidle  Key275   8       8
Far-Side Click     Physical  mousedown/mouseidle  Key276   9       9
Middle-Side Click  Physical  mousedown/mouseidle  Key277   10      10
Up Wheel Click     Physcial  mousedown/mouseidle  Key278   6       11
Down Wheel Click   Physical  mousedown/mouseidle  Key279   7       12




Move left          Virtual   mousemove-/mouseidle                 
                                                   Rel0     X       n/a
Move right         Virtual   mousemove+/mouseidle                 


Move up            Virtual   mousemove-/mouseidle           
                                                   Rel1     Y       n/a
Move down          Virtual   mousemove+/mouseidle           


Scroll left        Virtual   mousemove-/mouseidle           4       6
                                                   Rel6        > Z     > W
Scroll Right       Virtual   mousemove+/mouseidle           5       7


There's bound to be a slight typo in here somewhere as this took me about 3 weeks to figure out over 3 different Linux distributions...so patience. :)
Old martimus8
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post by Old martimus8 »

    Made some important changes to the original post...if you are watching, please review. I believe it is complete as I can get it now.
malliz wrote:Post here
http://forums.mozillazine.org/viewtopic.php?p=2245025#2245025
With a link and the mods will see it
    Done! :D
User avatar
martimus8
Posts: 33
Joined: November 10th, 2007, 9:41 pm

Post by martimus8 »

    OH THANK GOD this wasn't lost. *PHEW* Sucky that I have to recode this as I do have an update for it too
User avatar
Daifne
Moderator
Posts: 123071
Joined: July 31st, 2005, 9:17 pm
Location: Where the Waters Meet, Wisconsin

Post by Daifne »

martimus8,

If you need to edit any of that, contact one of us moderators. We can edit your posts for you. We could also PM you the original post...
User avatar
martimus8
Posts: 33
Joined: November 10th, 2007, 9:41 pm

Post by martimus8 »

Daifne wrote:martimus8,

If you need to edit any of that, contact one of us moderators. We can edit your posts for you. We could also PM you the original post...
    It would save me some serious time on the bbcode... I'm not sure how pm'ing works here though... never utilized that feature... thanks for gettting the old posts renamed though... I just printed this too... my printer doesn't get much use, but glad that I have it... i will probably need to generate a new post as I tweak it every Mandriva distro that comes out. (sometimes less)... so some indication that it's old will eventually be good... A forward reference to my new post would be nice when I create it.
User avatar
Daifne
Moderator
Posts: 123071
Joined: July 31st, 2005, 9:17 pm
Location: Where the Waters Meet, Wisconsin

Post by Daifne »

Another way. Click on Quote for the message you want and copy the stuff you want and then just cancel the reply. That will get it in your hands. Once you change it the way you want it, one of us can replace it for you.

At the bottom of every post from a registered user, there is a [Pri. Msg.] link. That will take you to a private message. Also, over on the right, there's a link that says "No new messages" (if you don't have any PM's) that will take you to the PM area.

BTW, if you haven't heard, we are working on new forums. This one will be archived. It might be better to post the changes in the new forum rather than here. Or we can do both. The posts in this forum will be accessible, but no longer live.
User avatar
martimus8
Posts: 33
Joined: November 10th, 2007, 9:41 pm

Post by martimus8 »

Daifne wrote:Another way. Click on Quote for the message you want and copy the stuff you want and then just cancel the reply. That will get it in your hands. Once you change it the way you want it, one of us can replace it for you.

At the bottom of every post from a registered user, there is a [Pri. Msg.] link. That will take you to a private message. Also, over on the right, there's a link that says "No new messages" (if you don't have any PM's) that will take you to the PM area.

BTW, if you haven't heard, we are working on new forums. This one will be archived. It might be better to post the changes in the new forum rather than here. Or we can do both. The posts in this forum will be accessible, but no longer live.
    Alright... I'm still in shell shock... out of the 2 thousandish hits on this sucker i've done about 500... so it's seems to me to be a popular one... which is why i maintain it... the changes are minor for the new post, so it can wait for the new forum.
Last edited by martimus8 on November 10th, 2007, 10:58 pm, edited 1 time in total.
User avatar
Daifne
Moderator
Posts: 123071
Joined: July 31st, 2005, 9:17 pm
Location: Where the Waters Meet, Wisconsin

Post by Daifne »

I put it in the Lost users topic for you. I'd rather not put it here yet. ;-)
User avatar
martimus8
Posts: 33
Joined: November 10th, 2007, 9:41 pm

Post by martimus8 »

Daifne wrote:I put it in the Lost users topic for you. I'd rather not put it here yet. ;-)
    No prob... got it... sometimes it's interesting playing forum tag... TAG YER IT! ;)
User avatar
Daifne
Moderator
Posts: 123071
Joined: July 31st, 2005, 9:17 pm
Location: Where the Waters Meet, Wisconsin

Post by Daifne »

:-)

Or, tanstaafl has just opened a topic in Moz Site Discussion about which topics should be moved or made into KB articles. Post a link to this there.
User avatar
martimus8
Posts: 33
Joined: November 10th, 2007, 9:41 pm

Post by martimus8 »

Daifne wrote::-)

Or, tanstaafl has just opened a topic in Moz Site Discussion about which topics should be moved or made into KB articles. Post a link to this there.
    I wouldn't mind it being a KB, but I would need access to make modifications... apparently due to this white paper, Mandriva added support for the Logitech series of mice (even though theirs is a lil buggy sometimes)... they have some good ideas too at Mandriva... but this article applies to almost all distributions of Linux... and those distro's haven't even supported Logitech mice yet. I have access to TONS of mice, so every chance I get, I grab their settings and log them (that's one of my updates on my TODO list)

    Anyhow... kewl beanz! :)
Post Reply