it'd be nice to e.g. figure out if firefox is running: pidof firefox However...how to do this from X when you don't have a terminal handy? You could use e.g. synapse...but then the shell just closes. you could do in synapse `xmessage $(pidof firefox)` but that's awful. Instead either a synapse handler or something should be written to solve this problem.