Unable to call org.gnome.Shell.ShowOSD / DBus AccessDenied

Hi. I’m unable to call ShowOSD function via DBus anymore. It worked fine some time ago (it was one or two major Gnome releases back), so I’m not sure if this is due to internal Gnome changes or something is messed up in my config. Any ideas what’s wrong/how to debug?

This is the command that I’m using for testing:

gdbus call --session --dest 'org.gnome.Shell' --object-path '/org/gnome/Shell' --method 'org.gnome.Shell.ShowOSD' "{'icon': <'input-dialpad-symbolic'>, 'label': <'Numlock On'>}"

When I run it, I get the following error:

Error: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: ShowOSD is not allowed

I was under impression that I can access all session methods as the session DBus is running under my user? Is that correct? Do I somehow need to grant myself access to call this? I’ve tried to look into DBus permissions, but I didn’t find anything useful. /usr/share/dbus-1/session.conf looks unmodified and should grant full access as per this:

 15   <listen>unix:tmpdir=/tmp</listen>
 16
 17   <!-- On Unix systems, the most secure authentication mechanism is
 18   EXTERNAL, which uses credential-passing over Unix sockets.
 19
 20   This authentication mechanism is not available on Windows,
 21   is not suitable for use with the tcp: or nonce-tcp: transports,
 22   and will not work on obscure flavours of Unix that do not have
 23   a supported credentials-passing mechanism. On those platforms/transports,
 24   comment out the <auth> element to allow fallback to DBUS_COOKIE_SHA1. -->
 25   <auth>EXTERNAL</auth>
 26
 27   <standard_session_servicedirs />
 28
 29   <policy context="default">
 30     <!-- Allow everything to be sent -->
 31     <allow send_destination="*" eavesdrop="true"/>
 32     <!-- Allow everything to be received -->
 33     <allow eavesdrop="true"/>
 34     <!-- Allow anyone to own anything -->
 35     <allow own="*"/>
 36   </policy>
1 Like

Indeed.

1 Like

Thanks, at least now I know I’m not crazy! Do you know of any alternative to manually trigger GNOME OSD?

I have not found any alternative method yet. I have a related open issue:

Awesome, I’ll keep an eye on the issue. Thanks.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.