How can I find how often a program (like firefox, teeworlds, thunderbird, etc.) has launched? I'm a Java programmer, so solutions that must be implemented programmatically are acceptable, and preferred.
The only solution that I could come up with is to wrap the programs you're interested in. That of course is only feasible if the list of programs you want to observe is short enough.
Look after the command
Then link a log script to the original path like
Inside that wrapper do whatever you need to do and then