How to disable Middle-Mouse-wheel Click to Paste (XFCE)

Message
Author
User avatar
remoteone
Posts: 48
Joined: Sat Jul 20, 2019 9:04 am

How to disable Middle-Mouse-wheel Click to Paste (XFCE)

#1 Post by remoteone »

This is apparently a problem that has been around in linux for decades.
The problem is that most mice these days have sensitive mouse wheel button action.
Thats great for most things , except click-to-paste. I know Im not alone with this issue as there are thousands of requests over the web for a simple way to disable this.
Im not changing my expensive G304 mouse to one with a heavier action after finally finding one that has high enough DPI to work productively on a 4K display.
The problem is with accidental pastes when writing article, emails etc. Imagine your username or password mistakenly being pasted into an email:
This issue
- Big SECURITY RISK
- Poor Productivity, having to manually check and re-check articles before sending/publishing.
- Random pastes completely stuffing php/html coding.

I could not find a setting in the Settings Editor or other Mouse/Touchpad settings managers.
My last resort may be to dismantle the mouse to try and make the click tension heavier.

Is there a way to disable JUST the Click to Paste "feature" of the Middle-Mouse-wheel in MXL xfce?

User avatar
JayM
Posts: 6796
Joined: Tue Jan 08, 2019 3:47 am

Re: How to disable Middle-Mouse-wheel Click to Paste (XFCE)

#2 Post by JayM »

A web search comes up with many, many sites with solutions for disabling only the click-to-paste mouse wheel function in Linux. Try it.
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

User avatar
remoteone
Posts: 48
Joined: Sat Jul 20, 2019 9:04 am

Re: How to disable Middle-Mouse-wheel Click to Paste (XFCE)

#3 Post by remoteone »

Thank you for your suggestion Jay,
After I tried one, that did nothing, decided to reach out to a more direct approach...the forum.
Most "solutions" describe known bugs associated with clipboard managers, or are for Gnome or other platforms. I was hoping for a specific solution for Debian/Xfce to prevent wasting my life testing this-and-that possible application for days on end!
This is a productivity issue... and Ive got work to do!solution
Crazy that in the end I may need to mechanically modify the mouse to solve an obvious security risk.

User avatar
remoteone
Posts: 48
Joined: Sat Jul 20, 2019 9:04 am

Re: How to disable Middle-Mouse-wheel Click to Paste (XFCE)

#4 Post by remoteone »

Well, of some help is the config setting in Mozilla FF and Thunderbird for middlemouse.paste
Still need this OS wide for coding etc. but its a start.
Last edited by remoteone on Thu Nov 12, 2020 10:56 pm, edited 1 time in total.

User avatar
JayM
Posts: 6796
Joined: Tue Jan 08, 2019 3:47 am

Re: How to disable Middle-Mouse-wheel Click to Paste (XFCE)

#5 Post by JayM »

https://linuxconfig.org/how-to-disable- ... ossa-linux

Install the gnome-tweaks package, open a terminal and run

Code: Select all

gnome-tweaks
and follow the instructions on that website. I found this by searching Duckduckgo for the text of the subject of your post. Since Xfce is GTK-based it should work even though the instructions are for Gnome.
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

User avatar
remoteone
Posts: 48
Joined: Sat Jul 20, 2019 9:04 am

Re: How to disable Middle-Mouse-wheel Click to Paste (XFCE)

#6 Post by remoteone »

Thanks JayM, that seems to have worked, I'll test further to see if it stuffs anything else.
I did find that page with a Startpage search, but am so used to getting failures/bugs of non-GTK-based apps that didnt want to risk it.
Mind you the list of errors that pop up in terminal are a worry:

Code: Select all

WARNING : Shell not installed or running
WARNING : Error loading desktopfile: ~/.config/autostart/gnome-keyring-secrets.desktop
WARNING : Error loading desktopfile: ~/.config/autostart/copyq.desktop
WARNING : Error loading desktopfile: ~/.config/autostart/blueman.desktop
WARNING : Error loading desktopfile: ~/.config/autostart/xfce4-volumed.desktop
WARNING : Shell not running
NoneType: None
WARNING : Error detecting shell
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gtweak/tweaks/tweak_group_shell_extensions.py", line 217, in __init__
    raise Exception("Shell not running or DBus service not available")
