Garry's Mod

Garry's Mod

평점이 부족합니다.
Startup Millenium Achievement Easy way (Linux)
Krafting 님이 작성
Easy way to get the Startup Millenium Achievement on linux
   
어워드
즐겨찾기
즐겨찾기됨
즐겨찾기 해제
Setting up
First of all I recommend to launch the game as "Windowed" in display mode, and put the game as the smallest resolution possible, as seen on the picture:

I'll use the screen command so you might want to install it:

On Debian/Ubuntu (and other derivatives) :
sudo apt install screen
On Arch Linux (and other derivatives) :
sudo pacman -S screen
The Script
Now, you can close the game and go to your Desktop or other folder of your choice (doesn't matter) and create a bash file

Filename example:
gmod.bash

And then, insert this in the file:

launch=1 while [[ $launch -le 1000 ]]; do LD_LIBRARY_PATH=~/.steam/bin32/ screen -dmS hl2 bash ~/.steam/bin32/steam-runtime/run.sh /path/to/GarrysMod/hl2.sh echo "Launched " $launch " times" ((launch++)) sleep 9 pkill -f "hl2" done echo "All done"

You will need to change the path to your GarrysMod folder (where the executable is) (line 5)
To do so:
  • Right click on GMod in your steam Library
  • Properties
  • Local files
  • Browse Local files
And you will be inside the folder, you can copy the path and past it in the script.

Also, you might want to change the number of launch it will make.
To do so, just edit the second line and change '1000' to whatever number you want.

On SSD, the game might launch faster so you can adapt the speed at which the script close the game with the line "sleep 9" to whatever works for you.

Once everything is setup correctly, you can make the script executable and launch it, to do so, you can use the terminal:
chmod +x /path/to/gmod.bash && /path/to/gmod.bash

Or you can do it via your GUI by doing a Right click on the file, then Properties and in the permissions area, click the "Allow executing file as a program" (this process can vary from a Desktop Environement to another)
Profit
Now, profit
댓글 1
swagalbanian 2022년 10월 16일 오전 9시 41분 
most sane linux user