loosing middle mouse button in tigervnc

873 views
Skip to first unread message

István Ákos Mórocz

unread,
Dec 29, 2017, 1:03:59 PM12/29/17
to TigerVNC User Discussion/Support

i experience a strange problem with the middle mouse button in tigervnc 1.7.0, on Slackware Linux 14.2.

once in a while VNC simply looses functionality for this middle mouse button, out of the blue - i can't explain why. this can happen in VNC server sessions that run on a physical machine or on a virtual OS (VPS). i don't see any connection with the VNC clients and host platforms in use.  my window manager is in general fvwm2, at times also xfce4.

but then it can also happen - like these days - that i restart on a physical machine numerous times a VNC session without ever gaining back this middle mouse button - while it runs perfectly on fresh VNC restarts on a VPS. it's completely erratic. needless to say that on every platform (i have several) i use the very same home directory with identical startup files - xinitrc, xstartup, and so on - here my xstartup file :

#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
sh $HOME
/.xinitrc

i need to say that once this middle mouse button gets lost i have to restart the VNC session which seems - sometimes at least - to cure this problem...but it can persist too as described above.

what's happening here ?  any input is greatly appreciated, thanks !  bye, pisti

Pierre Ossman

unread,
Jan 4, 2018, 6:56:47 AM1/4/18
to István Ákos Mórocz, TigerVNC User Discussion/Support
On 29/12/17 19:03, István Ákos Mórocz wrote:
>
> i experience a strange problem with the *middle mouse button* in tigervnc
> 1.7.0, on Slackware Linux 14.2.
>
> once in a while VNC simply looses functionality for this middle mouse
> button, out of the blue - i can't explain why. this can happen in VNC
> server sessions that run on a physical machine or on a virtual OS (VPS). i
> don't see any connection with the VNC clients and host platforms in use.
> my window manager is in general fvwm2, at times also xfce4.
>

Odd. Not something that rings a bell unfortunately.

Is the client also TigerVNC?

Could you run xev in the broken session and see what it says when you
press the middle button? It should be something like:

ButtonPress event, serial 25, synthetic NO, window 0x2c00001,
root 0x49e, subw 0x2c00002, time 63362621, (48,43), root:(48,987),
state 0x10, button 2, same_screen YES

ButtonRelease event, serial 25, synthetic NO, window 0x2c00001,
root 0x49e, subw 0x2c00002, time 63362813, (48,43), root:(48,987),
state 0x210, button 2, same_screen YES

Regards
--
Pierre Ossman Software Development
Cendio AB http://cendio.com
Teknikringen 8 http://twitter.com/ThinLinc
583 30 Linköping http://facebook.com/ThinLinc
Phone: +46-13-214600 http://plus.google.com/+CendioThinLinc

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

István Ákos Mórocz

unread,
Jan 4, 2018, 11:33:27 AM1/4/18
to Pierre Ossman, TigerVNC User Discussion/Support
dear Pierre, thanks for your reply !

all 3 machines, remote or local, physical or virtual, run Slackware
14.2, tigerVNC 1.7.0 (built with SlackBuilds.org), and in general the
FVWM window manager, though problems persist also when using Xfce4.

just to make sure : this mouse button failure comes and goes, once in
a while, and requires a re-start of the VNCserver. but then it may
even persist (like these days) through several re-starts of the VNC
server on that given machine, and can affect to my knowledge any of my
machines A, B or C.

below are just examples of the current situation. it seems that it's
the VNC server sA on machine mA that is affected, at least in this
current scenario.

thank you for looking into this, sorry for the long detailed complex
descriptions below. bye, pisti


----------------------------------------------------------------------
mouse button settings in ~/.xinitrc (for a 4-button trackball) :

xmodmap -e 'pointer = 1 8 3 4 5 0 0 2'

i can rerun this command also at later stages without any improvements
once this middle button problem surfaced.

----------------------------------------------------------------------
setup :

machines : mA (physical) , mB (VPS) , mC (physical)

VNC servers : sA sB sC, running on mA, mB or mC, respectively.

VNC clients : cA cB cC, running on mA, mB or mC, respectively,
each connecting to a server sA, sB or sC.

