Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.apps > #95

HOW2 find Desktop,VT corresponding to pid.

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
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 Sun, 24 Apr 2011 11:27:55 +0000 (UTC)
Organization A noiseless patient Spider
Lines 39
Message-ID <ip11fj$mqh$1@dont-email.me> (permalink)
Injection-Date Sun, 24 Apr 2011 11:27:55 +0000 (UTC)
Injection-Info mx03.eternal-september.org; posting-host="RWPy9AQCGh1mPgxUNZ1apA"; logging-data="23377"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1856W9ILBBsJqdi5V2lksomNH2t4twAziI="
X-Mailer Oberon Mail (ejz) on ETH Oberon (2.4.3) for Linux x86
Cancel-Lock sha1:Z7WiCWAzvQRP5uAvYHNVwV4kamA=
Xref x330-a1.tempe.blueboxinc.net comp.os.linux.development.apps:95

Cross-posted to 2 groups.

Show key headers only | View raw


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 | NextNext in thread | Find similar


Thread

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