Ctrl key not working in VNC

Continuing my series of short tech notes for future generations.

The problem: ctrl key not working in VNC session. xev command doesn’t show any events coming after pressing ctrl key.

Cause: You’re using Gnome, aren’t you? Gnome has a feature that allows to locate the pointer: if you press and release ctrl key, it will show a small animation around your pointer. Unfortunately, it interferes with vncviewer.

Solution: Few websites, including BBC, offer a fix: System → Preferences → Mouse → Cursors tab…

Problem with the solution: Oh noes! Cursor tab is not there! I can’t change the setting!

Solution to the problem with the solution: Use gconf-editor to change the setting: Applications → System Tools → Configuration Editor. Press CTRL+F. Type: “pointer”. Tick “search also in key names” and press “Find”. Click /desktop/gnome/peripherals/mouse/locate_pointer. Untick the checkbox next to it, on the top right pane.

Author: automatthias

You won't believe what a skeptic I am.

14 thoughts on “Ctrl key not working in VNC”

  1. I congratulate your problem solving skills :). I’d probably do the same, except I haven’t been using gnome for quite a while now (as you know) and if I did, I’d curse the developers to no end between 1 and 2.

  2. I have been fighting with this obscure thing for ages but was never able to find the correct “question” to ask google…. Thank you for calling this “ctrl key not working in VNC” and Google for knowing that “ctrl” was “control” and you for putting “Gnome” in the page somewhere!

    I was able to make control work by hitting the capslock key first, but that stopped working when I upgraded from Fedora 7 to Fedora 9.

    Now it works all the time. Yay!

  3. Thanks for finding the culprit. I too had no luck in google, not sure why, as “Ctrl key not working” seems like an obvious way to articulate the problem. My university’s support person found it for me and sent me here.

    I couldn’t find the locate_pointer key in my gnome, but I can disable the feature via System -> Preferneces -> Mouse -> “Show position of pointer when the Control key is pressed”.

    VNC is not the only application affected by this. Here’s the same problem reported for wine:

    https://bugs.launchpad.net/ubuntu/+source/wine/+bug/231527

  4. Solution to the problem with the solution to the problem with the solution:

    In Ubuntu 8.04, Applications-> System Tools doesn’t have gconf-editor turned on by default. To fix this, alternate click (right for most) on the “Application” menu and select “Edit menus”. Go to Applications->System Tools and check “Configuration Editor”. Now it will show up under the menu.

    Also, for whatever reason, searching for “pointer” doesn’t return the required option, but browsing does find it at the path specified above.

    Thanks for posting most of the bread crumbs. Now I’m going to check to see if you have a solution to two other nagging problems: 1. Acrobat fails to open autodownloaded files and 2. pidgin fails to put the url in the address box when I click a link. Both are damn annoying.

  5. Thankyou thankyou thankyou!

    I wondered what the f… caused it.

  6. This command will turn off locate pointer while you run vncviewer and then return it to it’s previous value when you’re down (can get screwed up by multiple instances of vncviewer):

    set ctrltmp=`gconftool-2 –get /desktop/gnome/peripherals/mouse/locate_pointer` ; gconftool-2 –set /desktop/gnome/peripherals/mouse/locate_pointer –type boolean false ; vncviewer ; gconftool-2 –set /desktop/gnome/peripherals/mouse/locate_pointer –type boolean $ctrltmp

    As a tcsh alias:

    alias vncviewer ‘echo “Temp turnoff of locate pointer”; set ctrltmp=`gconftool-2 –get /desktop/gnome/peripherals/mouse/locate_pointer` ; gconftool-2 –set /desktop/gnome/peripherals/mouse/locate_pointer –type boolean false ; \vncviewer \!* ; gconftool-2 –set /desktop/gnome/peripherals/mouse/locate_pointer –type boolean $ctrltmp’

  7. Sheesh, thanks for the obscure fix! This should be documented somewhere…

  8. Thanks so much for this. I turned on this handy little feature to locate my cursor and forgot about it. I never made the connection between this setting and the inability to use VNC. I appreciate your posting

  9. in gnome3, you can control this option with :

    dconf read /org/gnome/settings-daemon/peripherals/mouse/locate-pointer
    dconf write /org/gnome/settings-daemon/peripherals/mouse/locate-pointer true|false

  10. Thanks – finally have my ctrl keys working again!! On Linux Mint 17. Only seems to happen to me with RealVNC, but that is also the VNC viewer I prefer.

Comments are closed.