VNC'ing into gnome-session-flashback (Metacity) in non-shared desktop mode causes Super+KEY pressed behavior

Bug #1440570 reported by penalvch
170
This bug affects 69 people
Affects Status Importance Assigned to Milestone
metacity (Ubuntu)
Fix Released
Medium
Dmitry Shachnev
Trusty
Fix Released
Undecided
Marc Deslauriers
Utopic
Invalid
Undecided
Unassigned
Vivid
Fix Released
Medium
Dmitry Shachnev

Bug Description

[Impact]
When VNC'ing into gnome-session-flashback (Metacity) with either tightvncserver or vnc4server configured for non-shared desktop mode, when one opens a terminal for example, and types the "s" key, it acts as if the Super key is also pressed along with it. Hence, this appears to be a gnome-* issue.

[Test Case]
Vivid new install setup for tightvncserver:
sudo apt-get update && sudo apt-get -y dist-upgrade && sudo apt-get -y install xrdp gnome-session-flashback && sudo apt-get -y remove vino && nano .xsession
#START
export XDG_CURRENT_DESKTOP='GNOME-Flashback:Unity'
exec gnome-session --session=gnome-flashback-metacity --disable-acceleration-check
#END

sudo nano /etc/xrdp/xrdp.ini

change to:
#START
[globals]
bitmap_cache=yes
bitmap_compression=yes
port=3389
crypt_level=high
channel_code=1
max_bpp=24
#black=000000
#grey=d6d3ce
#dark_grey=808080
#blue=08246b
#dark_blue=08246b
#white=ffffff
#red=ff0000
#green=00ff00
#background=626c72

[xrdp1]
name=sesman-Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1
#END

Log out, log back in, and RDP in via either Windows Remote Desktop Connection or Remmina.

[Regression Potential]
This patch adds an additional check for modmask. It is already in upstream metacity.

WORKAROUND: Applications > System Tools > System Settings > Keyboard > Shortcuts > Disable all shortcuts containing the Super key.

WORKAROUND: Don't use the .xsession file with tightvncserver, but this then creates a shared desktop experience, instead of ones own, not seen by the user at the local console.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: vnc4server 4.1.1+xorg4.3.0-37.3ubuntu2
ProcVersionSignature: Ubuntu 3.19.0-12.12-generic 3.19.3
Uname: Linux 3.19.0-12-generic x86_64
ApportVersion: 2.17-0ubuntu1
Architecture: amd64
CurrentDesktop: GNOME-Flashback:Unity
Date: Sun Apr 5 13:10:40 2015
InstallationDate: Installed on 2014-12-14 (112 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20141213)
SourcePackage: vnc4
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
penalvch (penalvch) wrote :
penalvch (penalvch)
description: updated
affects: vnc4 (Ubuntu) → gnome-flashback (Ubuntu)
summary: - Typing causes Super+KEY pressed behavior
+ VNC'ing into gnome-session-flashback (Metacity) in non-shared desktop
+ mode causes Super+KEY pressed behavior
penalvch (penalvch)
description: updated
penalvch (penalvch)
description: updated
penalvch (penalvch)
description: updated
Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :
Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Dmitry: can you add small patch to metacity? it will make sure that keys without modifiers are not grabbed.

https://git.gnome.org/browse/metacity/commit/?id=5aeae2fcc6763839333372086ee2825d40f0d7b4

affects: gnome-flashback (Ubuntu) → metacity (Ubuntu)
Changed in metacity (Ubuntu):
assignee: nobody → Dmitry Shachnev (mitya57)
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package metacity - 1:3.14.3-1ubuntu7

---------------
metacity (1:3.14.3-1ubuntu7) vivid; urgency=medium

  * Brown paper bag upload.
  * Fix the previous upload to use the function name from metacity 3.14
    (keysym_name, not keysym_to_string).
 -- Dmitry Shachnev <email address hidden> Thu, 09 Apr 2015 14:50:18 +0300

Changed in metacity (Ubuntu):
status: In Progress → Fix Released
penalvch (penalvch)
tags: added: verification-done
Changed in metacity (Ubuntu Trusty):
status: New → Confirmed
assignee: nobody → Marc Deslauriers (mdeslaur)
Changed in metacity (Ubuntu Utopic):
status: New → Confirmed
Changed in metacity (Ubuntu Trusty):
status: Confirmed → In Progress
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Christopher, or anyone else affected,

Accepted metacity into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/metacity/1:2.34.13-0ubuntu4.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

description: updated
Changed in metacity (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
Revision history for this message
Ikuya Awashiro (ikuya-fruitsbasket) wrote :

This fix looks good to me. Thanks!

Revision history for this message
Chris Good (chris-good) wrote :

I have tested metacity 1:2.34.13-0ubuntu4.1 and while the s key now works correctly (no longer opens the Applications menu), the Super (Windows) key no longer works. For example, Windows+Tab no longer switches between application windows.

I uninstalled the trusty proposed metacity, libmetacity-private0a + metacity-common, and reinstalled the current 1:2.34.13-0ubuntu4 versions to verify that the Windows key actually did work before the proposed patch.

Some may say that the Super key not working is a much smaller problem than the s key always opening the Applications menu.
I'd be OK with not being able to use the Super key but maybe others would consider this a serious regression.
I'll leave it to others more qualified to decide if this should be flagged as verification-done or verification-failed.

My testing was done using Windows 7 Remote Desktop Connection to connect to a Ubuntu 14.04.2 machine running xrdp.
The Ubuntu machine is a client vm of a VMware vSphere host.

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Chris Good: Does application switching "works" only pressing Tab (with 1:2.34.13-0ubuntu4 version, where fix is not added)?

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

Well fix does what it is supposed to do - prevents binding only keys without modifiers.

For me on ubuntu 14.04 with default configuration Alt+Tab and Super+Tab does same thing. For testing I am using Remmina to connect to ubuntu 14.04.

Without fix:
s - opens menu
Tab - switch between last two applications?

With fix:
s - does not open menu. Super + s is supposed to open, but it does not work.
Tab - no longer switch. Alt+Tab works, Super + Tab does not.

Main problem is this - could not find XKB extension. Because of this metacity fails to get modifier for Super key (and other keys). I would say that vnc simply needs to support xkb. Of course this might be fixed in metacity if it is possible to get modifiers without xkb extension. But I have no time to search for solution.

I will set to verification-done since proposed fix does what it should and is already reported by two testers.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Chris Good (chris-good) wrote :

Hi Alberts,

Yes, Super+Tab only works before patch is added. It doesn't work after patch is added.
As you said, Alt+Tab is an alternative for Super+Tab.
I've done some more testing of Super key shortcuts using shortcuts from
https://help.gnome.org/users/gnome-help/stable/shell-keyboard-shortcuts.html.en

The only other shortcut that worked in the unpatched metacity in the problem scenario, is Super+Shift+TAB, and Alt+Shift+Tab is an alternative.

As there are alternatives for the 2 Super key shortcuts that worked in the unpatched metacity in the problem scenario, there should be few (or no) objections.

Thanks for your help.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package metacity - 1:2.34.13-0ubuntu4.1

---------------
metacity (1:2.34.13-0ubuntu4.1) trusty; urgency=medium

  * Backport upstream patch to not grab keybindings without modmask
    (LP: #1440570, thanks to Alberts Muktupāvels).
 -- Marc Deslauriers <email address hidden> Sun, 26 Apr 2015 12:21:17 -0400

Changed in metacity (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for metacity has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in metacity (Ubuntu Utopic):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.