Exception: Shell not running or DBus service not available

(gnome-tweaks:7999): Gtk-WARNING **: 14:30:31.380: gtk_window_present_with_time() should not be called with 0, or GDK_CURRENT_TIME as a timestamp, the timestamp should instead be gathered at the time the user initiated the request for the window to be shown

(gnome-tweaks:7999): GLib-GIO-CRITICAL **: 14:30:31.391: g_dbus_proxy_new: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
(repeated ~11 times )

User avatar
metreo
Posts: 101
Joined: Mon Oct 12, 2020 1:56 pm

Re: How to disable Middle-Mouse-wheel Click to Paste (XFCE)

#7 Post by metreo »

Disabling middle-click is something I would expect find as a white check-box in the Terminal Settings manager.
"Although only a few may originate a policy, we are all able to judge it." - Pericles

User avatar
JayM
Posts: 6796
Joined: Tue Jan 08, 2019 3:47 am

Re: How to disable Middle-Mouse-wheel Click to Paste (XFCE)

#8 Post by JayM »

metreo wrote: Fri Nov 13, 2020 12:53 am Disabling middle-click is something I would expect find as a white check-box in the Terminal Settings manager.
MX/Xfce doesn't have a terminal settings manager. There's Preferences within the Xfce4 Terminal if that's what you mean but I don't know why you'd expect to find global mouse configuration settings there.
Please read the Forum Rules, How To Ask For Help, How to Break Your System and Don't Break Debian. Always include your full Quick System Info (QSI) with each and every new help request.

User avatar
remoteone
Posts: 48
Joined: Sat Jul 20, 2019 9:04 am

Re: How to disable Middle-Mouse-wheel Click to Paste (XFCE)

#9 Post by remoteone »

Update Re: gnome-tweaks - did not fix the issue for gtk3 apps

User avatar
fehlix
Developer
Posts: 12613
Joined: Wed Apr 11, 2018 5:09 pm

Re: How to disable Middle-Mouse-wheel Click to Paste (XFCE)

#10 Post by fehlix »

remoteone wrote: Thu Nov 12, 2020 7:22 pm Is there a way to disable JUST the Click to Paste "feature" of the Middle-Mouse-wheel in MXL xfce?
Please post the output of this command running from terminal command line:

Code: Select all

xinput --list
You will get something like this as shown on my pc:

Code: Select all

xinput --list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ Logitech USB Laser Mouse                	id=11	[slave  pointer  (2)]
⎜   ↳ X10 WTI RF receiver mouse               	id=12	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]
    ↳ Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
    ↳ Power Button                            	id=6	[slave  keyboard (3)]
    ↳ Power Button                            	id=7	[slave  keyboard (3)]
    ↳   USB Keyboard                          	id=8	[slave  keyboard (3)]
    ↳   USB Keyboard System Control           	id=9	[slave  keyboard (3)]
    ↳   USB Keyboard Consumer Control         	id=10	[slave  keyboard (3)]
    ↳ X10 WTI RF receiver                     	id=13	[slave  keyboard (3)]
    ↳ ACPI Virtual Keyboard Device            	id=14	[slave  keyboard (3)]
My mouse has id=11
Now I can get the mouse buttons order this way:

Code: Select all

xinput --list 11 | egrep 'Buttons? '
where I got:

Code: Select all

xinput --list 11 | egrep 'Buttons? '
Buttons supported: 16
Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" "Button Side" "Button Extra" "Button Forward" "Button Back" "Button Task" "Button Unknown" "Button Unknown" "Button Unknown" "Button Unknown"
Please post the output of those command mentioned and we can adjust it to construct a command running e.g at login or bound to a keyboard shortcut dis disable / enable middle-click.

Post Reply

Return to “Software / Configuration”