4

I have a mouse that I suppose nowadays is quite uncommon, Logitech Usb Marble mouse. There was a question about this specific mouse, however it was too localized as it dealt with Ubuntu 12.04 and older versions and the solution no longer applies. In the question, there was a link to an Ubuntu help page specifically designed for my model mouse, however it hasn't been updated in years and the solutions are no longer compatible with 12.10 and up.

Creating a 50-marblemouse.conf file as directed for earlier versions of Ubuntu causes the system to break. I have to usb boot and delete the offending file before I can run my distribution again.

So the question is, how do I customize my mouse button functions (i.e. pressing the two smaller mouse buttons to simulate a middle mouse button click) on Ubuntu 14.04?

Nil
  • 1,006

3 Answers3

0

Have a look at this:

https://wiki.archlinux.org/index.php/Logitech_Marble_Mouse#Configuration_file

To cut a long story short, making the required edits in 10-evdev.conf and not in 50-marblemouse.conf did the job for me.

No Time
  • 1,073
0

On Ubuntu 14.04:

  1. edit /usr/share/X11/xorg.conf.d/10-evdev.conf, e.g. sudo vim /usr/share/X11/xorg.conf.d/10-evdev.conf
  2. add the below block to the end of 10-evdev.conf
  3. log out and back in

Copied from https://wiki.archlinux.org/index.php/Logitech_Marble_Mouse#Configuration_file :

#       - - - Logitech Marble Mouse Settings - - -
#
#       The Logitech Marble Mouse buttons are mapped [A-D] from left to right: 
#       A (large); B (small) |  C (small); D (large). 
#
#       Preferred options for right-handed usage:
#       A = normal click [1]  
#       B = middle-click [2] 
#       C = middle-click [2] 
#       D = right-click [3]
#       Hold button B while rolling trackball to emulate wheel-scrolling. 
#
#       Preferred options for left-handed usage:
#       A = right-click [3]  
#       B = middle-click [2] 
#       C = middle-click [2]
#       D = normal click [1]
#       Hold button C while rolling trackball to emulate wheel-scrolling.
#       Pressing both large buttons simultaneously (b) produces a "back" action.

Section "InputClass"
        Identifier  "Marble Mouse"
        MatchProduct "Logitech USB Trackball"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"

#       Physical button #s:     A b D - - - - B C    
#       Option "ButtonMapping" "1 8 3 4 5 6 7 2 2"   right-hand placement
#       Option "ButtonMapping" "3 8 1 4 5 6 7 2 2"   left-hand placement
#       b = A & D 
        Option "ButtonMapping" "1 8 3 4 5 6 7 2 2"

#       EmulateWheel: Use Marble Mouse trackball as mouse wheel 
#       Factory Default: 8; Use 9 for right side small button
        Option "EmulateWheel" "true"
        Option "EmulateWheelButton" "8"

#       EmulateWheelInertia: How far (in pixels) the pointer must move to
#       generate button press/release events in wheel emulation mode.
#       Factory Default: 50
        Option "EmulateWheelInertia" "10"

#       Axis Mapping: Enable vertical [ZAxis] and horizontal [XAxis] scrolling
        Option "ZAxisMapping" "4 5"
#       Option "XAxisMapping" "6 7"

#       Emulate3Buttons: Required to interpret simultaneous press of two large
#       buttons, A & D, as a seperate command, b.
#       Factory Default: true
        Option "Emulate3Buttons" "true"
EndSection
JDiMatteo
  • 283
  • 1
  • 3
  • 11
0

With Ubuntu 17 and in XFCE the middle mouse button copy paste did not work at all.

SOLUTION:

To enable the middle mouse button paste do edit the xinput.

a) Query your device: xinput list

Identify your mouse. With me it was device number 10.

b) xinput list-props 10

Gives me the settings for the mouse.

c) I need to change the value for "libinput Middle Emulation Enabled (294):" and I need to do it as root:

sudo xinput set-prop 10 "libinput Middle Emulation Enabled" 1

d) Check if the value changed to 1:

xinput list-props 10

Yes, it works: "libinput Middle Emulation Enabled (294): 1"

What is behind it: https://wiki.ubuntu.com/X/Config/Input

I strongly disagree that Ubuntu and Gnome decided to disable the standard Unix Middle Mouse paste. Even in XFCE Ubuntu 17 it is devastated.

Many, many thanks to Gilles (https://unix.stackexchange.com/users/885/gilles) who found the solution!!!

opinion_no9
  • 1,072