steam/launch
2018-12-21 16:52:33 +01:00

26 lines
1.4 KiB
Bash

#!/bin/bash
# Make errors visible upon `docker logs -f steam` command
exec 2>&1
service dnsmasq start
id user >/dev/null 2>&1
[ $? -eq 0 ] || useradd -s /bin/bash -d /home/user -u ${USER_ID:-1000} user
# NOTE: This workaround has been obsolete by "apt-get -y install libnm-glib4:i386 libnm-util2:i386".
# WORKAROUND to "steam launcher crashes on second run (debian sid in a chroot on debian wheezy) #3501"
# https://github.com/ValveSoftware/steam-for-linux/issues/3501
# rm -vf ~user/.local/share/Steam/config/config.vdf
# LD_PRELOAD=$LD_PRELOAD:$(for LIB in ${PRELOAD_LIBS:-libnvidia-glcore.so tls/libnvidia-tls.so libGLX_nvidia.so}; do find /hostlibs -type f -iregex ".*/${LIB}.*" -print0; done | tr '\0' ':' ; echo)
# su -l user -c "HOME=/home/user STEAM_RUNTIME=${STEAM_RUNTIME:-1} LD_PRELOAD=$LD_PRELOAD steam $@" |& grep -v 'wrong ELF class'
# LD_PRELOAD does not work well when you want to use Proton (modified version of Wine created by Steam)
# When running the games with Proton, they will fail with:
# "wine: Unhandled page fault on read access to 0x00000000 at address 0xf5c1c2b6 (thread 0009), starting debugger..."
# This is due to a mix of our LD_PRELOAD and Proton's. They add ".local/share/Steam/ubuntu12_{32,64}/gameoverlayrenderer.so".
LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/hostlibs/32:/hostlibs/64:"
su -l user -c "HOME=/home/user STEAM_RUNTIME=${STEAM_RUNTIME:-1} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} steam $@" |& grep -v 'wrong ELF class'