Tarrot Jun 27, 2018 @ 5:04am
Please require developers to include a steam_appid.txt.
I'd like you to require developers to include a steam_appid.txt in their game installation directory. I've written a nifty bash script to randomly select and launch one of my many installed Steam games, but it only works if the developer has included that file. I can go through and manually fix it, of course, but this would be a large and daunting task. Being that a steam_appid.txt is 6 bytes in size, I don't think this is asking too much. :fishbun:
< >
Showing 1-6 of 6 comments
LowJack_VA1 Jun 27, 2018 @ 5:12am 
It is asking too much. You can easily script out creating that file yourself. Every single publisher shouldn't have to do that for you.
Satoru Jun 27, 2018 @ 6:28am 
Your suggestion isn't really necessary. You can get all the appids of installed games by parsing the "steamapps" folder for all the appmanifest_<APPID>.acf files

If you're just trying to launch a random game you can just use the steam protocol to launch via the appid directly

basically a really really sloppy way is

1) @array="ls | grep appmanifest" this greps and loads all appmanifest_<appid>.acf files in an array (syntax is probably wrong I'm doing this on my phone but you get the idea)
2) Pick one randomly
3) regex the <appid> (you could probably combine the regex part in step 1 too)
4) launch the game using "steam://run/<appid>"


You already have available all the necessary information to use with your bash script
Last edited by Satoru; Jun 27, 2018 @ 6:37am
MrL0G1C Jun 27, 2018 @ 11:21am 
Ha ha, you want every publisher to do a certain thing just so your script works!!
Learn better scripting. :steamfacepalm:
Tarrot Jul 3, 2018 @ 10:07am 
I blew right past the appmanifest_*.acf files when clicking through to the common subfolder without noticing all the appid's there. I only noticed that there was no way that I could see to get a game's appid only from its install folder, unless that steamappid.txt was present. Thanks for the info and for keeping the conversation civil. :spacebooze:
Last edited by Tarrot; Jul 3, 2018 @ 10:09am
Tarrot Jul 17, 2018 @ 6:56am 
I fixed it, parsing the appid from the .acf files. Here is the code, for the curious:

#!/bin/bash

cd ~/.steam/steamapps
ls |sort -R |tail -1 |while read file; do
file=${file//[!0-9]/}
steam -gameidlaunch $file
done

Just open a text editor, enter the above code and save it as a .sh somewhere. Then, just make it executable (chmod +x filename.sh). Run it by clicking on it in a file browser, or by opening a terminal at its location and typing: ./filename.sh :happyleon:
Tarrot Jul 17, 2018 @ 7:23am 
If you want to be able to do this easily from your application launcher menu, you can create a desktop file. Here's the one I made:

[Desktop Entry]
Categories=Game;
Comment=Play some game on Steam
Exec=~/.local/share/applications/random.sh
Icon=steam
Name=Launch a random Steam game
StartupNotify=true
Terminal=false
Type=Application

Open a text editor, put that stuff in there and save as a .desktop in ~/.local/share/applications. Then, make it executable, either by right-clicking and selecting "Properties" in a file manager, or by opening a terminal in that directory and typing "chmod +x filename.desktop" :spacebooze:
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Jun 27, 2018 @ 5:04am
Posts: 6