Results 1 to 6 of 6

Thread: Disable mouse right-click

  1. #1
    Join Date
    May 2007
    Beans
    41

    Disable mouse right-click

    Several old threads asked for this and it was never answered. I have found a way to do this, it may not be the best, but it works.

    Code:
    xmodmap -e "pointer = 1 2 99"
    This will cause a right-click to produce a "Button 99" instead of a "Button 3" click event. There may be better ways, but this is all I've found.

    You can also probably put the part in quotes into ~/.Xmodmaprc to have it run automatically, but I haven't verified that yet.

  2. #2
    Join Date
    Nov 2011
    Beans
    23

    Re: Disable mouse right-click

    Hi I have an Internet Cafe and trying to impose a few restrictions on the public user account .. including disable the right click.

    xmodmap -e "pointer = 1 2 99"
    This only works for one session = on restart - back to normal ..

    Is there a permanent fix for this ... on the one public account ?

  3. #3
    Join Date
    Nov 2011
    Beans
    23

    Re: Disable mouse right-click

    Update > I have tried running ... xmodmap -e "pointer = 1 2 99"
    Then ... xmodmap -pke > .Xmodmap
    (it creates a files called .Xmodmap in your home directory)

    Then you have to create a file called .xinitrc in your home directory where you put this commandline xmodmap .Xmodmap

    I found these instructions here > http://askubuntu.com/questions/24916...p-certain-keys


    On re-start I got a box asking if I wanted to run xmodmap = check ok

    But the right click was still available.

  4. #4
    Join Date
    Nov 2011
    Beans
    23

    Re: Disable mouse right-click

    Just to add I have also tried the suggestion above ...

    You can also probably put the part in quotes into ~/.Xmodmaprc to have it run automatically, but I haven't verified that yet.

    Which did not work either.

  5. #5
    Join Date
    Dec 2011
    Beans
    1

    Re: Disable mouse right-click

    I have just try this and test it :
    create a text file modmapD.sh (any file name, I use D for disable) that has
    xmodmap -e "pointer = 1 2 99"

    and save it under <username>/.kde/Autostart/ your path can be found at system setting-Account details-Path
    then associate the modmapD.sh with sh, here is how, right click the file and choose open with-other, at the top input sh and check at the botton for remember application association. I would create another modmapE.sh (not in the autostart folder. ) with
    xmodmap -e "pointer = 1 2 3"

    to test. Now .sh file will be a simillar as msdos .bat .

    Just upgraded to 11.10 , the associate file does not allow to associate wit sh

    opps, I was using kubuntu, re install kubuntu to 11.10 and still work
    Last edited by moumimi; December 23rd, 2011 at 01:23 AM.

  6. #6
    Join Date
    Nov 2011
    Beans
    23

    Re: Disable mouse right-click

    Just to clarify this thread was solved ...

    Here ..

    http://ubuntuforums.org/showthread.php?t=1896685

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •