Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently trying to put together a config to facilitate accessing a Linux machine over VNC from a tablet. But I've got a problem with how to deal with right clicks (although I haven't actually tried touching the screen with my other hand ;). While I could amend the vncclient to (temporarily) switch the left and right mouse buttons, this then requires a user-interface running outside the view port, using up valuable screen space.

I believe it's possible to remap the behaviour at the server end using xmodmap or xinput, and I could add a button on the taskbar/panel to run a script for this (already planning such for switching between windows and running xrandr to rotate screen) the downside is that the image will be static (i'd like some visual feedback on the state) and I'm not sure if it will handle the right click to restore the settings.

(currently the plan is to use Openbox as the WM and most likely fbpanel, but this is not set in stone)

Anybody come up with a better solution?

share|improve this question
What kind of tablet? It makes a difference. – bahamat Jun 29 '12 at 19:08
On Apple devices a two-finger click/tap does a context click in most VNC applications. – bahamat Jun 29 '12 at 19:08
For simplicity I'm probably going to go down the noVNC route - which makes it much simpler to swap the event strings in Javascript, or use xmodmap -e 'pointer=3 2 1....' serverside (with a timer to restore) – symcbean Jul 5 '12 at 21:42
@bahamat: any kind :) – symcbean Jul 6 '12 at 13:49
up vote 0 down vote accepted

In the absence of a better solution, xmodmap it is.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.