Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to isolating games so that they could never touch my $HOME folder? #10898

Open
Neutron3529 opened this issue May 15, 2024 · 3 comments
Open

Comments

@Neutron3529
Copy link

Your system information

  • Steam client version (build number or date): Startup - updater built May 13 2024 21:00:30
  • Distribution (e.g. Ubuntu): Arch Linux
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes
  • Steam Logs: steam-logs.tar.gz
  • GPU: Nvidia

Please describe your issue in as much detail as possible:

I want to isolate the game from my $HOME folder, enforce them using a new home folder, I make several attempts, all of them either have some shortcoming or failed to execute.

I have noticed that, steam have some sandbox tools, but I don't know how to use them.

Steps for reproducing this issue:

The most recent attemp is that, using export HOME=/me/fakehome before steam is launched.
This makes several game using the fakehome folder as its home, but there are many games (e.g., Factorio, Feud) which still write ~/.factorio or ~/.pref rather than /me/fakehome/*

I also tried export PRESSURE_VESSEL_HOME=/me/fakehome, wish the pressure-vessel-wrap could using the new home rather than the real home, but it also fails. Factorio still tried to access my HOME folder.

An ancient attempt is that, using sandboxes like bubblewrap to isolate the steam client, but it have a disadvantage:
I have a program which use nvml library to tuning the mem frequency and gpu clock while playing games.
This program have a suid bit which grants the ability to control the graphical cards. Unfortuantely, bubblewrap erase the owner to nobody, thus the program become a normal program, could no longer tuning the gpu clocks.

@hubertnnn
Copy link

Have you tried the export HOME before installing the game, or just before starting it?
Its possible that wineprefix already has symlinks pointing to your old $HOME created during game installation.

@major-gnuisance
Copy link

The most recent attemp is that, using export HOME=/me/fakehome before steam is launched. This makes several game using the fakehome folder as its home, but there are many games (e.g., Factorio, Feud) which still write ~/.factorio or ~/.pref rather than /me/fakehome/*

My hunch for those is that they are guessing your home location based on the username.

Think something like:
factorio_dir=/home/$USER/.factorio

Instead of:
factorio_dir=$HOME/.factorio

Maybe you can trick it into behaving correctly by manipulating the USER environment variable.
Maybe with USER=../../me/fakehome 🤣

@Turmfalke2
Copy link

In dota this is possible using PRESSURE_VESSEL_SHARE_HOME=0 in the launch options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants