2

I have many installed games, from various sources/stores/frontends (Steam, GOG, Humble Store and Lutris with modules like DOSBox, Libretro, WINE and ScummVM).

Unfortunately many game developers elect their own path under the user home folder to keep game related files (saves, configs, etc). There is clearly no standard or consensus in this aspect of linux gaming.

Most of those paths are under a few standard subfolders like:

/home/user/Documents/HardWest
/home/user/.config/BossConstructor
/home/user/.local/Uber Entertainment/Planetary Annihilation
/home/user/.local/share/Aspyr/Sid Meier's Civilization 5

But some create their own hidden folder put directly into the user home folder like:

/home/user/.BADLAND
/home/user/.frictionalgames/Amnesia
/home/user/.prefs

And some create visible folders there like (7 visible ones now and counting, those are the worst ofenders):

/home/user/LoversInADangerousSpacetime
/home/user/Larian Studios/Divinity Original Sin Enhanced Edition
/home/user/My Games/Orwell

And even some that use multiple paths like:

/home/user/Nongunz
/home/user/.config/nongunz

This is starting to get too messy, so I want to move them into a "games" subfolder or such, and keep my home folder clean.

I have searched online for a way to transparently redirect the game into using a new path to store their files, but all I get is mounting or symlinking. Since the idea is to eliminate those folders, not just link them, that doesn't solve the issue.

Changing the working folder doesn't seem to work either, but I might be missing something here...

Passing a parameter or setting an environment variable to each game/frontend is an acceptable solution, but I would prefer something I can set globally like a from-to table of paths. I have admin rights to the machine in question.

Is there something available (gui, cli or config) on Ubuntu, bash, linux kernel, ...?

PS: If it works well intend to somehow link the answers as a feature request/code contribution to https://github.com/supremesonicbrazil/SLSK

3
  • 3
    If your problem is only with the visible folders in home, you can simply hide them in file manager without changing their names.
    – pomsky
    Apr 21, 2018 at 16:22
  • 1
    @pomsky link: How can I hide directories without changing their names?
    – wjandrea
    Apr 21, 2018 at 18:21
  • Using ".hidden" file (plus symlinks if wanted) doesn't remove the messy folders but at least stops the rest of the family from being confused by the visible ones, so it is actually a good idea for now! Its a single file to maintain and I can easily back it up and move to a new system at reinstalls, if wanted. Thanks! Apr 23, 2018 at 3:19

3 Answers 3

1

If your problem is only with the visible folders in your home directory, you can simply hide them in file manager without changing their names. For that you need to create a file called .hidden in your home directory and write the names of the folders you want to hide in the .hidden file.

In your case content of the ~/.hidden file may be the following.

LoversInADangerousSpacetime
Larian Studios
My Games

and so.

2
  • 2
    This doesn't completely answer my original question because it doesn't solve the hidden folder mess, so I'll wait a while before marking it as accepted answer. Regardless of that, using ".hidden" file (plus symlinks if wanted) at least stops less tech-savvy users (the rest of the family) from being confused by the excess of visible folders, so it is actually a good idea for now! Its a single file to maintain and I can easily back it up and move to a new system at reinstalls, if wanted. Paired with SLSK or symlinks this is an almost perfect workaround. Apr 24, 2018 at 16:37
  • @PauloVilli I would recommend not to mark it as the accepted answer so that others may be more interested to post alternative solutions in future.
    – pomsky
    Apr 24, 2018 at 16:41
1

Sorry for the thread necromancy, but I found this topic trough the Steam namespace support announcement. And I have an idea so stupid that it might actually work:

  • create a separate user, that would be used only for launching games, disable password login,
  • set sudo to launch any command with that user without a password*,
  • [optionally] adjust .desktop files to use the sudo invocation,
  • [optionally] alias commands, as above, if using the CLI.

Also there should be a blacklist of developers not abiding the XDG specifications.

* would need a moment to prepare an working example.

0

I sadly don't think what you want is possible. It's the responsibility of each single application/game's developers to specify their saving locations.

If they decide to hard-code a specific folder into the application, there's no way for you to change it. (Well, if the game is open source, you could change it there and recompile it, or file an issue/feature request for the developer and wait for reactions...)

If they built in some configuration option, let it be e.g. an environment variable, a command-line argument or some in-application setting, that is then specific to this single application and you'd have to figure it out and adapt it for each manually.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .