Last active
October 1, 2023 10:01
-
-
Save sm9cc/addf48def898bb2be72cba36e16d6f5a to your computer and use it in GitHub Desktop.
CSGO Launch Workaround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# shellcheck disable=SC2086 | |
# Linux CSGO Launch Workaround | |
# Issue: https://github.com/ValveSoftware/csgo-osx-linux/issues/3097 | |
# Launcher paths | |
declare -a CSGO_LAUNCHER_PATHS=( | |
"${HOME}/.steam/steam/steamapps/common/Counter-Strike Global Offensive/csgo.sh" | |
"${HOME}/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo.sh" | |
"${HOME}/Games/steamapps/common/Counter-Strike Global Offensive/csgo.sh" | |
) | |
# Game arguments | |
declare -gr CSGO_ARGS="-steam -console -novid -nojoy -tickrate 128 +fps_max 0 -preload -maxdownloadfilesizemb 500 +engine_no_focus_sleep 0 +exec autoexec.cfg" | |
function launch_csgo() { | |
local launcher_found=false | |
for launcher_path in "${CSGO_LAUNCHER_PATHS[@]}"; do | |
if [[ -x "${launcher_path}" ]]; then | |
(STEAM_RUNTIME=1 i386 "${launcher_path}" ${CSGO_ARGS} &) | |
launcher_found=true | |
break | |
fi | |
done | |
if [[ ! ${launcher_found} ]]; then | |
echo "CSGO launcher not found in any of the specified paths." | |
exit 1 | |
fi | |
} | |
launch_csgo | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Quick Guide to playing CSGO and CS2 on Linux
Tutorial.webm
Adjust Compatibility Settings
Counter-Strike 2
, SelectProperties...
Compatibility
UncheckForce specific Steam Play compatibility tool
if enabled.Selecting Beta Branch
Betas
tab UnderBeta Participation
, choosecsgo_demo_viewer - 1.38.7.9
Setting Up the CSGO Launch Script
mkdir ~/Scripts
(Optional, use whatever directory you want)wget https://gist.githubusercontent.com/sm9cc/addf48def898bb2be72cba36e16d6f5a/raw/2755ca3893bee73aab11975d4cd4e50093e04e25/LaunchCSGO.sh -P ~/Scripts
(If necessary, replace with your own directory)chmod +x ~/Scripts/LaunchCSGO.sh
(If necessary, replace with your own directory)csgo.sh
path. To locate the path, follow these steps:Counter-Strike: 2
in the Steam library.Properties...
->Installed Files
->Browse...
Add the script to Steam:
Add a Game
and chooseAdd a Non-Steam Game...
LaunchCSGO.sh
in the Steam library, selectProperties...
Counter-Strike: Global Offensive
Playing CSGO / CS2
Counter-Strike: Global Offensive
in your Steam library as you always used to.CS2 will remain updated while you are on this branch, so you can play both games without having to switch.