Is it possible to install packages per-user instead of system-wide?

I would like to be able to install (optional) packages on per user basis. For example I want to install Steam on my account (wheel / admin). But other user accounts should Not be able to see/execute the app when logged in. It doesn’t matter if other user account is in the Admin group or Standard I tried it already.
Unfortunately I couldn’t find anything useful on this topic online.
I’m a newb. All I know is that the packages are installed in /root. Only /home folders (partitions) are hidden.

The package steam cant be installed for a user but you can manually install it into your home directory.

Alternatively, you could use the flatpak and do a user install but the steam flatpak is not official

1 Like

Along with @dalto’s suggestion, you can take a look at the Nix Package Manager: https://nixos.org/learn/. I use it to install a small set of utilities on my main EOS system as well as all of my Linux-based VMs, mainly to ensure that they are the same versions throughout my network. These packages are installed per-user, so it fits your requirement.

I have not tried anything as extensive as steam, or any GUI-based programs for that matter, but it’s worth a look.

OK. Now I have to figure out how to manually install packages.
I though there’s a script (semi automated, at least) to run before installing specific packages that would make it easier. Like open*.tar file with that script.

Wouldn’t using GIT allow for installing packages per user?

Of course, I don’t think this would work for Steam.

Keep in mind, steam is just a launcher. The whole thing is installed into your home directory no matter what.

You can literally just download it from steam’s site and run the launcher.

No. You could use git to manually download the software but packages are never installed per user.

What about this solution from more than 11y ago:
[https://unix.stackexchange.com/questions/73653/installing-a-package-locally-to-a-user-best-practices]
It looks like I can screw it up a few different ways if I try it.

Also, is there some reason you don’t want steam installed for everyone?

It wouldn’t actually give anyone else access to your games or settings.

That might work if you were using an rpm-bsed distro, but you are not.

Steam was just like an example for a GUI app. I think the bigger picture is a potential security issue, if one is sheering a desktop with other people.

What security issue? The application is installed centrally but the data is separate. The two users won’t see other settings, history or documents.

For both users, there will be no indication that someone else is using the same application.

There are several options to do what you want to do:

  • Install flatpaks with the --user option.
  • Use appimages
  • Use nix
  • Use brew
  • Manually install the software to your home directory without a package

Hmm. I’m not sure. For example shared Firefox web browser. It was keeping my logged account when opened trough separate user.

Not normally it won’t, your profile is stored locally in your home directory.

It doesn’t matter where applications are installed. The data isn’t stored with the application. Your normal user account couldn’t write data to those locations even if the application tried to do so.

Thank you dalto for you quick reply!
Ill have to keep learning and experimenting. Maybe one day I’ll come with a guide (or a script is become that good :slight_smile:
Onto the Endeavor we go!