Identify my terminal session that started a particular process

Posted by Sam on Ask Ubuntu See other posts from Ask Ubuntu or by Sam
Published on 2011-10-28T15:36:24Z Indexed on 2011/11/25 18:04 UTC
Read the original article Hit count: 284

Filed under:

I'm using Gnome on Ubuntu. I often have 8-20 terminal sessions open and in some of them I have su'd to a different user. The specific problem that caused me to write this query happens when using git status, but this is more general issue. git status will tell me I have an uncontrolled file .foo.java.swp. This means that in one of my terminal sessions I have vi open on foo.java.

I need a script or tool that would tell me in which terminal session that vi is running. I can do a "ps aux | grep vi" to pretty easily find the pid of the particular vi. It would be nice if the tool highlighted the terminal on my task bar in some way.

Thanks.

-Sam

© Ask Ubuntu or respective owner

Related posts about gnome-terminal