Re: Preventing Multiple instance of GTK application

2008-04-14 Thread Liam R E Quin
On Sat, 2008-04-12 at 15:16 +0100, Carlos Pereira wrote: You can write a .lock file everytime you start and then remove it when you close. To know if other instance is running, you just have to check if your .lock file exists. Please don't do this. If you must, take into account (1)

Re: Preventing Multiple instance of GTK application

2008-04-14 Thread Carlos Pereira
Liam R E Quin wrote: On Sat, 2008-04-12 at 15:16 +0100, Carlos Pereira wrote: I agree with everything you said. But in some cases lock files can be useful... this is the way vim checks if other instances of the same file are open, so the new instance is open in read-only mode... of course

Preventing Multiple instance of GTK application

2008-04-12 Thread Ajax John
Hi, I have written a gtk application on my Linux system. At present I can open or start multiple instances of my application. how can I modify my code such that at a time only one instance of my application is running on my system. Regards, Ajax. ___

Re: Preventing Multiple instance of GTK application

2008-04-12 Thread Carlos Pereira
Ajax John wrote: Hi, I have written a gtk application on my Linux system. At present I can open or start multiple instances of my application. how can I modify my code such that at a time only one instance of my application is running on my system. Regards, Ajax.

Re: Preventing Multiple instance of GTK application

2008-04-12 Thread Emmanuele Bassi
On Sat, 2008-04-12 at 16:46 +0530, Ajax John wrote: Hi, I have written a gtk application on my Linux system. At present I can open or start multiple instances of my application. how can I modify my code such that at a time only one instance of my application is running on my system. there

Re: Preventing Multiple instance of GTK application

2008-04-12 Thread Emmanuele Bassi
On Sat, 2008-04-12 at 17:14 +0200, G Hasse wrote: On Sat, Apr 12, 2008 at 03:36:47PM +0100, Emmanuele Bassi wrote: On Sat, 2008-04-12 at 16:46 +0530, Ajax John wrote: Hi, I have written a gtk application on my Linux system. At present I can open or start multiple instances of