Steam should use PRETTY_NAME from /etc/os-release when exists
See https://www.freedesktop.org/software/systemd/man/os-release.html /etc/os-release optionally contains PRETTY_NAME variable which contains preformatted OS name for GUI etc consumption. This should be read and used in Steam UI's where available. (instead of relying on /etc/*-release files) or generating the name oneself. Many if not all distros that use os-release are also filling in PRETTY_NAME.
I feel like this is even more important now that protondb requests the output of Steam's system info yet it doesn't even report the distro. Since Valve is pushing for Linux adoption, I can't imagine that implementing this wouldn't also help drill down on bug issues.
/etc/os-release
NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo/Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUPPORT_URL="https://www.gentoo.org/support/"
BUG_REPORT_URL="https://bugs.gentoo.org/"
${XDG_DATA_HOME}/Steam/steam.sh:106 (function detect_release())
function detect_release()
{
if [ -f /etc/lsb-release ]; then
(. /etc/lsb-release; echo $DISTRIB_RELEASE)
elif [ -f /etc/os-release ]; then
(. /etc/os-release; echo $VERSION_ID)
elif [ -f /etc/debian_version ]; then
cat /etc/debian_version
else
# Generic fallback
uname -r
fi
}
failed, no $VERSION_ID
Running Steam on gentoo 64-bit
Also, no lsb_release command available.
Anyway, after sys-apps/lsb-release installation I got /etc/lsb-release:
DISTRIB_ID="Gentoo"
:man_shrugging: , no $DISTRIB_RELEASE
P.S. /etc/gentoo-release (/etc/[distro]-release)
Gentoo Base System release 2.6
EDIT: Now (after lsb_release installation) the version information in Steam client displaying as "Gentoo Base System release 2.6" (64-bit) (was Linux (64-bit)).
flatpak run --command=cat com.valvesoftware.Steam /etc/os-release
We don't want host to be advertised. The host is meaningless for statistics, the important thing is the Flatpak runtime.
If we really need lsb_release, I can create one based on os-release in the wrapper but that's deprecated way to query stuff.
There is also /proc/version with pretty parsable format:
Linux version %kernel version% (%built by user%@%host%) (gcc version %bult using version% (%OS Name% %system gcc version%)) ...
But I'm fine with uname, the problem is that uname -r not even reached. The whole function fails instead, due to "undefined variable" error.
Which variable? We are defining ID and VERSION_ID.
How are you managing to get host os-version visible? It should not be possible.
Sorry, maybe I misled you, just reporting similar issue in Gentoo. Not flatpak.
Using PRETTY_NAME or whatever else, instead undefined $VERSION_ID and/or $DISTRIB_RELEASE should fix the issue. Or simply checking variables for existence should help too.
Also, sorry for my bad English.
This is the template for 19.08 https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/master/files/os-release/os-release.in
18.08 is roughly the same
DISTRIB_RELEASE is not part of spec for os-release. I'll tweak VERSION_ID a bit still, I think it might have been a mistake to include minor version number there.
@nanonyme
DISTRIB_RELEASE is not part of spec for os-release.
As you can see (provided detect_release() function code), $DISTRIB_RELEASE queried from /etc/lsb-release. (the code taken from steam.sh Steam client launcher script).
EDIT: Explanation: the next part of provided data
Running Steam on gentoo 64-bit
is the Steam client output in terminal emulator, where "Gentoo" (or so) missed between "gentoo" and "64-bit".
Yes, but we don't ship /etc/lsb-release at all so it doesn't matter. We only ship os-release and it's not part of the spec.
Note. The "Running..." already is outputting the right thing. Our currently problem is that Steam survey has different data. Why? No one knows.
"Running..." seems used only for for logging. At the early beginning, likely to detect system from the reported log files.
Steam "system info"(under the Help menu), so likely survey too, uses lsb_release command (and many others).
I saw error sh: lsb_release: command not found in output, directly after "system info" dialog window was shown. Also there was only "Linux" and many "Unknown" in the produced "system info" result, so uname -s and the "Unknown" string was used as placeholders.
So, the OS info collected in ${XDG_DATA_HOME}/Steam/steam.sh have nothing common with Steam survey. Commands for Steam survey likely called directly from the Steam client's code.
Better would be to use bundled lsb_release (or so), modified to satisfy both, the launcher script and the Steam survey (and "system info").
Sorry for comments I just deleted comments, I totally misread the repo. I'm still surprised if there's two completely different mechanisms for getting OS data. I'm just implementing a shim lsb_release, scratch build available at https://github.com/flathub/com.valvesoftware.Steam/pull/363
This would also fix the issue on NixOS (https://github.com/NixOS/nixpkgs/issues/63839)!
@kisak-valve why is the Steam Client not open source? Then we would probably already have a Pull request you only have to merge. This issue shouldn't take so long to fix!!!
fix this problem is easy, not should take 1 year...
How about just using lsb_release -ds ? (after testing for lsb_release using which lsb_release >/dev/null for example).
@baryluk How about not using lsb_release at all? It's not a "standard" utility and it should not be expected to be available.
@gasinvein I addressed this exact concern in my comment. It is short, read again.
Not every distro have the command lsb_release installed by default. Almost all modern distros use /etc/os-release (Debian, Ubuntu, openSUSE, Fedora, Arch, ...). Please use that instead.
please valve.... this issue not should take 2years...
bump
OpenSUSE Tumbleweed user reporting in. /etc/os-release has PRETTY_NAME="openSUSE Tumbleweed"
News about this?
Valve is taking their sweet time fixing this lol
2025™
Out of curiosity, I have done a test in 6 fresh installations of distributions using virtual machines.
The conclusion is that all outputs of Description in lsb_release -a match PRETTY_NAME from /etc/os-release, but I do not know if it's a coincidence.
In the Steam Client, Help -> System Report shows /etc/os-release being read, but for the purposes of the hardware survey, it seems Help -> System Information is used instead (according to https://github.com/NixOS/nixpkgs/pull/65822).
Here are my tests. Respectively: Arch Linux / Linux Mint (Ubuntu-based) / Pop OS Beta / Pop OS Stable / Ubuntu LTS / Zorin OS
And here's a screenshot from my main PC as well: