flathub / com.valvesoftware.Steam

https://flathub.org/apps/details/com.valvesoftware.Steam
336 stars 70 forks source link

Steam does not start if the Music folder in $HOME is already a symlink #1089

Open strycore opened 1 year ago

strycore commented 1 year ago

My ~/Music folder is a symlink pointing to a different drive. After installing and starting Steam Flatpak, I get the following error:

bwrap: Can't make symlink at /home/strider/Music: File exists

Edit: There is also the same issue with the Pictures folder

rpdelaney commented 1 year ago

66

basedBSD commented 11 months ago

Could you go to ~/.var/app/com.valvesoftware.Steam/? Is there Pictures and Music folders in there? If so, try deleting them (should be empty) and try starting Steam again.

I had similar problem with different folder and this is how I fixed it

qrkourier commented 8 months ago

I too have pre-existing symlinks at ~/Music and ~/Pictures, and get these errors due to invalid symlinks inside the flatpak of the same names:

❯ flatpak run com.valvesoftware.Steam
bwrap: Can't make symlink at /home/kbingham/Music: File exists

If I then delete the symlink Music inside the flatpak:

❯ rm -fv ~/.var/app/com.valvesoftware.Steam/Music
removed '/home/kbingham/.var/app/com.valvesoftware.Steam/Music'

❯ flatpak run com.valvesoftware.Steam
bwrap: Can't make symlink at /home/kbingham/Pictures: File exists

Finally, removing the symlink Pictures inside the flatpak allows it to run.

❯ rm ~/.var/app/com.valvesoftware.Steam/Pictures
removed '/home/kbingham/.var/app/com.valvesoftware.Steam/Pictures'

❯ flatpak run com.valvesoftware.Steam
INFO:root:https://github.com/flathub/com.valvesoftware.Steam/wiki
INFO:root:Will set XDG dirs prefix to /home/kbingham/.var/app/com.valvesoftware.Steam
DEBUG:root:Checking input devices permissions
INFO:root:Overriding TZ to America/Toronto
steam.sh[2]: Running Steam on org.freedesktop.platform 23.08 64-bit
steam.sh[2]: STEAM_RUNTIME is enabled automatically
setup.sh[74]: Steam runtime environment up-to-date!
steam.sh[2]: Steam client's requirements are satisfied
[2023-11-04 15:20:55] Startup - updater built Oct 31 2023 02:08:17
[2023-11-04 15:20:55] Startup - Steam Client launched with: '/home/kbingham/.var/app/com.valvesoftware.Steam/.local/share/Steam/ubuntu12_32/steam' '-no-cef-sandbox'
11/04 15:20:55 Init: Installing breakpad exception handler for appid(steam)/version(1698777785)/tid(108)
[2023-11-04 15:20:55] Loading cached metrics from disk (/home/kbingham/.var/app/com.valvesoftware.Steam/.local/share/Steam/package/steam_client_metrics.bin)
[2023-11-04 15:20:55] Using the following download hosts for Public, Realm steamglobal
[2023-11-04 15:20:55] 1. https://client-update.akamai.steamstatic.com, /, Realm 'steamglobal', weight was 1000, source = 'update_hosts_cached.vdf'
[2023-11-04 15:20:55] 2. https://cdn.cloudflare.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'update_hosts_cached.vdf'
[2023-11-04 15:20:55] 3. https://cdn.steamstatic.com, /client/, Realm 'steamglobal', weight was 1, source = 'baked in'
[2023-11-04 15:20:55] Verifying installation...
[2023-11-04 15:20:55] Verification complete

So, I found it necessary to delete the Music and Pictures symlinks before I can run it each time. However, the flatpak re-creates the invalid symlinks each time.

❯ ll ~/.var/app/com.valvesoftware.Steam/Pictures/
/bin/ls: cannot access '/home/kbingham/.var/app/com.valvesoftware.Steam/Pictures/': No such file or directory

❯ ll ~/.var/app/com.valvesoftware.Steam/Pictures 
lrwxrwxrwx 1 kbingham kbingham 38 Nov  4 15:20 /home/kbingham/.var/app/com.valvesoftware.Steam/Pictures -> ../../home/kbingham/Downloads/Pictures

❯ ll ~/.var/app/com.valvesoftware.Steam/Music
lrwxrwxrwx 1 kbingham kbingham 35 Nov  4 15:20 /home/kbingham/.var/app/com.valvesoftware.Steam/Music -> ../../home/kbingham/Downloads/Music

❯ ll ~/.var/app/com.valvesoftware.Steam/Music/
/bin/ls: cannot access '/home/kbingham/.var/app/com.valvesoftware.Steam/Music/': No such file or directory

In fact, the invalid symlinks make no sense because they are linking to ../../home, which is two levels above /, which does not exist.

❯ flatpak list|grep -i steam
Steam   com.valvesoftware.Steam 1.0.0.78        stable  user
archfreaque commented 5 months ago

My partner discovered a potential work-around if you want to call it that. he created a user-dirs.dirs in $HOME/.config. this is mine:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/"
XDG_VIDEOS_DIR="$HOME/Videos"