Re: How to detect already running application...



On Fri, 2005-03-18 at 09:00 -0500, John (J5) Palmieri wrote:
There are a number of hacks to do this.  gnome-volume-manager uses the
clipboard.  NetworkManager uses D-Bus.  I'm not sure what g-edit uses,
perhaps bonobo.  Future looking D-Bus is the way to go.  You basically
grab a name and when your app comes up a second time it will get an
error when trying to grab the name again.  It can then send messages to
the first instance to tell it what to do.

The canonical X way to ensure a singleton is to use a manager selection,
as defined in the ICCCM, section 2.8. 
http://tronche.com/gui/x/icccm/sec-2.html#s-2.8


Matthias




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]