2016-08-06 13:04:44 +00:00
|
|
|
#!/bin/bash
|
2016-08-05 21:02:44 +00:00
|
|
|
|
2016-08-06 13:04:44 +00:00
|
|
|
# Make errors visible upon `docker logs -f steam` command
|
2016-08-05 21:02:44 +00:00
|
|
|
exec 2>&1
|
|
|
|
|
2016-10-25 11:32:32 +00:00
|
|
|
service dnsmasq start
|
|
|
|
|
2018-12-21 15:52:33 +00:00
|
|
|
id user >/dev/null 2>&1
|
|
|
|
[ $? -eq 0 ] || useradd -s /bin/bash -d /home/user -u ${USER_ID:-1000} user
|
2016-08-05 21:02:44 +00:00
|
|
|
|
2018-12-21 15:52:33 +00:00
|
|
|
# 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
|
2016-08-06 13:04:44 +00:00
|
|
|
|
2018-12-21 15:52:33 +00:00
|
|
|
# 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'
|
2016-08-07 11:34:03 +00:00
|
|
|
|
2018-12-21 15:52:33 +00:00
|
|
|
# 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".
|
2016-08-06 16:20:55 +00:00
|
|
|
|
2018-12-21 15:52:33 +00:00
|
|
|
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'
|