Bug 50 - Prevent starting multiple instances
Summary: Prevent starting multiple instances
Status: CONFIRMED
Alias: None
Product: Asunder
Classification: Unclassified
Component: All (show other bugs)
Version: 2.9.1
Hardware: PC Linux
: enhancement
Assignee: Andrew Smith
URL:
Depends on:
Blocks:
 
Reported: 2017-10-29 11:35 EDT by Andrew Smith
Modified: 2017-11-18 21:16 EST (History)
2 users (show)

See Also:


Attachments

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.

Note You need to log in before you can comment on or make changes to this bug.