[Gambas-devel] gb.desktop detect a running application

Benoît Minisini gambas at ...1...
Tue Aug 28 01:06:08 CEST 2012


Le 27/08/2012 17:51, Jussi Lahtinen a écrit :
>
>     Not at all.
>
>     A X11 desktop is a server whose applications do not necessarily come
>     from the same client.
>
>     So to detect that an application is already running is tricky: two
>     processes from the same executable on the same machine can run on two
>     different desktops, how could you know that?
>
>     I think that an X11 application can register some properties on the root
>     windows so that it knows that it already runs on that desktop. I think
>     it may be a standard, but I don't go deeper than that at the moment.
>
>     Otherwise, this split between the desktop (X11) and the systems that run
>     the application seems to be dumped with D-Bus and Wayland, so let's see!
>
>
>
> Maybe I missed something or I don't know enough about X11,
> but doesn't pgrep list all processes no matter who started them and from
> where?
>
> If I'm wrong, is there way I could demonstrate this problem?
>
>
> Jussi
>

pgrep will give you the processes on one X11 client, not all processes 
running on the X11 server, which may not be the same computer!

-- 
Benoît Minisini




More information about the Devel mailing list