I think I've found a good general way to determine if a certain
application is running.

pgrep software-center | xargs ps

This will output any instances of the Software Cent(er/re) currently
running.

  PID TTY      STAT   TIME COMMAND
12688 ?        Sl     0:06 /usr/bin/python /usr/bin/software-center

If the application is not running, this will be printed (I don't know
why):

  PID TTY          TIME CMD
12348 pts/0    00:00:00 bash
12493 pts/0    00:00:00 xargs
12494 pts/0    00:00:00 ps




_______________________________________________
Mailing list: https://launchpad.net/~ubuntu-tour
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~ubuntu-tour
More help   : https://help.launchpad.net/ListHelp

Reply via email to