Steam for Linux

Steam for Linux

Browser_ice 5 października 2024 o 9:15
[ANSWERED] Steam storage location adding : what kind of drive we can add?
Hi, I installed Steam on my Ubuntu 24.04 LTS yesterday but when it was time to install a game I wanted to choose a different drive to install it. So it brought me into a kind of a storage related window where I could choose to add a different location.

When I clicked the add option, it poped up a Ubuntu window where I can browse but there was an error message "The folder contents could not be displayed. Operation not supported" I clicked CLOSED button to remove this message and proceeded to chose the folder I had mapped to another partition that I had created especially for this.

Choosing this partition throught the /Games path did nothing back in that Steam adding storage window.

So this makes me wonder what kind of drive/partition/path we can use to add an additional storage location for Steam.

Is it because I mapped it on the root level instead of the user level (/home/user/Games)?

Or I shouldn't have created a path to this partition and it would have appeared in the list of drives to choose?

I installed Steam from the supplied package given at the Steam site.
Ostatnio edytowany przez: Browser_ice; 5 listopada 2024 o 12:56
Początkowo opublikowane przez Pepe:
The error message is kind of weird considering /Games is a direct child of root directory. By default it should be mounted with traverse rights (o+x) which should give everyone permission to list the contents. But Steam does quirky things with dirs under GNU/Linux, at least. Plus, even with traverse, you would need to have read and write permissions also to download games and read files.

If you mounted the new disk partition into /Games and it is ext4, it will be owned by root. Assuming the disk is mounted properly, easiest thing to do is to create another dir inside /Games like SteamLibrary and own it. Then use /Games/SteamLibrary as storage location. This will work on reboots, this will work with default mount options.
sudo mkdir /Games/SteamLibrary ls -la /Games | grep SteamLibrary sudo chown $(/usr/bin/id -run) /Games/SteamLibrary ls -la /Games | grep SteamLibrary
You should see your username in the owner/user column.
< >
Wyświetlanie 1-12 z 12 komentarzy
Kepos 5 października 2024 o 9:27 
Well, did you possibly not include your drives in your 'fstab' in first place?
If you do not have the authority for that drive, things get a bit messed up.
Here some informations about fstab from ubuntu[help.ubuntu.com]. But be careful, if you wreck your fstab, you might need to tinker to run your system again...
Usually Steam could be told to search every mounted device for games, but on next computer start it wouldn't remember if it isn't written in your fstab.
I'd also suggest to avoid Windows partitions as this brings a load of issues you have to deal with. I'm on an Arch based distribution actually, but also started with Ubuntu a while ago.
Have fun! :steamhappy:
Autor oznaczył ten post jako odpowiedź na oryginalny wątek.
Pepe 5 października 2024 o 13:21 
The error message is kind of weird considering /Games is a direct child of root directory. By default it should be mounted with traverse rights (o+x) which should give everyone permission to list the contents. But Steam does quirky things with dirs under GNU/Linux, at least. Plus, even with traverse, you would need to have read and write permissions also to download games and read files.

If you mounted the new disk partition into /Games and it is ext4, it will be owned by root. Assuming the disk is mounted properly, easiest thing to do is to create another dir inside /Games like SteamLibrary and own it. Then use /Games/SteamLibrary as storage location. This will work on reboots, this will work with default mount options.
sudo mkdir /Games/SteamLibrary ls -la /Games | grep SteamLibrary sudo chown $(/usr/bin/id -run) /Games/SteamLibrary ls -la /Games | grep SteamLibrary
You should see your username in the owner/user column.
Ostatnio edytowany przez: Pepe; 5 października 2024 o 13:24
Browser_ice 5 października 2024 o 13:35 
About one hour prior to installing Steam, I had re-installed Ubuntu completely with the Live Ubuntu CD and when I chose the kind of installation I wanted, I chose my other partition to be used as /Games and my external drive to be something else.

Once installed, I booted into Ubuntu and this drive got mounted as /Games but when I installed Steam after, the Steam Storage adding function could not see it at all.

Thus back to my question:

What kind of drive/partition/path we can use to add an additional storage location for Steam.

Does it have to be a stand alone unmounted partition or can it be a path to whatever?
Browser_ice 5 października 2024 o 13:47 
Początkowo opublikowane przez Pepe:
The error message is kind of weird considering /Games is a direct child of root directory. By default it should be mounted with traverse rights (o+x) which should give everyone permission to list the contents. But Steam does quirky things with dirs under GNU/Linux, at least. Plus, even with traverse, you would need to have read and write permissions also to download games and read files.

