Skip to content

Wrong DBUS_SESSION_BUS_ADDRESS in flatpak enter #3820

Closed

Description

@ktosiek

Linux distribution and version

Ubuntu 20.04.1 (focal)

Flatpak version

1.8.1-flatpak1~focal

Description of the problem

When entering app's environment with flatpak enter DBus-based apps (like xdg-open) fail:

$ flatpak enter com.borgbase.Vorta xdg-open http://flathub.org/
Failed to connect to session bus: Key/Value pair 0, ?/run/user/1000/bus?, in address element ?unix:/run/user/1000/bus? does not contain an equal sign

It seems the DBUS_SESSION_BUS_ADDRESS is wrong:

$ flatpak enter com.borgbase.Vorta env|grep DBUS
DBUS_SESSION_BUS_ADDRESS=unix:/run/user/1000/bus
DBUS_SYSTEM_BUS_ADDRESS=unix:/run/dbus/system_bus_socket
$ env |grep DBUS_SESSION_BUS_ADDRESS
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus

And looking at the code, it's been like that for 5 years: https://github.com/flatpak/flatpak/blame/5efdea3b6121c0d187703b10912fb15fad48d692/app/flatpak-builtins-enter.c#L274
The spec says the path= part should be there: https://dbus.freedesktop.org/doc/dbus-specification.html#transports-unix-domain-sockets-addresses

Steps to reproduce

  1. Run an app
  2. Run flatpak enter your.apps.id xdg-open http://flathub.org/
  3. Notice there's an error in the terminal, and no browser is open

Activity

  1. added a commit that references this issue on Sep 4, 2020
    e39b94b
  2. added 2 commits that reference this issue on Nov 17, 2020
    7254483
    fce331b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions