flathub / com.valvesoftware.Steam

https://flathub.org/apps/details/com.valvesoftware.Steam
344 stars 69 forks source link

Does not start due to symbolic link error (bwrap) #887

Open rugk opened 2 years ago

rugk commented 2 years ago

Bubblewrap gives me a very strange error when trying to start Steam (fresh installation):

STR

$ flatpak run com.valvesoftware.Steam 
bwrap: Can't make symlink at /var/home/rugk/Musik: File exists

Expected

I have no idea why it even mangles with my home folders, what does it have to do with that? After aall, it should not even have access to any files (yet, in $HOME), which is a good thing IMHO: Edit: Ah no, wtf – why does it have/need to have access to pictures and music?

$ flatpak info --show-permissions com.valvesoftware.Steam
[Context]
shared=network;ipc;
sockets=x11;wayland;pulseaudio;
devices=all;
features=devel;multiarch;bluetooth;per-app-dev-shm;
filesystems=xdg-run/app/com.discordapp.Discord:create;xdg-pictures:ro;xdg-music:ro;
persistent=.;
unset-environment=ALSA_CONFIG_PATH;TZ;STEAM_RUNTIME_PREFER_HOST_LIBRARIES;STEAM_RUNTIME;SDL_VIDEODRIVER;MESA_GLSL_CACHE_DIR;

[Session Bus Policy]
org.kde.StatusNotifierWatcher=talk
org.freedesktop.Notifications=talk
org.gnome.SettingsDaemon.MediaKeys=talk
org.freedesktop.ScreenSaver=talk
org.freedesktop.PowerManagement=talk

[System Bus Policy]
org.freedesktop.NetworkManager=talk
org.freedesktop.UPower=talk
org.freedesktop.UDisks2=talk

[Environment]
ALSA_CONFIG_PATH=
TZ=
STEAM_EXTRA_COMPAT_TOOLS_PATHS=/app/share/steam/compatibilitytools.d
PYTHONPATH=/app/utils/lib/python3.8/site-packages
LC_NUMERIC=C
FLATPAK_PREFER_USER_NPM=1
LC_MONETARY=C
FLATPAK_STEAM_UPDATE_SYMLINKS=0
DBUS_FATAL_WARNINGS=0
STEAM_RUNTIME_PREFER_HOST_LIBRARIES=
FLATPAK_STEAM_XDG_DIRS_PREFIX=~/.var/app/com.valvesoftware.Steam
LC_TELEPHONE=C
SSL_CERT_DIR=/etc/ssl/certs
STEAM_RUNTIME=
LC_MEASUREMENT=C
XDG_DATA_DIRS=/app/share:/usr/lib/extensions/vulkan/share:/usr/share:/usr/share/runtime/share:/run/host/user-share:/run/host/share
LC_NAME=C
XDG_CONFIG_DIRS=/etc/xdg:/usr/lib/x86_64-linux-gnu/GL:/usr/lib/i386-linux-gnu/GL
LC_COLLATE=C
SDL_VIDEODRIVER=
GST_PLUGIN_SYSTEM_PATH=/app/lib/gstreamer-1.0:/app/lib32/gstreamer-1.0:/usr/lib/extensions/gstreamer-1.0:/usr/lib/x86_64-linux-gnu/gstreamer-1.0:/usr/lib/i386-linux-gnu/gstreamer-1.0
MESA_GLSL_CACHE_DIR=
LC_ADDRESS=C
PATH=/app/bin:/app/utils/bin:/usr/bin
PROTON_DEBUG_DIR=/var/tmp

The thing is, I already have a symbolic link there (deliberately done because that's how I sync my music via Nextcloud), so it likely fails because of that:

$ ls -la /var/home/rugk/Musik
lrwxrwxrwx. 1 rugk rugk 16  5. Jun 2020  /var/home/rugk/Musik -> Nextcloud/Musik/

Flatpaks

$ flatpak info com.valvesoftware.Steam 

Steam - Launcher for the Steam software distribution service

         Kennung: com.valvesoftware.Steam
             Ref: app/com.valvesoftware.Steam/x86_64/stable
     Architektur: x86_64
           Zweig: stable
         Version: 1.0.0.74
         License: LicenseRef-proprietary
        Ursprung: flathub
        Sammlung: org.flathub.Stable
    Installation: system
     Installiert: 41,7 MB
Laufzeitumgebung: org.freedesktop.Platform/x86_64/21.08
             Sdk: org.freedesktop.Sdk/x86_64/21.08

          Commit: 8bb8984c379ba159da39079071fde6a0f87e2e40b45a46ff8e77e7f0bf1bd99c
          Parent: 4a606a219c4745d5ce93b290e54395be9031bd39f347d7f73257566abf568085
         Subject: wrapper: Run Steam with -no-cef-sandbox (93f2ab02)
            Date: 2022-02-18 19:38:24 +0000

$ flatpak info com.valvesoftware.Steam.CompatibilityTool.Proton 

Proton (community build) - Die neueste Proton-Version basiert auf dem Flatpak
Freedesktop SDK

     Kennung: com.valvesoftware.Steam.CompatibilityTool.Proton
         Ref: runtime/com.valvesoftware.Steam.CompatibilityTool.Proton/x86_64/stable
 Architektur: x86_64
       Zweig: stable
     Version: 6.3-8
     License: BSD-3-Clause and LGPL-2.1 and zlib-acknowledgement and Zlib and OFL-1.1 and MIT and MPL-2.0 and LicenseRef-proprietary
    Ursprung: flathub
    Sammlung: org.flathub.Stable
Installation: system
 Installiert: 1,3 GB

      Commit: 178156a2fa0176c213863f25516ef4b5c975f8440c5a1b0ff2a80d596729a61b
      Parent: 45e44547ce7633ef3f0c5e6539081c97d92241fa86dacb9b14141c1c99291e9c
     Subject: Remove rc version from metainfo (c45779a9)
        Date: 2022-01-01 20:37:47 +0000

System

Flatpak v1.12.7 Fedora 35 Silverblue (35.20220329.0)

Solution

Remove access to pictures and music?

nanonyme commented 2 years ago

You can remove using flatpak override

rugk commented 2 years ago

Yeah okay, but it should work in any case even if I do not remove that.

Maybe it is a flatpak issue though…

rugk commented 2 years ago

Okay so now did this:

flatpak --user override --nofilesystem=xdg-music com.valvesoftware.Steam
flatpak --user override --nofilesystem=xdg-pictures com.valvesoftware.Steam

which results in this:

flatpak info --show-permissions com.valvesoftware.Steam                   
[Context]
shared=network;ipc;
sockets=x11;wayland;pulseaudio;
devices=all;
features=devel;multiarch;bluetooth;per-app-dev-shm;
filesystems=xdg-run/app/com.discordapp.Discord:create;!xdg-pictures;!xdg-music;
persistent=.;
unset-environment=ALSA_CONFIG_PATH;TZ;STEAM_RUNTIME_PREFER_HOST_LIBRARIES;STEAM_RUNTIME;SDL_VIDEODRIVER;MESA_GLSL_CACHE_DIR;

…

…which I guess, due to explicitly mentioning the directories, still fails to start… :thinking:

$ flatpak run com.valvesoftware.Steam                    
bwrap: Can't make symlink at /var/home/rugk/Musik: File exists
proninyaroslav commented 2 years ago

@rugk Same here. Were you able to fix it?

nanonyme commented 2 years ago

Iirc there is an existing issue about this filed against flatpak, more or less untouched. Good that the workaround works.

proninyaroslav commented 2 years ago

@nanonyme No, the workaround doesn't work.

rugk commented 2 years ago

No the workaround does not work. And I found https://github.com/flatpak/flatpak/issues/3477 which looks similar, but anyway reported a new issue now in https://github.com/flatpak/flatpak/issues/4894 given it e.g. even does not work when I remove that permission.