gnome-games icon indicating copy to clipboard operation
gnome-games copied to clipboard

Track running Steam games

Open Kekun opened this issue 8 years ago • 1 comments

Steam games are currently the only games which never "stop" and hence which never come back to the collection when the game ends.

Tracking their state would allow to go back to the collection when the game ends and maybe more in the future.

Kekun avatar Mar 28 '16 07:03 Kekun

Steam run its games in a SteamChildMonit process. The /proc directory can be monitored to track the spawning processes. The process' name and parent can be retrieved from /proc/PID/stat and the its command line can be retrieved from /proc/PID/cmdline.

Solution 1:

  • a game's process is the one whose parent is named SteamChildMonit and whose command line contains comething like */SteamApps/common/GAME_NAME/*.
  • problem: the name of the game must match the directory name.

Solution 2:

  • a game's process is the one named SteamChildMonit and which appeared just after the command to run it started.

Kekun avatar Mar 28 '16 08:03 Kekun