Home » Questions » Computers [ Ask a new question ]

How do I log the programs I am running and when (on Ubuntu)?

How do I log the programs I am running and when (on Ubuntu)?

I would like an easy to read log of when a particular application was started. The log needs to include a timestamp and to record the actions I took, for example when I launched a browser or launched a game.

Asked by: Guest | Views: 426
Total answers/comments: 2
bert [Entry]

"Bash records history of all the commands you run, and you can have it record a timestamp as well - see http://larsmichelsen.com/open-source/bash-timestamp-in-bash-history/ for more.

But the bash history doesn't hang around forever, and it still only records things you run from the command line."
bert [Entry]

"One possibility would be to write a small bash script of the form

$ myLogging firefox

that would log the time that, in this example, firefox started and then simply start firefox.

This would require, however, that I do all my actions, such as starting an application, from the command line. Also, what if I wanted to start firefox with some arguments of its own?"