steam-for-linux
steam-for-linux copied to clipboard
[Feature Request] Follow XDG Base Directory Specification
From a post on steam forums just linking it here.
Over in our group chat this has come up a few times already.
From a user who already has > 150 dot-files/directories in his home directory: Please, not another one! Since many years, there has been a standard for configuration/data/cache storage. Please follow it.
Simplest implementation (pseudo-code): if (set(XDG_DATA_HOME)) dir=$XDG_DATA_HOME/Valve/Steam else dir=$HOME/.local/share/Valve/Steam end if Store everything that is now in $HOME/.steam into that directory.
If you want to get fancy, try to implement the whole specification and split Steam's data between XDG_CONFIG_HOME ($HOME/.config per default), XDG_DATA_HOME and XDG_CACHE_HOME ($HOME/.cache per default).
http://steamcommunity.com/app/221410/discussions/0/882965239742479108/ Original post.
As far as I can see, ~/.steam is just a symlink to ~/.local/share/Steam
Imho there should be an option to disable the recreation of ~/.steam.
Actually ~/.Steam seems to be a real directory for me, but it contains mostly links. Should be in ~/.config/Steam (or whatever XDG is set to: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html ). There are also ~/.steampid and ~/.steampath links created all adding to home folder pollution.
It's a little sad this has received little attention. Steam still creates ~/.steampath, ~/.steampid and ~/.steam full of symlinks instead of fully using the xdg basedir spec.
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
Steam still not properly implementing XDG basespecs. thanks for more shit in my home folder.
For what it's worth, I dealt with this by setting $HOME in $XDG_RUNTIME_DIR. For anyone interested in the code, here's the link.
No updates yet? How hard is to follow the XDG basespecs?
As an addendum, steam seems to partially implement it for at least the overlay since vulkan came about. However, the spec specificially...specifies...that all the XDG dirs are variables, and Steam always creates $HOME/.local/share/vulkan/implicit_layer.d/steamoverlay_{i386,x86_64}.json even if XDG_DATA_HOME is set to another location (in this case $HOME/local/data).
+1
Since after all these years, Steam still creates no fewer than 4 garbage files in $HOME, a non-optimal workaround is to create a wrapper for steam:
#!/usr/bin/env sh
HOME=$HOME/local/data/games/steam_garbage # or wherever
exec /usr/bin/steam "$@"
This also has the beneficial side effect of fooling any rude game devs that follow Valve's example because they either don't know any better or just have a philosophical appreciation for slovenliness.
this sucks. please fix this, I dont want any of this garbage in my home folder
The steam Linux client is in dire need of many QOL fixes, this being a big one.
Hi, I'm sure another bump here won't do much but I'll go ahead and do it anyway and see if maybe I can poke some of my valve contacts to take a look at this. Please fix this, this is extremely low hanging fruit that leaves a bad taste in people's mouths when trying out steam on Linux. I use my laptop running Fedora for work, and it seriously does not help to have my home directory littered with various save files for games simply because you guys didn't take the time to do what literally almost everything else on Linux has been doing for years.
If these files are needed for older games. Why not just create them when you install the old game? Instead of putting broken symlinks in my home directory.
I have been waiting this feature for years. I'm really grateful for what steam has done for linux gaming and nobody can deny that. But steam you also have to look at what people are requesting out here and should try to follow the linux way instead of other way around. I'm hopeful that after this crisis is over you would give a serious consideration for following the standard XDG_BASE_DIRECTORY
Just piling on here to point out this still hasn't been changed. Emacs is something like 40 years old, and their next release will support XDG Base Directory configuration. Valve can do this.
come on....... follow specs
It's bad enough when a program create 1 dotfile/directory in $HOME, but three? And two of them are symlinks? Follow specs.
Yeah, its funny how valve created proton so that almost any windows game runs flawless in linux. But a simple script that creates some symlinks when you start the few old games that require it, is not on their todo list. You could even make it so that when the game launches the symlinks are created, and when you quit te game, the symlinks are removed...
This issue was opened in 2013. 7 years have passed and Steam is still cluttering our ~/home with .steam directory instead of following XDG standard. :(
I thank Valve for all the effort they put into making things work on Linux.
At least if they cannot follow the spec perfectly I would prefer them not put anything under $HOME, putting everything under $XDG_DATA_HOME/Steam would be a fine start.
Come on, this is an easy issue to fix. Can't take 7 years to address.
Bump. Joining people above
Bump. I hope Valve will solve this issue sooner.
Here's an improved version of @escondida's script:
#!/usr/bin/env sh
OLDHOME=$HOME
HOME=$XDG_DATA_HOME/Steam/fakehome # Replace this with where you want it to be
# Replaces every / of the first argument with \/
replace_slash() {
echo $1 | sed "s/\//\\\\\//g"
}
# Symlink a file to the fake home
link_dir() {
# Replace OLDHOME with HOME in the link name
link_name=$(echo $1 | sed "s/^$(replace_slash $OLDHOME)/$(replace_slash $HOME)/")
# Creates the link's parent directory and symlinks it
mkdir -p $(dirname $link_name)
[ ! -d $link_name ] && ln -s $1 $link_name
}
mkdir -p $HOME
link_dir $XDG_DATA_HOME # ~/.local/share
link_dir $XDG_CACHE_HOME # ~/.cache
link_dir $XDG_CONFIG_HOME # ~/.config
link_dir $OLDHOME/.icons # ~/.icons (lxappearance's mouse cursor theme)
# If .steam exists in ~/ and not in the fake home, move it to the fake home
[ -d $OLDHOME/.steam ] && [ ! -d $HOME/.steam ] && mv $OLDHOME/.steam $HOME/
exec /usr/bin/steam "$@"
I have only tested it in Arch Linux and with a few games (CS:GO and Factorio at the moment). They both work but factorio still uses ~/.factorio even if you change the launch options inside of steam to point $HOME to somewhere else.
Also, Valve please fix.
Day 2918
Yet another bump, a prayer at this shrine I doubt valve will hear any cries of mine Seven years I count, and eight to come A specification so simple, yet never done
bump
This issue was opened in 2013, and yet 8 years (3008 days) down the line it is still an issue.
bump
bump. the funniest thing among all this is that ~/.steampath doesn't even point to any valid path. it goes to ~/.steam/sdk32/steam which doesn't exist
Bump again.