Files
steamtricks/README.md
charwrangler404 e093670ec3 Update README.md
2025-05-28 21:44:05 -05:00

5.2 KiB

steamtricks

This is a repository of my Steam hacks to allow things such as multiple installs of the same game

Determining how you've installed Steam

The easiest way to find out if you've installed Steam as a flatpak or from your package manager is to run the following command:

$ flatpak list | grep Steam
Steam	com.valvesoftware.Steam	1.0.0.81	stable	system

If you get any output that does not look similar to the above, you have Steam installed through your package manager and can skip the next section.

Installation

Either git clone this repository and install using the install script, or run the following command in your shell:

curl https://raw.githubusercontent.com/charwrangler404/steamtricks/refs/heads/main/webinstall.sh | $SHELL

Notes on setup with a flatpak Steam

NOTE: IF YOU DO NOT KNOW WHERE YOUR STEAM GAMES ARE INSTALLED, FIND THIS OUT FIRST

You will need to know where your steam games live on your system for any of this to work.

If you're using a flatpak (the recommended method) you will need to ensure your games are installed OUTSIDE of the flatpak container. This can be done by installing the flatseal flatpak and modifying the permissions of your flatpak to allow it to access files outside of the container.

ALLOWING STEAM TO ACCESS ANY FOLDER UNDER /home WILL BREAK YOUR STEAM INSTALL AND THAT PERMISSION WILL NEED TO BE REMOVED TO START STEAM

The default that I use is to put my Steam library under /var/games. If you do not know what you are doing, this is probably the best option. Whatever you do, make sure that your install has enough space in /var to install all the games you wish to play. You can use the df -h command to let you know how much space you have free on your system, and where it is. Some Linux install defaults include VERY SMALL /var partitions and filling it up with files as you try to install games is a sure-fire way to CRASH YOUR SYSTEM. I mount a 4TB ssd to /var/games in my setup to prevent this.

If you do not know how to set this up, I recommend you read about /etc/fstab for automouting it on boot. If it's encrypted (not recommended for a games-only drive) you will also need to read about /etc/crypttab. Setting up encrypted game installs is outside of the scope of this article.

If you're willing to mess around a bit until I get some proper variable management set up, you can install your games somewhere else. Other good options include somewhere under /opt. That's probably about it as far as good places to put your games. If you want to know more about which files you will need to edit to change the path to something other than /var/games, read the below section as well.

Notes on setup with a system package Steam

If you installed Steam with a system pacakage manager (apt, yum, dnf, etc) and NOT flatpak, you can ignore the above section, but will need to edit the STEAMPREFIX variable in your shell profile after install. As far as to where this variable is located, it depends on your shell. You can find out the name of your shell with the following command:

  echo $SHELL | awk -F "/" '{print $NF}'

The most common shells include bash, sh, and zsh. If you do not have one of these shells, you should do some googling to find out where your shell profile is located. The sh shell is unsupported. If you have this as your main shell, either something is very wrong with your system or you know enough to figure out what I'm doing in the script and can engineer your own solution. bash and zsh shell profiles are located in ~/.bashrc and ~/.zshrc, respectively. As they are "dotfiles" they are hidden from commands and the file viewer by default, so if you want to list them in the shell or your file browser, you will need to either use ls -la or find out how to show hidden files in your graphical file browser.

multiple_install_manager.sh

This is the script that will be added to your profile in your shell, allowing you access to the following commands

setup_install
change_install

The setup_install command essentially renames an existing install in your STEAMPREFIX path.

the change_install command creates symbolic links to that new install location at the location where Steam expects that game to be installed. Please note the prompts in this command, you will need to heed the prompts if you don't want to be reinstalling your games all the time. I use this for Project Zomboid, which is a fairly small game, but if you are using this for a game much larger than that, it will get annoying to accidentally update your game to a version you do not want it to be. In order to maintain the different versions of the game as different versions, there are some clicks you will have to make in Steam itself to prevent it from updating the game to a version you do not want that install to be at. Some of these clicks will be needed to be made EVERY TIME you run the change_install script.

Most notably, you will want to ensure that your update settings for the game are set up so that steam does not update the game automatically. If you change them to "Only update on launch" it will not mean reinstalling the game to ensure you keep the versions that you want separate separate when you launch Steam.