i didn't play with VNC server sC today but i know from that past that
also here the middle mouse button played crazy, especially in
combination with a fourth machine mD with cD.

----------------------------------------------------------------------



----------------------------------------------------------------------
middle button works fine :
physical screen on mA :

ButtonPress event, serial 37, synthetic NO, window 0x2e00001,
root 0x4b1, subw 0x0, time 154302291, (71,150), root:(1724,178),
state 0x0, button 2, same_screen YES

ButtonRelease event, serial 37, synthetic NO, window 0x2e00001,
root 0x4b1, subw 0x0, time 154302395, (71,150), root:(1724,178),
state 0x200, button 2, same_screen YES

----------------------------------------------------------------------
middle mouse button has *NO* effect - see button 8 :
physical screen on mA - using sA - with cA for sA :

ButtonPress event, serial 37, synthetic NO, window 0x1e00001,
root 0x268, subw 0x0, time 153745983, (81,106), root:(1286,353),
state 0x0, button 8, same_screen YES

ButtonRelease event, serial 37, synthetic NO, window 0x1e00001,
root 0x268, subw 0x0, time 153746087, (81,106), root:(1286,353),
state 0x0, button 8, same_screen YES

----------------------------------------------------------------------
middle mouse button works fine.
physical screen on mA - using sB - with cA for sB :

ButtonPress event, serial 37, synthetic NO, window 0x2400001,
root 0x268, subw 0x0, time 1925914765, (69,130), root:(977,158),
state 0x0, button 2, same_screen YES

ButtonRelease event, serial 37, synthetic NO, window 0x2400001,
root 0x268, subw 0x0, time 1925914869, (69,130), root:(977,158),
state 0x200, button 2, same_screen YES

----------------------------------------------------------------------
middle mouse button works fine.
physical screen on mC - using sB - with cC for sB :

ButtonPress event, serial 37, synthetic NO, window 0x2600001,
root 0x268, subw 0x0, time 1933889912, (89,102), root:(94,1911),
state 0x0, button 2, same_screen YES

ButtonRelease event, serial 37, synthetic NO, window 0x2600001,
root 0x268, subw 0x0, time 1933890041, (89,102), root:(94,1911),
state 0x200, button 2, same_screen YES

----------------------------------------------------------------------
middle mouse button has *NO* effect - see button 8 !
physical screen on mC - using sA - with cC for sA :

ButtonPress event, serial 37, synthetic NO, window 0x1e00001,
root 0x268, subw 0x0, time 162281420, (103,139), root:(1308,386),
state 0x0, button 8, same_screen YES

ButtonRelease event, serial 37, synthetic NO, window 0x1e00001,
root 0x268, subw 0x0, time 162281548, (103,139), root:(1308,386),
state 0x0, button 8, same_screen YES

----------------------------------------------------------------------
middle mouse button works fine in cC for sB.
middle mouse button has *NO* effect in cB for sA !
physical screen on mC - using sA & sB - with cC for sB & (nested) with cB for sA :

ButtonPress event, serial 37, synthetic NO, window 0x1e00001,
root 0x268, subw 0x0, time 165335412, (83,146), root:(1288,393),
state 0x0, button 8, same_screen YES

ButtonRelease event, serial 37, synthetic NO, window 0x1e00001,
root 0x268, subw 0x0, time 165335511, (83,146), root:(1288,393),
state 0x0, button 8, same_screen YES

----------------------------------------------------------------------
,-*~'`^`'~*-,._.,-*~'`^`'~*-,._
'
: http://noisis.com
` istvan...@noisis.com
: istvan...@mcgill.ca
: +1-514-927-1169
, http://www.pistikem.org
: pist...@gmail.com
.
`~*-,._.,-*~'`^`'~*-,._.,-*~'`"

Pierre Ossman

unread,
Jan 5, 2018, 7:00:07 AM1/5/18
to István Ákos Mórocz, TigerVNC User Discussion/Support
On 04/01/18 17:33, István Ákos Mórocz wrote:
>
>     xmodmap -e 'pointer = 1 8 3 4 5 0 0 2'

