With the new arrival of Steam games to Linux came the messy Windows-ish file-structures of the games. They get scattered all around your hard drive without you having a clue what is actually going on which we already talked about before.
I have decided to try and help with that matter, and wrote a simple bash script that would take all of your save data, move it to your home//.local/share/games, and create symlinks instead of the actual save data, so the games would be able to access the new save location. I call that script LGSO (Linux Game Saves Organizer).
The script is far from perfect and I have a lot to add, but the basics of the script are already there, and it is fully usable.
As the documentations of Linux games are very poor, I've struggled with finding game save paths, and therefore LGSO currently only supports 4 games: 3089, 7 Days to Die, Blade of Destiny and Planet Explorer. It needs help to support many more.
The main goals of my script are to tweak it a little bit more (add a backup\restore function, easy customization) and to maintain a wiki with all of the save paths, for others to be able to refer to.
LGSO is available at GitHub: https://github.com/Tux1c/LGSO
And you can currently contribute by either reporting bugs and issues, giving locations of game saves, or submitting Pull Requests with pieces of code you think should be implemented!
I have decided to try and help with that matter, and wrote a simple bash script that would take all of your save data, move it to your home/
The script is far from perfect and I have a lot to add, but the basics of the script are already there, and it is fully usable.
As the documentations of Linux games are very poor, I've struggled with finding game save paths, and therefore LGSO currently only supports 4 games: 3089, 7 Days to Die, Blade of Destiny and Planet Explorer. It needs help to support many more.
The main goals of my script are to tweak it a little bit more (add a backup\restore function, easy customization) and to maintain a wiki with all of the save paths, for others to be able to refer to.
LGSO is available at GitHub: https://github.com/Tux1c/LGSO
And you can currently contribute by either reporting bugs and issues, giving locations of game saves, or submitting Pull Requests with pieces of code you think should be implemented!
Some you may have missed, popular articles from the last month:
All posts need to follow our rules. For users logged in: please hit the Report Flag icon on any post that breaks the rules or contains illegal / harmful content. Guest readers can email us for any issues.
Can I suggest tagging your releases?
0 Likes
Braid is one that can be added easily, it's hiding in /.Braid , I don't have a github account.
ps the rest of the games I've got installed in steam right now all have their save files in the /.local/share folder, all over the share folder.
ps the rest of the games I've got installed in steam right now all have their save files in the /.local/share folder, all over the share folder.
0 Likes
I wrote a small python script for myself a while back that places links for all my game saves in one folder. Another small bash script tars each of those and puts in a folder for backup.
I also wrote a scraper for scrapy that downloads information about save game locations from PC Gaming Wiki.
Here is save game location data for hundreds of games:
https://gist.github.com/xitij2000/c5e66d5447dc7653a3ea
It lists over 400 entries, but many are blank.
I also wrote a scraper for scrapy that downloads information about save game locations from PC Gaming Wiki.
Here is save game location data for hundreds of games:
https://gist.github.com/xitij2000/c5e66d5447dc7653a3ea
It lists over 400 entries, but many are blank.
2 Likes
http://pcgamingwiki.com/wiki/Category:Linux
is a good place to look for save locations
is a good place to look for save locations
3 Likes
This is a great idea. Although quite maintenance-intensive, and not unique to games. Not all "normal" Linux applications respect the standard either.
Although the most annoying ones for me are those that just drop stuff into my home directory without even hiding it. Can probably be "solved" with some pre- post- scripts. Something like:
ln -s ~/.local/share/games/evilgame ~/evilgame; runevilgame.sh; rm ~/evilgame
Although the most annoying ones for me are those that just drop stuff into my home directory without even hiding it. Can probably be "solved" with some pre- post- scripts. Something like:
ln -s ~/.local/share/games/evilgame ~/evilgame; runevilgame.sh; rm ~/evilgame
0 Likes
Where is your online database? You should include it in your git:
https://raw.githubusercontent.com/Tux1c/Tux1c.github.io/master/projfiles/lgso/lgsolist.txt
You should potentially make it editable like a wiki, so people with no programming skills can just enter in a new game (pushes approved by mods of course, no funny code injection like "rm -rf /" =P)
https://raw.githubusercontent.com/Tux1c/Tux1c.github.io/master/projfiles/lgso/lgsolist.txt
You should potentially make it editable like a wiki, so people with no programming skills can just enter in a new game (pushes approved by mods of course, no funny code injection like "rm -rf /" =P)
1 Likes
Amazing initiative! I will try this out tonight.I am sure that we can fill the save game entries as a community.
0 Likes
steam should probably take the lead on this one and "recommend" to the developers to follow XDG standard
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
1 Likes
it is fully usable
Yeah, and there's really no error checking at all that the directory creation, copying, etc. was successful before it rm -rf $OLD_DIR.
I also don't like that it gets a random file from the internet, parses it and uses the entries in that file to just go about your home and copy and delete stuff there. No even asking for confirmation anywhere. It would quite easily be able to delete your whole home directory with a tiny mistake in that lgsolist.txt file...
1 Likes
Can I suggest tagging your releases?Yes thank you I will.
Braid is one that can be added easily, it's hiding in /.Braid , I don't have a github account.OK, will look into that.
ps the rest of the games I've got installed in steam right now all have their save files in the /.local/share folder, all over the share folder.
I wrote a small python script for myself a while back that places links for all my game saves in one folder. Another small bash script tars each of those and puts in a folder for backup.Thank you, will look into that.
I also wrote a scraper for scrapy that downloads information about save game locations from PC Gaming Wiki.
Here is save game location data for hundreds of games:
[https://gist.github.com/xitij2000/c5e66d5447dc7653a3ea](https://gist.github.com/xitij2000/c5e66d5447dc7653a3ea)
It lists over 400 entries, but many are blank.
[http://pcgamingwiki.com/wiki/Category:Linux](http://pcgamingwiki.com/wiki/Category:Linux)Thanks!
is a good place to look for save locations
Where is your online database? You should include it in your git:Originally, the idea is to open an issue with the tag "game save" with all of the info, but I'll look into that.
[https://raw.githubusercontent.com/Tux1c/Tux1c.github.io/master/projfiles/lgso/lgsolist.txt](https://raw.githubusercontent.com/Tux1c/Tux1c.github.io/master/projfiles/lgso/lgsolist.txt)
You should potentially make it editable like a wiki, so people with no programming skills can just enter in a new game (pushes approved by mods of course, no funny code injection like "rm -rf /" =P)
Will work on it, thanks.it is fully usableYeah, and there's really no error checking at all that the directory creation, copying, etc. was successful before it rm -rf $OLD_DIR.
I also don't like that it gets a random file from the internet, parses it and uses the entries in that file to just go about your home and copy and delete stuff there. No even asking for confirmation anywhere. It would quite easily be able to delete your whole home directory with a tiny mistake in that lgsolist.txt file...
0 Likes
Yes, good initiative (but wouldn't symlinking just leave equally annoying symlinks in the same locations?). In any case I would like to contribute, so I have compiled a list of all my offending Steam games...
But I am simply not going to create 50+ issues on github... Perhaps emailing or pm'ing a list in your desired format would be preferable to everyone involved? (or an editable wiki as suggested)
But I am simply not going to create 50+ issues on github... Perhaps emailing or pm'ing a list in your desired format would be preferable to everyone involved? (or an editable wiki as suggested)
0 Likes
Yes, good initiative (but wouldn't symlinking just leave equally annoying symlinks in the same locations?). In any case I would like to contribute, so I have compiled a list of all my offending Steam games...Thank you very much!
But I am simply not going to create 50+ issues on github... Perhaps emailing or pm'ing a list in your desired format would be preferable to everyone involved? (or an editable wiki as suggested)
For now, you can PM your list to me directly here on GOL, until I will resolve the wiki, working on other important suggestions :)
0 Likes
but wouldn't symlinking just leave equally annoying symlinks in the same locations?Yep. As I mentioned in the comments of the previous post, there are existing tools that can handle this cleanly ([rewritefs](http://github.com/sloonz/rewritefs)).
1 Likes
Looks like I missed the original topic.
Virtually all applications will adhere to the $HOME variable (for obvious reasons); you can just redeclare it for that application.
For example, by default mplayer puts a .mplayer in your home directory:
By prefixing the command with a variable, you can override that variable only for that application (or sub process). Eg:
Just for clarity, declaring the variable this way doesn't override your sessions variable:
The target directory tends to need to exist; though if you know you don't need the crap it created (like mplayer) you could always set the HOME variable to /dev/null or just use a non existent directory (although you will generate errors that way).
This has worked fine for me for a long time.
Virtually all applications will adhere to the $HOME variable (for obvious reasons); you can just redeclare it for that application.
For example, by default mplayer puts a .mplayer in your home directory:
% mplayer &>/dev/null
% find . -type d -name .mplayer
./.mplayer
By prefixing the command with a variable, you can override that variable only for that application (or sub process). Eg:
% rm -r .mplayer
% mkdir test
% HOME=/home/edgley/test mplayer &>/dev/null
% find . -type d -name .mplayer
./test/.mplayer
Just for clarity, declaring the variable this way doesn't override your sessions variable:
% HOME=/home/edgley/test /bin/true; echo $HOME
/home/edgley
The target directory tends to need to exist; though if you know you don't need the crap it created (like mplayer) you could always set the HOME variable to /dev/null or just use a non existent directory (although you will generate errors that way).
This has worked fine for me for a long time.
0 Likes
~$ grep Exec ~/.local/share/applications/steam.desktop
Exec=env HOME=/home/user/documents/games optirun steam %
0 Likes
<code>~$ grep Exec ~/.local/share/applications/steam.desktop
Exec=env HOME=/home/user/documents/games optirun steam %</code>
Only applies if you have / use the .desktop file:
% grep Exec /bin/steam || echo $?
1
0 Likes
This is not happening to me at all. What am I doing right?
0 Likes
This is not happening to me at all. What am I doing right?You mean you dont have random game folders all over the place? If so than you just havent installed a lot of games or at least not ones that make folders all over. Or you're not noticing it.
0 Likes
Looking at that readme... May I ask, where in the world you saw GNU\Linux written with backslash? :D
0 Likes
Looking at that readme... May I ask, where in the world you saw GNU\Linux written with backslash? :D
Tehehe, will fix
0 Likes