GPaste icon indicating copy to clipboard operation
GPaste copied to clipboard

GrabAccelerators is not allowed

Open attila-lendvai opened this issue 2 years ago • 4 comments

this is on Guix, i'm trying to add the GPaste package. it mostly works, but i have two issues left, one of them is this, that shortcuts don't work. i see this:

$ /gnu/store/892dl8l50q7azmljfhm8l8sfqbj6x9m6-gpaste-3.42.2/libexec/gpaste/gpaste-daemon

(gpaste-daemon:3937): GPaste-WARNING **: 22:35:30.899: Couldn't grab keybindings with gnome-shell, falling back to X11 keybinder: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: GrabAccelerators is not allowed
$ gnome-shell --version
GNOME Shell 41.0

does this ring any bells for anyone? web searches didn't help much.

attila-lendvai avatar Dec 19 '21 21:12 attila-lendvai

FTR, the consensus seems to be that it's a security issue to allow random apps to scan keyboard events, and the recommended way is to install a keyboard shortcut in the gnome settings that invokes gpaste-client ui.

maybe the setting for shortcuts should be entirely removed from gpaste, and replaced with a short message telling the above?

attila-lendvai avatar Jan 07 '22 09:01 attila-lendvai

There is work in progress to handle this through a portal. there are other shortcuts that won't be doable like this.

Also, it should work fine for X11 sessions.

And we also have a tweak which should make it work on wayland too by bypassing this restrictions (works fine on all of my non nix machines)

Keruspe avatar Feb 15 '22 14:02 Keruspe

I also see this on Ubuntu 22.04 in a normal gnome-shell session; keybindings don't work:

Jun 15 16:22:21 orac systemd[3004]: Starting GPaste daemon...
Jun 15 16:22:21 orac systemd[3004]: Started GPaste daemon.
Jun 15 16:22:21 orac gpaste-daemon[320620]: Couldn't grab keybindings with gnome-shell, falling back to X11 keybinder: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: GrabAccelerators is not allowed

Are there some extra installation steps I'm missing besides installing the apt packages?

akvadrako avatar Jun 15 '22 14:06 akvadrako

Workaround in my case is to run systemctl --user restart org.gnome.GPaste.service

suside avatar Nov 07 '23 07:11 suside