openSUSE Tumbleweed Snap application cannot open display: :0

When attempting to run teams-for-linux

(teams-for-linux:5949): Gtk-WARNING **: 21:03:29.354: cannot open display: :0

This happens with Bitwarden as well:

(bitwarden:11815): Gtk-WARNING **: 21:16:56.116: cannot open display: :0

snap version

snap 2.45.2-1.4
snapd 2.45.2-1.4
series 16
opensuse-tumbleweed 20200716
kernel 5.7.7-1-default

Searching through forums, I ran this:

xhost +local:
non-network local connections being added to access control list

I ran it again, it runs but not without error and the system tray icon is missing.

Gtk-Message: 21:38:56.187: Failed to load module “colorreload-gtk-module”
configPath = /home/wolfnf/snap/teams-for-linux/105/.config/teams-for-linux
Failed to get the config file, using default values
configFile = {}
Error org.freedesktop.DBus.Error.Failed: cannot use setting “default-url-scheme-handler”: not allowed
processArgs [ ‘/snap/teams-for-linux/105/teams-for-linux’ ]

(teams-for-linux:25085): GLib-GIO-CRITICAL **: 21:38:57.958: g_dbus_proxy_new: assertion ‘G_IS_DBUS_CONNECTION (connection)’ failed

The applications are at least usable but I would like to help improve this if possible.


At every boot I have to run xhost +local:at every boot to get my Snap applications going. Is there something globally that could be changed to fix this?

IIUC, xhost +local is not recommended for a multi-user machine (and perhaps not even for a single user machine) because it allows other users access to X11.

When you do not run xhost +local and then try to use snaps, do you see any system journal denials via dmesg or journald ?