What pts is a screen associated with
I have several screens running, and I would like to be able to tell what process is running in each one. I can run ps -aux and grep pts/# to find what processes are associated with a particular pts, but I have been unable to correlate this to a screen.
What I want to do is determine what commands to send to the screen based on what is running in it, and if nothing, just kill it. I have been reading for hours, but I can not find a way to figure out what pts a screen -dr nameHere would go to. Any help would be appreciated. Thanks! |
supposing you are asking about displays in X11, this should do the trick in most cases:
Code:
$ cat /proc/self/environ | grep -z '^DISPLAY=' ; echo |
I would rather look for parent and/or child processes (of screen)
|
All times are GMT -5. The time now is 06:02 PM. |