[Qt-interest] GUI Application List?
Andreas Pakulat
apaku at gmx.de
Tue Aug 4 01:27:47 CEST 2009
On 03.08.09 15:36:17, Ben Axelrod wrote:
> Does anyone know how to get the list of currently running GUI
> applications on Linux programmatically? (Note: I do not mean ps,
> although I may have to resort to that). I imagine there must be some
> way to poke the window manager for this info.
That would only give you the apps running in the current X11 session and
you'll probably have to do it for each WM.
> I am doing this through Qt, so if there is a cross-platform way to do
> this, that would be best.
No there's not.
> But I am focusing on Linux for now.
Well, I guess you could start by checking out the X11 API, there are
ways of iterating over all windows and also for checking the pid of the
corresponding process. (IIRC it was something like NET_WM_PID).
Anyway, all of that is better asked in a X11 mailinglist/forum.
Andreas
--
Your present plans will be successful.
More information about the Qt-interest-old
mailing list