flathub / com.microsoft.Teams

https://flathub.org/apps/details/com.microsoft.Teams
14 stars 6 forks source link

Expecting user to manually set DBUS_SESSION_BUS_ADDRESS, why? #61

Open kasperk81 opened 3 years ago

kasperk81 commented 3 years ago

When I run Microsoft Teams, I get:

$ flatpak run -vvv com.microsoft.Teams
...
...
F: Running 'bwrap --args 37 teams'
Overriding TZ to UTC
[2 zypak-helper] Failed to connect to session bus: [org.freedesktop.DBus.Error.NotSupported] Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
[2 zypak-helper] src/helper/main.cc:40(DetermineZygoteStrategy): Assertion failed: bus

Workaround is to manually find appropriate session ID: cat ~/.dbus/session-bus/<some-random-filename> which shows something like DBUS_SESSION_BUS_ADDRESS='unix:abstract=/tmp..., then use it as:

$ flatpak run --env=DBUS_SESSION_BUS_ADDRESS='unix:abstract=/tmp/dbus-LcsUc61GBB,guid=c1005d8
26f37b49af839644f60bc4df0' -vvv com.microsoft.Teams

it used to be an issue with other packages like spotify: https://github.com/flatpak/flatpak/issues/2754#issuecomment-497937085, but they have since modernize their package in a way that manual introspection of dbus session is not required. I don't know the details how they have fixed it (https://github.com/flathub/com.spotify.Client/commits/master), but I have latest spotify and latest team flatpaks, in the same terminal, spotify works without the manual DBUS_SESSION_BUS_ADDRESS while teams still requires it.