diff options
author | V3n3RiX <venerix@rogentos.ro> | 2016-08-13 21:03:35 +0100 |
---|---|---|
committer | V3n3RiX <venerix@rogentos.ro> | 2016-08-13 21:03:35 +0100 |
commit | 2a97b3fa7a1c934e692eaa9bb66b8488a8f8cd90 (patch) | |
tree | bc353d5bb5aca5bd4d0f76b6b500c377ff4932d2 /app-emulation/steam/files | |
parent | 3a44fea93ba6633a0704a7c4681ae444bd567796 (diff) |
force steam to use native gcclibs, or in some situations, oss drivers will fail to load
Diffstat (limited to 'app-emulation/steam/files')
-rwxr-xr-x | app-emulation/steam/files/kogaion-steam | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/app-emulation/steam/files/kogaion-steam b/app-emulation/steam/files/kogaion-steam index aac32526..7da83bf3 100755 --- a/app-emulation/steam/files/kogaion-steam +++ b/app-emulation/steam/files/kogaion-steam @@ -1,12 +1,35 @@ #!/usr/bin/env bash -main () { - export LD_PRELOAD='/usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/32/libstdc++.so.6 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/32/libgcc_s.so.1 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/32/libstdc++.so.6' +# steam-runtime is a mess with old libraries from Ubuntu 12.04 +# so native drivers compiled on anything newer may not load +# if we remove some bundled libs, like gcclibs, native drivers +# will be able to load, because system libs will be used instead +# +# but we have to do this everytime when we launch steam, because +# steam-runtime is being fixed right away by steam client + + +remove_some_bundled_libs () { + # force steam to use some system libraries + find /home/$USER/.local/share/Steam -name 'libxcb*' -type f | grep -v installed | xargs rm -rf + find /home/$USER/.local/share/Steam -name 'libstdc++.so.6*' -type f | grep -v installed | xargs rm -rf + find /home/$USER/.local/share/Steam -name 'libgcc_s*' -type f | grep -v installed | xargs rm -rf +} + + +preload_some_system_libs () { + export LD_PRELOAD='/usr/lib32/gcc/x86_64-pc-linux-gnu/4.9.3/32/libstdc++.so.6 /usr/lib32/gcc/x86_64-pc-linux-gnu/4.9.3/32/libgcc_s.so.1 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1 /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/32/libstdc++.so.6' if [[ "$(lsmod|grep nvidia)" ]] ; then export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/lib32/opengl/nvidia/lib:/usr/lib64/opengl/nvidia/lib' export __GLVND_DISALLOW_PATCHING=1 fi +} + +launch_steam () { + remove_some_bundled_libs + preload_some_system_libs export DISPLAY=:0 steam } -main + +launch_steam |