Bug 50

Summary: Prevent starting multiple instances
Product: Asunder Reporter: Andrew Smith <asmith22+bugs>
Component: AllAssignee: Andrew Smith <asmith22+bugs>
Status: CONFIRMED ---    
Severity: enhancement CC: andreas, asmith22+bugs
Priority: ---    
Version: 2.9.1   
Hardware: PC   
OS: Linux   

Description Andrew Smith 2017-10-29 11:35:02 EDT
A request came in saying that if Asunder is configured to start automatically when an audio CD is inserted - often multiple instances of asunder end up running and competing for access to the drive. This is more likely to happen when the user uses multiple desktops.

It probably makes sense to add a pid file to prevent Asunder from starting twice, though I have to figure out if that's enough or I should rather open a socket or something.
Comment 1 Andreas Rönnquist 2017-10-31 21:47:48 EDT
See GtkApplication here:

https://developer.gnome.org/gtk3/stable/gtk-migrating-unique-GtkApplication.html

for one way to do it.
(libunique is the old way, and should be avoided now).
Comment 2 Andrew Smith 2017-11-18 21:16:37 EST
Looks like GtkApplication is a GTK3 thing, and libunique is "strongly discouraged". I'd rather not risk using that.