Garry's Mod

Garry's Mod

Ei tarpeeksi arvosteluja
Startup Millenium Achievement Easy way (Linux)
Tekijältä Krafting
Easy way to get the Startup Millenium Achievement on linux
   
Palkinto
Lisää suosikkeihin
Lisätty suosikkeihin
Poista suosikeista
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 kommenttia
swagalbanian 16.10.2022 klo 9.41 
most sane linux user