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

See Also:


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:


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.