Custom Shortcut keybindings does not work

Bug #1435020 reported by Fred
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Ubuntu GNOME Flashback
New
Undecided
Unassigned
unity-settings-daemon (Ubuntu)
Triaged
Low
Unassigned

Bug Description

System Settings -> Keyboard -> Shortcuts -> Custom Shortcuts

Click the add button (the one with the plus symbol).
Write a name such as "gsm".
Write a command such as "gnome-system-monitor".
Press the Apply button.
Set the hotkey (accelerator) to something.

Press the hotkey.
Nothing happens. The hotkey does not trigger. No application gets launched.

This works fine when in Unity and GNOME Shell, but not in GNOME Flashback.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: gnome-session-flashback 1:3.14.0-3ubuntu9
ProcVersionSignature: Ubuntu 3.19.0-9.9-generic 3.19.1
Uname: Linux 3.19.0-9-generic x86_64
ApportVersion: 2.16.2-0ubuntu4
Architecture: amd64
CurrentDesktop: GNOME-Flashback:Unity
Date: Sun Mar 22 15:56:07 2015
InstallationDate: Installed on 2013-12-26 (450 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
PackageArchitecture: all
SourcePackage: gnome-flashback
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Fred (eldmannen+launchpad) wrote :
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Thanks for the report, we need some debugging information from you. First, please run this command:

$ gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings

It will print something like

['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/']

For each path in this list, run

$ gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:PATH

where PATH is replaced with what is inside the quotes, i.e.

$ gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/

And paste output of everything here. Finally, run:

$ G_MESSAGES_DEBUG=all unity-settings-daemon --replace &

and tell us if there are messages starting with "Setting up custom keybinding" in the output.

Thanks in advance!

Revision history for this message
Fred (eldmannen+launchpad) wrote :

$ gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings
['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']

$ gsettings list-recursively org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/
org.gnome.settings-daemon.plugins.media-keys.custom-keybinding binding '<Primary><Alt>KP_Delete'
org.gnome.settings-daemon.plugins.media-keys.custom-keybinding command 'gnome-system-monitor'
org.gnome.settings-daemon.plugins.media-keys.custom-keybinding name 'GNOME System Monitor'

$ G_MESSAGES_DEBUG=all unity-settings-daemon --replace &
[1] 7287
$
** (unity-settings-daemon:7287): WARNING **: Attempted to init Xsync, found version 3.1 error base 134 event base 83

(unity-settings-daemon:7287): GLib-GObject-WARNING **: The property GSettings:schema is deprecated and shouldn't be used anymore. It will be removed in a future version.

(unity-settings-daemon:7287): media-keys-plugin-WARNING **: Grab failed for some keys, another application may already have access the them.

Revision history for this message
Fred (eldmannen+launchpad) wrote :

It seems the keybindings seems to work after login/logout.

Now the keybindings works.
It seems the keybindings cannot be modified/activated without logout and login.

It successfully unbinds the old keybinding when changed.
But fails to with the new binding. Then on next login it works.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

The last warning is interesting. Can it be that you have gnome-settings-daemon running? Please tell what this prints:

$ ps ax | grep settings-daemon

Revision history for this message
Fred (eldmannen+launchpad) wrote :

$ ps ax | grep settings-daemon
12856 ? Ssl 0:00 /usr/lib/unity-settings-daemon/unity-settings-daemon
12987 ? Sl 0:00 /usr/lib/unity-settings-daemon/unity-fallback-mount-helper
13906 pts/15 S+ 0:00 grep --color=auto settings-daemon

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

> It seems the keybindings cannot be modified/activated without logout and login.

Can you run "unity-settings-daemon --replace &", then add a new keybinding, and check if it prints something like "Adding new custom keybinding ..."?

Revision history for this message
Fred (eldmannen+launchpad) wrote :

Everytime I try to set a keybinding this gets printed:

(unity-settings-daemon:5861): GLib-GIO-CRITICAL **: g_dbus_proxy_call_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed

Changed in gnome-flashback (Ubuntu):
status: New → Triaged
affects: gnome-flashback (Ubuntu) → unity-settings-daemon (Ubuntu)
Changed in unity-settings-daemon (Ubuntu):
assignee: nobody → Dmitry Shachnev (mitya57)
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

The plan is to enable key grabber in gnome-flashback, and tell unity-settings-daemon that our sessions have a key grabber.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Thinking more of it, it is a too large change to do for Vivid, as it can break stuff (especially the keyboard layout switching that has always been a special case). So it will land in the beginning of next cycle, when we have gnome-flashback 3.16.

Changed in unity-settings-daemon (Ubuntu):
importance: Undecided → Low
description: updated
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

I think this was fixed long time ago. Can someone please confirm that?

Changed in unity-settings-daemon (Ubuntu):
assignee: Dmitry Shachnev (mitya57) → nobody
Revision history for this message
Lem (lem-jjr) wrote :

Actually I'm experiencing it on Ubuntu 18.04 using Unity 7. Running unity-settings-daemon manually produces the following message:

(unity-settings-daemon:4065): media-keys-plugin-WARNING **: 15:32:32.495: Grab failed for some keys, another application may already have access the them.

The consequence of this is none of the keyboard shortcuts defined in Keyboard Settings Shortcuts tab work except for those defined under Windows. This also includes other key combinations like laptop screen brightness controls (Fn+F8/F9 on my laptop), hotkey launchers like Ctrl-Alt-t for new terminal, and custom shortcuts.

Strangely it only happens sometimes. Most times I log in and the media keys etc all work fine. This also happens on my desktop machine (same Ubuntu 18.04, Unity 7, but different CPU/GPU).

Revision history for this message
Khurshid Alam (khurshid-alam) wrote :

Custom media keys shortcuts will not work without re-login on 18.04. I believe it's a regression from g-s-d. However if you enable commands from ccsm, those will work automatically.

tags: added: cosmic
removed: vivid
Revision history for this message
Gmgarciam (gmgarciam) wrote :

I am also experiencing this on Ubuntu 18.04 when I use Unity with the Nvidia drivers. It seems to work fine when I use gnome.

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.