ValveSoftware / steam-runtime

A runtime environment for Steam applications
Other
1.2k stars 86 forks source link

the steam runtime uses system /usr/share directories (x11/alsa...) and not its directories #74

Open sylware opened 7 years ago

sylware commented 7 years ago

On host system where the "share" directory is not in /usr/share (for instance /share or /usr/local/share), the steam runtime will look into /usr/shared and crash because non existant. The steam runtime should have its libs looking in its "share" steam runtime, or, avoid bundling "share" dirs and perform the necessary checks on host system /usr/share. I found out this thanks to some corner cases of the steam installer/client, but mainly with dota2 which crashes because the loaded steam runtime alsa lib cannot find /usr/share/alsa files, and it's the same for /usr/share/X11.

sylware commented 6 years ago

since we cannot override the filesystem location of local configuration files of the steam provided libalsas, libalsa must not be distributed in order to use the system local libalsa which will use the system local configuration. Or libalsa should be patched in order to allow configuration files location override with a environment variable.

smcv commented 5 years ago

On host system where the "share" directory is not in /usr/share (for instance /share or /usr/local/share)

What host system does that?

since we cannot override the filesystem location of local configuration files of the steam provided libalsas

The approach taken by some other libraries in the Steam Runtime (although not yet libasound2) is: if the environment variable STEAM_RUNTIME is set to an absolute path, look in $STEAM_RUNTIME/$arch/usr/share, where $arch is either amd64 or i386.

it's the same for /usr/share/X11

What effect does this have? Do Steam or games crash, or does some feature not work?

sylware commented 1 year ago

For X11, the problems are the format and location of the xkb layout definition files.

For alsa, easy: no sound or configuration mismatch.

The only right way to "fix" this seems to properly libdl the system libasound (remove the distribution of libasound).

Do the same with x11 client libs: do libdl xcb system libs, and libxkbcommon-x11 for a client xkb state machine (which will know where are the system xbk layout definition files). Same, it means removing the distribution of x11 client libs.

Praise wayland where the code is now static and there is no 493847328 libs, except for the xbk client side state-machine (libxkbcommon withouth the -x11 suffix).