From 933f849e7fd7ed37cf407be3126a3bd01b3bd14f Mon Sep 17 00:00:00 2001 From: jenz Date: Mon, 13 Feb 2023 21:38:06 +0100 Subject: [PATCH] updated service, python script and README for flatpak steam and solving shared memory being full --- AutismBotIngame/README.md | 24 ++++++++++++++---------- AutismBotIngame/autismrunner@.service | 1 + 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/AutismBotIngame/README.md b/AutismBotIngame/README.md index a2aa2cfe..b7cb45e2 100644 --- a/AutismBotIngame/README.md +++ b/AutismBotIngame/README.md @@ -15,6 +15,12 @@ pip3 install pyvirtualdisplay pillow EasyProcess #needed for virtual display, create it inside a venv + 2023, instead of steam using flatpak steam + https://flatpak.org/setup/Debian + https://flathub.org/apps/details/com.valvesoftware.Steam + + #NOTICE: steam might not be able to launch in case of the tmpfs /dev/shm filesystem being full. it seems safe to just delete u1001-Shm_* files and u1002-Shm_ files. It should be fine because the files exists as long as at least one process has them open. So until steam is killed i assume. You dont need to be root for killing them, the user running the bot has permissions to rm the files + #intel specific: apt-get remove xserver-xorg-video-intel @@ -42,20 +48,20 @@ ## bashrc for x2go users in the users thats running a x2go session edit the .bashrc file and add the follwing (remember SDL_VIDEO_X11_VISUALID deppends on glxinfo from xterm terminal): + if [[ $DISPLAY ]]; then + echo 'SDL_VIDEO_X11_VISUALID: ' $SDL_VIDEO_X11_VISUALID + export SDL_VIDEO_X11_VISUALID=0x205 + echo 'SDL_VIDEO_X11_VISUALID: ' $SDL_VIDEO_X11_VISUALID + #use this one to launch steam minimized once + #flatpak run com.valvesoftware.Steam -no-browser +open steam://open/minigameslist + /home/$USER/.var/app/com.valvesoftware.Steam/data/Steam/steam.sh -applaunch 240 -textmode -novid -nosound -noipx -nojoy -noshaderapi +fi - if [[ $DISPLAY ]]; then - echo 'SDL_VIDEO_X11_VISUALID: ' $SDL_VIDEO_X11_VISUALID - export SDL_VIDEO_X11_VISUALID=0x205 - echo 'SDL_VIDEO_X11_VISUALID: ' $SDL_VIDEO_X11_VISUALID - steam -no-browser +open steam://open/minigameslist - fi #-no-browser +open steam://open/minigameslist reduces cpu being used by steam ##steam settings -> library -> low bandwith mode and low performance mode - #2023, try steam beta mode in steam settings to prevent Bus error (core dumped) "$STEAMROOT/$STEAMEXEPATH" "$@" - #X2GO_NXAGENT_DEFAULT_OPTIONS="-options nx/nx,sleep=0" /etc/x2go/x2goagent.options #keeps session as R instead of S which is needed for interaction with graphical components such as steam and CS:S @@ -74,5 +80,3 @@ #check if all libs are present with cd ~/.steam/steam/ubuntu12_32 LD_LIBRARY_PATH=. ldd vgui2_s.so - - diff --git a/AutismBotIngame/autismrunner@.service b/AutismBotIngame/autismrunner@.service index 11a47d2b..b405f6fe 100644 --- a/AutismBotIngame/autismrunner@.service +++ b/AutismBotIngame/autismrunner@.service @@ -6,6 +6,7 @@ After=network.target User=autismbot%i Group=autismbot%i WorkingDirectory=/home/autismbot%i/ze_runner +Environment=PYTHONUNBUFFERED=1 Environment=PATH=/home/autismbot%i/ze_runner/venv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games ExecStart=/home/autismbot%i/ze_runner/ingamefollowct.py Restart=always