Well there is your problem then. You are telling the system to send
button 8 when the physical button 2 (middle) is pressed. So things are
behaving as expected.

It sounds like you need to make sure that command is only run on the
client and never inside the session. And if it gets screwed up you
should be able to fix it by resetting things to normal:

xmodmap -e 'pointer = 1 2 3 4 5 6 7 8'

István Ákos Mórocz

unread,
Jan 5, 2018, 8:03:39 AM1/5/18
to Pierre Ossman, TigerVNC User Discussion/Support
gosh - you saved my day/week/year - what an easy solution - thank you
very much, Pierre !

then i have 'just' one more issue with TigerVNC but i leave this issue
for another time : https://www.linuxquestions.org/questions/linux-software-2/losing-keyboard-characters-in-tigervnc-screen-session-4175615548/

regarding top/bottom posting : i use as mail client ALPINE 2.20 but
couldn't find a switch that toggles top vs bottom-posting. but i
think to remember that it was other way around with ancient ELM...

bye, pisti

Pierre Ossman

unread,
Jan 5, 2018, 8:25:31 AM1/5/18
to István Ákos Mórocz, TigerVNC User Discussion/Support
On 05/01/18 14:03, István Ákos Mórocz wrote:
> gosh - you saved my day/week/year - what an easy solution - thank you
> very much, Pierre !
>
> then i have 'just' one more issue with TigerVNC but i leave this issue
> for another time :
> https://www.linuxquestions.org/questions/linux-software-2/losing-keyboard-characters-in-tigervnc-screen-session-4175615548/
>

Sounds like you might be hitting this bug:

https://github.com/TigerVNC/tigervnc/issues/93

We have no fix for that right now, but you can generally work around it
by making sure you have the same keymap on both the server and client.

István Ákos Mórocz

unread,
Jan 5, 2018, 1:55:36 PM1/5/18
to Pierre Ossman, TigerVNC User Discussion/Support
On Fri, 5 Jan 2018, Pierre Ossman wrote:

> On 05/01/18 14:03, István Ákos Mórocz wrote:
>> then i have 'just' one more issue with TigerVNC but i leave this issue
>> for another time :
>> https://www.linuxquestions.org/questions/linux-software-2/losing-keyboard-characters-in-tigervnc-screen-session-4175615548/
>
> Sounds like you might be hitting this bug:
>
> https://github.com/TigerVNC/tigervnc/issues/93
>
> We have no fix for that right now, but you can generally work around it by
> making sure you have the same keymap on both the server and client.
>
> Regards


at least i am not alone with this keymap problem :)

regarding keymaps, i use the following settings at both ends, on all
our VNC servers & clients :

xmodmap -e 'keysym Alt_L = Meta_L Alt_L' ;
setxkbmap -layout us,hu,ca -variant fr -option grp:switch,grp:shift_toggle,grp_led:scroll ;'

and lately - as i intermittently call the keymap settings above - i
didn't experience this "{}<" problem - keep fingers crossed... that
would go in line what you just suggested before, right ?

bye, pisti

Pierre Ossman

unread,
Jan 25, 2018, 7:48:24 AM1/25/18
to István Ákos Mórocz, TigerVNC User Discussion/Support
On 05/01/18 19:55, István Ákos Mórocz wrote:
>
> regarding keymaps, i use the following settings at both ends, on all
> our VNC servers & clients :
>
>     xmodmap -e 'keysym Alt_L = Meta_L Alt_L' ;
>     setxkbmap -layout us,hu,ca -variant fr -option
> grp:switch,grp:shift_toggle,grp_led:scroll ;'
>
> and lately - as i intermittently call the keymap settings above - i
> didn't experience this "{}<" problem - keep fingers crossed...  that
> would go in line what you just suggested before, right ?
>

Right. However I'm not sure the toggling of layouts works reliably in
these cases, so I would generally recommend just a single layout in the
server.

You might also want to test the new "RawKeyboard" setting that's
available in the development versions of TigerVNC.

Regards
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600 https://plus.google.com/+CendioThinLinc
Reply all
Reply to author
Forward
0 new messages