GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Oct 25, 2014 8:46 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Preventing multiple instances of a app
PostPosted: Sun Sep 29, 2013 1:55 am 
Offline
Familiar Face

Joined: Thu Nov 22, 2012 3:46 pm
Posts: 22
I have written a GTK application in C on my Linux system. At present, I can open or start multiple instances of my application. How can I modify the code so that only one instance at a maximum can run at a time?
I not use GtkApplication class.


Top
 Profile  
 
 Post subject: Re: Preventing multiple instances of a app
PostPosted: Wed Oct 02, 2013 3:40 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 764
Location: UK
Hello,

You can modify your application so that there is only one running at a time. You do not say which version of GTK+ you are using :-

For GTK+ v2.xx you will need to use LibUnique https://wiki.gnome.org/LibUnique

For GTK+ v3.xx you can use GtkApplication https://developer.gnome.org/gtk3/stable/GtkApplication.html with migration advise and more information at https://developer.gnome.org/gtk3/stable/gtk-migrating-unique-GtkApplication.html

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group