Bug#916303: steam: installs to ~/.steam, which is not as intended by upstream

Simon McVittie smcv at debian.org
Fri Jan 18 11:25:12 GMT 2019


[Redirecting to #916303 for this particular reply since it mostly isn't
about #919467]

On Fri, 18 Jan 2019 at 00:31:33 -0500, Michael Gilbert wrote:
> I'm don't yet see what use case would require more than one steam
> installations per user

I agree that this on its own wouldn't be a good justification for
~/.steam, but I don't think it's the main reason.

> so I don't see the value of the links Valve dumps in ~/.steam.

My understanding is that they are mostly a "filesystem API" that the
Steamworks API (the part of Steam that gets copied into individual games)
uses to locate the Steam installation. ~/.steam/steam.pipe is also
a filesystem API, used for IPC to the Steam client.

By "filesystem API" I mean the equivalent of /etc/debian_version,
/usr/sbin/sendmail and ~/public_html: a well-known path that
independently-maintained code can rely on.

Please see my previous messages to #916303 for more details.

Looking at bin_steam.sh again, I think another reason for ~/.steam might
be that Valve had originally installed in ~/Steam ("CLASSICSTEAMDIR"
in their script), and later changed it to $XDG_DATA_HOME/Steam
("DEFAULTSTEAMDIR") to avoid cluttering the home directory with a
hard-coded user-visible directory, so their script needs to be able to
cope with either.

> The two viable solutions I see are.  One, use a debian specific dir in
> ~/.steam.  Two, Valve moves completely to XDG_DATA_HOME.

The first would at least avoid the collision where ~/.steam/steam is
trying to be two different things, so that seems like an improvement,
although it still needs some care to avoid using a directory that
Valve later use for some other purpose. This would be a straightforward
change after fixing #919467: the "# This is a new installation" code path
currently says STEAMDIR="$HOME/.steam", and the patch on #916303 changes
it to STEAMDIR="$XDG_DATA_HOME/.steam", but instead we could change it
to STEAMDIR="$HOME/.steam/debian-installation-path" or something like
that. Did you have a path in mind?

I'll ask Valve developers to confirm whether the second is feasible.
That seems like the ideal solution, but I suspect it isn't going to be
possible, because of the pre-existing use of ~/.steam as a filesystem
API/rendezvous point.

> the user can seem to break their installation by changing the value of
> XDG_DATA_HOME

You mean like this?

* I have XDG_DATA_HOME = ~/.local/share
* Steam is in ~/.local/share/Steam
* I rename ~/.local/share to ~/Data and reset XDG_DATA_HOME accordingly
* I try to run Steam
* ~/.steam/steam and ~/.steam/root are still dangling symlinks to
  ~/.local/share/Steam
* Steam is confused

That's a valid concern. We could address it by making sure we try the
default location (taking into account any changes to XDG_DATA_HOME, if we
ever switch to that) if the symlink exists but is dangling (-L && ! -e).

I've pushed a change that deletes ~/.steam/steam and ~/.steam/root if
they are dangling symlinks, so that they can be recreated by
$STEAMDIR/steam.sh to point to $STEAMDIR.

    smcv



More information about the Pkg-games-devel mailing list