Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: An alias to ease screen captures of remote Macs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: An alias to ease screen captures of remote Macs
Authored by: adrianm on Dec 20, '07 08:29:50AM
To find the loginwindow for a particular user:

ps doesn't seem to let you choose 'processes without controlling terminal' and 'specific user' at the same time, but you can do this:


ps -ax -o user,command,pid | grep [l]oginwindow |  awk '$1=="adrian" {print $2}'
which would get the pid of the loginwindow owned by "adrian"

---
~/.sig: not found

[ Reply to This | # ]

10.5: An alias to ease screen captures of remote Macs
Authored by: adrianm on Dec 20, '07 08:32:03AM

'course, I could combine the grep into the awk expression, but then no-one else would have scope to improve it ;-)

---
~/.sig: not found



[ Reply to This | # ]