bubblejail icon indicating copy to clipboard operation
bubblejail copied to clipboard

"Browse local files" button doesn't open file manager (Steam)

Open effectsbot opened this issue 10 months ago • 8 comments

Output of bubblejail --version

0.9.5

Your distro name and version

Arch Linux

Description

Pressing "Browse local files" when trying to access installed game files doesn't open the file manager like expected, but instead results in this D-Bus error:

Failed to register: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown

I've already tried lots of things, including adding org.freedesktop.FileManager1 under the debug options but that didn't seem to make a difference.

Here is my bubblejail configuration for Steam.

[common]
executable_name = "/usr/bin/steam"
share_local_time = false
filter_disk_sync = false
dbus_name = "com.steampowered.*"

[x11]

[wayland]

[network]

[pulse_audio]

[home_share]
home_paths = [
    ".local/share/Steam",
    ".steam",
]

[gnome_toolkit]
gnome_portal = true
dconf_dbus = true

[direct_rendering]

[systray]

[root_share]
read_only_paths = [
    "/sys/class/drm",
]

[namespaces_limits]
user = 4
mount = -1
pid = -1
ipc = 1
net = 1
time = 0
uts = 0
cgroup = 0

[debug]
raw_bwrap_args = [
    "--ro-bind",
    "/home/unixbot/.config/gtk-3.0",
    "/home/unixbot/.config/gtk-3.0",
    "--ro-bind",
    "/home/unixbot/.config/gtk-4.0",
    "/home/unixbot/.config/gtk-4.0",
    "--ro-bind",
    "/home/unixbot/.local/share/themes",
    "/home/unixbot/.local/share/themes",
    "--ro-bind",
    "/home/unixbot/.local/share/icons",
    "/home/unixbot/.local/share/icons",
    "--ro-bind",
    "/home/unixbot/.config/MangoHud",
    "/home/unixbot/.config/MangoHud",
]
raw_dbus_system_args = [
    "--talk=org.freedesktop.UDisks2",
    "--talk=org.freedesktop.NetworkManager",
]

The home paths were meant for Protontricks and ProtonUp-Qt, since I wasn't able to symlink the Steam directory to that location.

effectsbot avatar Jun 04 '25 20:06 effectsbot

Hello @effectsbot

What is your file browser? Is it "GNOME Files"?

igo95862 avatar Jun 04 '25 20:06 igo95862

Hello.

I'm using Thunar as my file browser.

effectsbot avatar Jun 04 '25 20:06 effectsbot

Not sure about Thunar but for example GNOME Files requires to own a specific D-Bus name in order to work. This means it incompatible with sandbox isolation as Files inside and outside the sandbox try to own same name.

You can run the terminal inside the sandbox and then run thunar from command line to see if it can work without owning D-Bus name.

igo95862 avatar Jun 04 '25 20:06 igo95862

Not sure about Thunar but for example GNOME Files requires to own a specific D-Bus name in order to work. This means it incompatible with sandbox isolation as Files inside and outside the sandbox try to own same name.

You can run the terminal inside the sandbox and then run thunar from command line to see if it can work without owning D-Bus name.

Yep, it doesn't seem to be able to work inside the sandbox without owning its D-Bus name. So I changed the D-Bus name in my config to Thunar's and I was able to access my game files, while also breaking the Steam Runtime in the process.

effectsbot avatar Jun 04 '25 21:06 effectsbot

Found a workaround for this. I'll be using it in the meantime:

raw_dbus_session_args = [
    "--own=com.steampowered.*",
    "--own=org.xfce.Thunar",
]

effectsbot avatar Jun 04 '25 21:06 effectsbot

I wonder if flatpak steam handles this with portals.

igo95862 avatar Jun 04 '25 23:06 igo95862

According to this comment, it does, but only from the host side. https://github.com/flathub/com.valvesoftware.Steam/issues/471#issuecomment-537190627

effectsbot avatar Jun 06 '25 12:06 effectsbot

Found a workaround for this. I'll be using it in the meantime:

raw_dbus_session_args = [
    "--own=com.steampowered.*",
    "--own=org.xfce.Thunar",
]

Thunar will launch inside of the sandbox with this configuration, where it doesn't have access to own configuration files unless granted.

There is another workaround, where you run Thunar as a daemon (or just have it open on your desktop) and it'll open that file path outside of the sandbox. ~~This also works without the sandbox owning Thunar's D-Bus name.~~

effectsbot avatar Jul 05 '25 22:07 effectsbot