SliTaz SliTaz Forum

You are not logged in.

#1 2014-01-16 17:02:24

slinoob
Member
Registered: 2014-01-16
Posts: 10

Disable context menu from LXPanel or temp disable right mouse

I've configured a user account for the kids, used hsetroot for a simple background with no icons or right click options, removed all other panels and options to prevent change / messing. The only panels left are lxpanels which have the allowed installed games (gcompris, childsplay, logout etc.)

Although i've set permissions on the tux/.config directory so no changes are saved anyway is there any way to disable the right mouse menu from lxpanel or disable the right mouse for the entire session?

Thanks in advance.

Offline

#2 2014-01-16 18:35:35

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: Disable context menu from LXPanel or temp disable right mouse

Install xorg-xev and xorg-xmodmap.

In terminal: [c]xev | grep button[/c]

Put the mouse cursor in the Event Tester box, click the button you want to disable.

Terminal will indicate the button number.

Close out Event Tester box.

In terminal: [c]xmodmap -pp[/c]

Make note of the number of pointer buttons defined.

Now you map the button you want to disable to a button +1 greater than number of defined

Example:

Button to be disabled is 3

There are 16 pointer buttons defined.

[c]xmodmap -e "pointer = 1 2 17"[/c]

To re-enable button

[c]xmodmap -e "pointer = 1 2 3"[/c]

Autorun command on user login:

SliTaz-4.0 add to ~/.config/openbox/autostart.sh

Offline

#3 2014-01-17 10:30:16

slinoob
Member
Registered: 2014-01-16
Posts: 10

Re: Disable context menu from LXPanel or temp disable right mouse

Terrific response, thank you.

Everything is exactly as per your instructions and the right mouse click is now safely out of harms reach!

Offline

#4 2014-01-21 21:23:40

slinoob
Member
Registered: 2014-01-16
Posts: 10

Re: Disable context menu from LXPanel or temp disable right mouse

Just a quick update in case anybody else finds this useful...

Mojo's solution works perfectly but was implemented / understood poorly by me! Originally it worked for the needs of a laptop user with only 2 integrated mouse buttons. But, as soon as a USB mouse is plugged in with say a scroll wheel, the scroll wheels click can then access certain menus etc.

So I ended up adding the following line to the autostart.sh

xmodmap -e "pointer = 1 20 21"

This appears (so far) to stop the user from using anything but the left click on any attached mouse / integrated touchpad etc.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]