protonscr

Steam should use PRETTY_NAME from /etc/os-release when exists

steamclosed Steam client
ValveSoftware/steam-for-linux#5909 · opened 2018-11-18 by nanonyme · updated 2026-01-24 · 32 comments · github
Nnanonyme 2018-11-18 github

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.

Rreallygrimm 2019-03-14 github

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.

Ppchome 2019-05-26 github

/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)).

Nnanonyme 2019-05-26 github

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.

Nnanonyme 2019-05-26 github

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.

Ppchome 2019-05-26 github

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.

Nnanonyme 2019-05-26 github

Which variable? We are defining ID and VERSION_ID.

Nnanonyme 2019-05-26 github

How are you managing to get host os-version visible? It should not be possible.

Ppchome 2019-05-26 github

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.

Nnanonyme 2019-05-26 github

18.08 is roughly the same

Nnanonyme 2019-05-26 github

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.

Ppchome 2019-05-26 github

@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".

Nnanonyme 2019-05-26 github

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.

Nnanonyme 2019-05-26 github

Note. The "Running..." already is outputting the right thing. Our currently problem is that Steam survey has different data. Why? No one knows.

Ppchome 2019-05-26 github

"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").

Nnanonyme 2019-05-26 github

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

Ddavidak 2019-07-04 github

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!!!

Ppruebahola 2019-09-30 github

fix this problem is easy, not should take 1 year...

Bbaryluk 2019-10-28 github

How about just using lsb_release -ds ? (after testing for lsb_release using which lsb_release >/dev/null for example).

Ggasinvein 2019-10-28 github

@baryluk How about not using lsb_release at all? It's not a "standard" utility and it should not be expected to be available.

Bbaryluk 2019-10-28 github

@gasinvein I addressed this exact concern in my comment. It is short, read again.

Iitaranto 2020-02-01 github

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.

Ppruebahola 2020-03-30 github

please valve.... this issue not should take 2years...

Aa8underscore 2020-06-07 github

bump

Zzaggynl 2020-06-07 github

OpenSUSE Tumbleweed user reporting in.
/etc/os-release has PRETTY_NAME="openSUSE Tumbleweed"

Cchardinson 2021-12-25 github

News about this?

Nnyabinary 2023-11-03 github

Valve is taking their sweet time fixing this lol

TTiagoquix 2025-11-28 github

2025™

TTiagoquix 2025-11-28 github

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

Image Image Image Image Image Image
TTiagoquix 2025-11-28 github

And here's a screenshot from my main PC as well:

Image
TTiagoquix 2025-11-28 github

I also made a test by inserting fake OS info into /etc/os-release and it uses the PRETTY_NAME accordingly.

Image

That all was done without touching /etc/lsb-release. Here is the one from Ubuntu LTS:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04.3 LTS"

I then nuked ALL lsb-release/lsb_release files/directories/commands ENTIRELY from the VM on Ubuntu. Seems that Steam still shows info from /etc/os-release:

Image

So I think this issue has been fixed at some point in the past. @kisak-valve I believe this can be closed.

Kkisak-valve maintainer 2026-01-24 github

Closing per the last comment.