flathub / com.valvesoftware.Steam

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

Flatpack Steam won't let me instal games on a secondary drive #1183

Open BlackStark62 opened 1 year ago

BlackStark62 commented 1 year ago

I am currently running Linux mint 21.1 vera and one of the recent updates to the flatpack version of steam has made it so that I cannot install games to my secondary drive where I intend to store them. Even after taking steps to make sure make sure the disk has appropriate permissions. When I make a new library on that drive and try to install a game it stops and reports a disk write error every time.

tsoruu commented 1 year ago

Same here, Want to make a unified Steam Library for Linux and Windows in an external drive, formated in NTFS. Running VanillaOS, which should be irrelevant (from my understanding) as Flatpak runs similarly to a container... Adding directory via flatpak override --user --filesystem=/path/to/mountpoint com.valvesoftware.Steam and adding the directory in Steam as an external drive didn't work as it shows that Steam binds the actively selected drive as /run/user/1000/doc/e639edc2/steamlibrary. Should I mount the drive first or should I just appoint the drive to /dev/nvme01px? Adding the mounted file system in the flatpak override seems like Steam just skips the Drive discovery as there isn't any error code nor the added drive in the Storage setting of Steam

drguildo commented 1 year ago

I also have this issue on Fedora 38. I have done flatpak override --user --filesystem=/mnt/foo com.valvesoftware.Steam and restarted Steam, but when I go to either add a new library, or create a new one, under /mnt/foo, it just silently fails.

If I create a new one, it seems to create the steamapps subdirectory, but it doesn't actually list it in the Steam GUI.

Gamertech commented 11 months ago

Mount the drive (/mnt/games for me), then add that path to Steam via Flatseal.

If flatpak apps aren't allowed to access something directly, paths show up as /run/user/etc.

yanickrochon commented 7 months ago

I have been trying to find a solution for this for a while, now.

The exact path to my external Steam library is set, and starting Steam I can indeed add the external library, however it can't see any game.

image

All games look like they aren't installed. When I try to reinstall one, the process hangs when downloading data. It seems like Steam has no read access to the external library?

When I browse the files of that library, it correctly opens Nautilus in the steamapps folder, and I can see all the appmanifest_???.acf files.

Gamertech commented 7 months ago

I have been trying to find a solution for this for a while, now.

You have to whitelist additional drives in the flatpak sandbox. The /run/user location is a temporary address punched through xdg-portals because you didn't allow access. It wont work.

yanickrochon commented 7 months ago

@Gamertech thank you for the response, however this is what I did. But, now I have the other problem described, here : https://github.com/flatpak/xdg-desktop-portal/issues/689 where Steam won't show my files, but xdg-docum, somehow, has these files mounted and locked even is Steam is no longer running.

Well, this is not helping making Linux welcoming for Windows users!

rairay91 commented 3 months ago

For everyone having issue regarding steam from flatpak not letting you add external or second drive for library, here is a solution.

1 -> First screenshot here showing how you want your system to auto mount external or second drive after booting device. You can do this easily by editing fstab file. 1) Open fstab file using kate text editor, I will recommand kate text editor if you are not experienced linux user because kate has an inbuilt code formatter. 2) I am assuming you know about red labeled texts(what they are meant for). For green labeled texts, first one in my case /WD is for where i actually mounted my drive, your may by anything where you want to mount your drive. 3) Second section of green labeled texts is what responsible for letting steam use external drive as library. Here "nofail" is for only in the case where system could not mount drive properly it will still boot(you need not to worry about this argument). "users, defaults, exec, auto" are the arguments you are going to add. 4) Reboot your system. Note: you should add these arguments in the same order.

2 -> Second screenshot is from flatseal, which(flatseal) you will use for allowing steam to access your external drive . Note: This screenshot is not mine, that is why here dive path is nat same(don't get confused). But process is same except drive path is where you mounted it in the system. First open flatseal -> click on steam labeled as number one -> scrolldown to "filesystem" section labeled as number two -> click on little folder or plus icon labeled as number 3 -> a new empty rectangular bar will be added(here labeled as number 4). You need to add actual path of where you mounted your drive.

3 -> Third screenshot showing the game library on external drive you mounted using method mensioned above.

Enjoy😊

Oroborius commented 3 months ago

@rairay91 Unfortunately this does not work for me. However I am using a different setup so maybe that's why?

Currently trying to get Steam to load a partition that belongs to an LVM while the partition is an XFS partition. Furthermore it's almost 4TB. Anyways I cannot for the life of me figure out how to get this to load into Steam.

Edit: Nevermind apparently I'm just a dumbass. I did not know I needed to grand read/write permissions after creating the partition.

If you're dumb like me do this; sudo chmod ugo+wx /run/media/Games or however way you wanna format that command XD

rairay91 commented 2 months ago

If you are talking about granting read and right permission to that directory/drive from flatseel then this permission is required for any flatpak app(which you will do by appending r:o after path to directory i guess.

While if you are talking about granting read and write permission for directory/drive from /etc/fstab file then in the screenshot above i have shown my drive is mounted with couple of arguments/options, one of them is users, which tell system that user can read and right to this drive without any ristriction. You also need to add others(defaults,exec,auto) in the same order. This let your application(steam from flatpak as well as system package) to access drive, directory, symlink in any way. You can add directory or entire partition or symlink to directory/drive, whatever way you want to go. It took me days to find out the solution, and not a single solution online was complete, but finally this one worked out of the box.

Korkman commented 1 month ago

@rairay91 Not quite correct. The users mount option allows any user to mount the filesystem, it does not grant write permissions - this is what chmod is for.