Certain features in the Sharing panel fail with D-Bus related messages when gnome-control-center is run over ssh -X
The problem
When I run gnome-control-center
3.36.1 on a remote Ubuntu 20.04 host over ssh -X
, trying to enable Screen Sharing (VNC) or Media Sharing in the Sharing panel [1] fails with the following D-Bus related messages on the standard error:
(gnome-control-center:25937): sharing-cc-panel-WARNING **: 00:15:12.770: couldn't list networks: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SettingsDaemon.Sharing was not provided by any .service files
(gnome-control-center:25937): sharing-cc-panel-WARNING **: 00:15:28.646: Failed to enable service vino-server: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SettingsDaemon.Sharing was not provided by any .service files
(gnome-control-center:25937): sharing-cc-panel-WARNING **: 00:15:54.309: Failed to enable service rygel: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SettingsDaemon.Sharing was not provided by any .service files
What does this mean? Can I do anything about it? A remote user, sitting in front of the remote computer, can enable Screen Sharing or Media Sharing in gnome-control-center
themselves. Failure to enable only occurs over ssh -X
, as far as I can tell.
Downstream bug 1878109 in Ubuntu.
[1] This odd situation happened when I had to provide technical support over VNC to an older user whose computer I had previously set up with SSH access. Hence why I was using ssh -X
to try and enable VNC in gnome-control-center
in the first place.
Things I tried that didn't work
Looking up this error online led me down a D-Bus rabbit hole. I found many year-old StackExchange answers that recommend setting various environment variables and/or running dbus-launch
to start a session bus instance of dbus-daemon
, in case of D-Bus related errors.
I am rather unfamiliar with D-Bus, but I can see using ps -ef | grep dbus
that a session bus instance of dbus-daemon
is already running. It has been started under my UID at the time of my SSH login:
$ ps -ef | grep dbus
message+ 775 1 0 19:59 ? 00:00:04 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
dad 1434 1418 0 20:00 ? 00:00:01 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
dad 1717 1712 0 20:00 ? 00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
me 3040 3013 0 20:06 ? 00:00:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
So I'm wary of those old resources. I have tried following their instructions though, for completeness sake, but to no avail. I can provide more information if necessary.
Steps to reproduce
- Connect to a remote Ubuntu 20.04 host with
ssh -X
- Open GNOME Settings with
gnome-control-center &
- Go to the Sharing panel
- Click on Screen Sharing or Media Sharing and try to enable them
- The toggle remains in the off position and the aforementioned warnings are printed to
stderr