If you mounted the new disk partition into /Games and it is ext4, it will be owned by root. Assuming the disk is mounted properly, easiest thing to do is to create another dir inside /Games like SteamLibrary and own it. Then use /Games/SteamLibrary as storage location. This will work on reboots, this will work with default mount options.
sudo mkdir /Games/SteamLibrary ls -la /Games | grep SteamLibrary sudo chown $(/usr/bin/id -run) /Games/SteamLibrary ls -la /Games | grep SteamLibrary
You should see your username in the owner/user column.

This did the trick. However as soon as click to add a new storage, I had the same error message and after closing it, I went to locate and choose the /Games and then SteamLibrary folder. Once back in the Steam Storage adding window, both button at the bottom were grayed out but when I clicked again to add, it lised the /Games as now being part of an addition storage. I could then proceed to install a game on it.

I went to check inside the SteamLibrary on my /Games and it is now getting populated with files.

Thank you.
Zyro 5 października 2024 o 13:54 
Początkowo opublikowane przez Browser_ice:
About one hour prior to installing Steam, I had re-installed Ubuntu completely with the Live Ubuntu CD and when I chose the kind of installation I wanted, I chose my other partition to be used as /Games and my external drive to be something else.

Once installed, I booted into Ubuntu and this drive got mounted as /Games but when I installed Steam after, the Steam Storage adding function could not see it at all.

Thus back to my question:

What kind of drive/partition/path we can use to add an additional storage location for Steam.

Does it have to be a stand alone unmounted partition or can it be a path to whatever?

To the best of my knowledge, it needs to be a standalone _mounted_ partition.
Pepe 5 października 2024 o 13:55 
Początkowo opublikowane przez Browser_ice:
About one hour prior to installing Steam, I had re-installed Ubuntu completely with the Live Ubuntu CD and when I chose the kind of installation I wanted, I chose my other partition to be used as /Games and my external drive to be something else.

Once installed, I booted into Ubuntu and this drive got mounted as /Games but when I installed Steam after, the Steam Storage adding function could not see it at all.

Thus back to my question:

What kind of drive/partition/path we can use to add an additional storage location for Steam.

Does it have to be a stand alone unmounted partition or can it be a path to whatever?
Did you even read what I've posted? It seems to me you don't quite comprehend how the file systems work under Linux.

Later Edit: oh, so your read my post afterwards (you made a second post, but it's under analysis)... OK. :ghlol:

Anyway...

1. Any kind of drives/paths that is compatible with GNU/Linux. Any kind of GNU/Linux designed file systems (ext*, xfs, Btrfs). That's because Steam is acting weird on *FAT, NTFS, prolly also on other 3rd party file systems, not because GNU/Linux can't work with them.

2. Huh? You can mount your partition anywhere you want, just don't mount it as an existing system directory path that is already used for something else, because the critical files your system needs will be replaced by your mounted partition (for example, you don't create a new mount point /var or /usr, if those are not already partitioned separately).

Later Edit 2: Further guidance on Linux file system:
https://tldp.org/LDP/intro-linux/html/chap_03.html
https://www.pathname.com/fhs/pub/fhs-2.3.html
Ostatnio edytowany przez: Pepe; 5 października 2024 o 14:15
Browser_ice 5 października 2024 o 15:45 
Thank you Pepe.

I bookmarked them.
grzegorz77 5 października 2024 o 15:54 
If you have installed the steam from flatpak sandbox package.
You can add any disk you have allocated to the flatpak sandbox as usable.

If you have included steam in your system by installing the package included in the distribution. You can add any disk that is available to your user.

In either case, you can add or revoke the right to use the discs.
AshHinton 5 listopada 2024 o 3:04 
Początkowo opublikowane przez Kepos:
Well, did you possibly not include your drives in your 'fstab' in first place?
If you do not have the authority for that drive, things get a bit messed up.
Here some informations about fstab from ubuntu[help.ubuntu.com]. But be careful, if you wreck your fstab, you might need to tinker to run your system again...
Usually Steam could be told to search every mounted device for games, but on next computer start it wouldn't remember if it isn't written in your fstab.
I'd also suggest to avoid Windows partitions as this brings a load of issues you have to deal with. I'm on an Arch based distribution actually, but also started with Ubuntu a while ago.
Have fun! :steamhappy:

Echoing the above. I've just switched back to Linux after too many years using Windows. I started gaming with Steam on Linux and have come back very recently - this week - to Ubuntu 24.10 (vanilla Gnome desktop, Wayland), Steam installed via apt get (not flatpak/ubuntu app store)

To the OP:
Definitely have your games drive mounting via your fstab, I mount mine to a folder I created in my home: ~/GamesSSD (/home/ashley/GamesSSD)

For me Ubuntu's Disk utility > select drive > click cog > automount options didn't seem to work - but see below re: Steam - although doing through Disks didn't seem to modify my fstab so I'm still sceptical.

I found it easier to make a relatively simple entry in fstab (/etc/fstab) and set permissions on the drive itself rather than mount with any particular permissions in fstab - I might be wrong here and it might come back to bite me but then again I'm the only user on the system.

Before modifying fstab you can always make a copy:
sudo cp /etc/fstab /etc/fstab-backup-copy

For ease, and so you know what you did some time later, put a comment - or comments - (with the # preceding them) in the fstab file and put your entry below it. Leave alone whatever else is there or you can indeed cause yourself a headache.

In my case at the end of my fstab I append:

# This mounts my games SSD drive to a directory in my home folder
# Simple entry with no permissions as I have set read/write permissions directly on SSD
/dev/nvme0n1 /home/ashley/GamesSSD ext4 defaults 0 1


There are ways of identifying the drive to mount using reference to a device (/dev), or by UID. You can check how to do either, I found my device by:

fdisk -l

The drive is physically in a NVME slot, on the motherboard, so its not going to change but if something did or I wanted to address it by its unique ID I could modify my fstab, leaving everything else the same - it would still mount and appear in /home/ashley/GamesSSD.

Once you've done that you can check it works by:
sudo mount -a

At that point it will say your fstab has been modified and you need to reload the service by.. (follow what it says.. the command reloads the service)

After that again type (or press the up arrow a couple of times on the keyboard to find the command in your history) sudo mount -a at that point it should mount your drive to wherever you have told it mount.

Important note re: Steam - a bug maybe? an incompatibility with Gnome? who knows but I found if I clicked to add my games drive/location - within steam - nothing happened. It was if I wasn't clicking. There is a UI compatibility checkbox, right at the bottom of the relevant section in steam's settings, I can't remember offhand what its called as I'm not in front of my pc right now but until I ticked it I couldn't click.

Legacy click or select or something like that.

Might just be a Gnome/24.10 Ubuntu/whatever thing who knows but it was driving me mad until I saw a solution elsewhere.

If your drive is mounting fine but you still can't add it in Steam definitely check that out.

Hope that helps :steamhappy:

ps: its advised to not use Windows NTFS drives for your Linux games drive - you reference what "kind" of drive. See other replies here regarding that.

And I'm not sure how new you are to Linux so apologies if you already know this but a couple of terminal tips:

pressing up arrow will scroll back through the previous stuff you typed
pressing TAB will autocomplete commands (mostly) and file paths:

Try opening terminal and typing
ls -l ~/Deskt and then hit the tab key.

~ refers to your home directory:
~/GamesSSD is the same as /home/ashley/GamesSSD
~/Desktop is the same as /home/ashley/Desktop
grzegorz77 5 listopada 2024 o 6:55 
@AshHinton:

I think this topic will be interesting for you:
https://psteamcommunity.yuanyoumao.com/app/221410/discussions/0/4840896974228634935/#c4840896974229348794
(Help for new people to Linux?)

lsblk -o name,model,size,mountpoint,fstype,label,uuid
blkid /dev/sda1

Although, as you write, it doesn't matter, in your case. Mounting via uuid is a better habit.

Giving permissions to a folder is a good idea, but it is better to give the owner.
You can also create a group and add permissions for the group.
Midnight Commander is a great program for such disk operations.

Many of the things you write about in home computer are easiest to "fix" by rebooting.
Browser_ice 5 listopada 2024 o 12:55 
Since that post I was able to add Steam games to my other drive. If I remember right, even if there is some kind of error message, it pertains only to what is being shown as found drives. But using that same window, I was able to point to my root (/) to then go select my added drive. I had put the mapping of my added drive under root and not under my /home.

But in any case, I have been playing games since then so I can consider this thread as closed.
Początkowo opublikowane przez AshHinton:
Important note re: Steam - a bug maybe? an incompatibility with Gnome? who knows but I found if I clicked to add my games drive/location - within steam - nothing happened. It was if I wasn't clicking. There is a UI compatibility checkbox, right at the bottom of the relevant section in steam's settings, I can't remember offhand what its called as I'm not in front of my pc right now but until I ticked it I couldn't click.

Legacy click or select or something like that.

Might just be a Gnome/24.10 Ubuntu/whatever thing who knows but it was driving me mad until I saw a solution elsewhere.

If your drive is mounting fine but you still can't add it in Steam definitely check that out.

Hope that helps :steamhappy:

This was the crucial last step for me, thanks for posting this! I turned on the toggle at:
Steam Settings>Interface>Enable context menu focus compatibility mode
...and could finally select my second drive in Steam and set it as the default storage location.
Ostatnio edytowany przez: joenesaisquoi; 30 września o 3:42
< >
Wyświetlanie 1-12 z 12 komentarzy
Na stronę: 1530 50