Disable Mouse Right Click [Resolved]

Using applications, configuring, problems
Post Reply
Message
Author
LenseOnLife
Posts: 18
Joined: Thu 12 Oct 2017, 06:36
Location: Ireland
Contact:

Disable Mouse Right Click [Resolved]

#1 Post by LenseOnLife »

Hi,

Me again :)

BACKGROUND: Fujitsu Siemens 2005 PC, 3GHz, 1GB RAM, 40GB HDD running Tahrpup 6.0.6, Linux 3.14.7. Single DVD for DVD / CD operation. Set to auto launch when media is detected, setting up system for people with limited intellectual abilities - needs to be almost impossible to break!!!

I been thinking - is it possible to disable the mouse right click as I'd rather if teh user was not able to delete desk icons etc.. Once the system is installed, there shouldn't be any need to use the right click.

Any ideas?

Oliver
Last edited by LenseOnLife on Tue 24 Oct 2017, 07:57, edited 1 time in total.

mostly_lurking
Posts: 328
Joined: Wed 25 Jun 2014, 20:31

#2 Post by mostly_lurking »

A quick search suggests that a simple way to disable the right-click is to change the mouse button mapping with xmodmap:

Code: Select all

xmodmap -e "pointer = 1 2 99"
This apparently changes the mapping of the mouse button #3 (right click) to an invalid value. (Using xmodmap -e "pointer = 1 2 3" changes it back to normal.)

This will only last until the end of the session, though. To make it permanent, you could perhaps create a script with the following content in /root/Startup, where it will be run every time the X server starts up:

Code: Select all

#!/bin/sh
xmodmap -e "pointer = 1 2 99"
To create that script, open /root/Startup in a ROX file manager window, right-click (you haven't disabled it yet, have you?) on some empty space, and choose New > Script from the menu, then right-click the resulting file and open it as text. Alternatively, open your text editor, put the code in, and save it in /root/Startup. Then make the script executable by typing chmod 755 /root/Startup/your-script into a terminal, or by right-clicking the file in ROX and going to the Permissions dialog.
LenseOnLife wrote:Once the system is installed, there shouldn't be any need to use the right click.
Let's hope so (you are sure that none of your programs have any necessary right-click functionality?) - or else, if you are also going to block any access to the file manager and terminal, you'd have to exit the X server (press CONTROL + ALT + BACKSPACE, unless you disable that, too) and remove that script from Startup via the command prompt...

LenseOnLife
Posts: 18
Joined: Thu 12 Oct 2017, 06:36
Location: Ireland
Contact:

#3 Post by LenseOnLife »

Hi mostly_lurking,

Thanks for that update on the mouse. You're right, it is a dangerous thing to do but I won't be doing it till I have an ISO that I can distribute. The user will never be storing data on the PC and we will be doing a full install when new games become available. It is cleaner all round.

Now that I know that there is possibility for restricting / disabling the right click - I can move on to other issues and get all those ducks in order first.

Thanks for the info

Oliver

Post Reply