Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.development.apps > #95
| From | no.top.post@gmail.com |
|---|---|
| Newsgroups | alt.os.linux.mandrake, comp.os.linux.development.apps |
| Subject | HOW2 find Desktop,VT corresponding to pid. |
| Date | 2011-04-24 11:27 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <ip11fj$mqh$1@dont-email.me> (permalink) |
Cross-posted to 2 groups.
I need to have a table: mapping the (Desktop,VT): pair having mc open, to it's path. So: 4,3 /mnt/p6/Debug/dog means that whe 'data arrives for /mnt/p6/Debug/dog', I need to switch to Desktop:4, VT:3. Previously I wrote a utility which gets all mc paths from `lsof | grep mc`, with the corresponding pid/S; and 'examines the graph drawn' by `pstree -p`; and from the position of the 'mc branch' in `pstree -p` could determine the D,V: pair, having the pid corresponding to the path. So via 2 stages, I could map the path to the D,V. That worked OK for Mandrake 9. For FC1 it failed, because the 'picture' of `pstree -p`used some other char than "-" to draw "-", and different code would have been needed. Now I've got Slak13, and the `pstree -p`representation is completely different, so that I can't see the D,V corresponding to the pid [so far]. So I couldn't program the system to 'see it'. OTOH, the system must know 'which file is open in any D,V'. I've browsed around /proc, but I can't see how to solve this. Since D & V are 'attributes' of the window manager, probably this is a wm problem. The method that I eventually got working nicely, was under KDE3, but now I want to use Xfce. == TIA. -> try: lsof | grep <knownPath> --> lsof | cut -c11-14 == shows the list of pid for <knownPath> -> lsof | grep <thatSame pid>
Back to comp.os.linux.development.apps | Previous | Next — Next in thread | Find similar
HOW2 find Desktop,VT corresponding to pid. no.top.post@gmail.com - 2011-04-24 11:27 +0000 Re: HOW2 find Desktop,VT corresponding to pid. James Waldby <not@valid.invalid> - 2011-04-28 14:06 +0000
csiph-web