Prevent app to run twice.
- Date: Sun, 24 Apr 2016 11:31:44 +0200
- From: Stef Bon <stefbon@xxxxxxxxx>
- Subject: Prevent app to run twice.
I'm working on a backup application.
One of the things which should work is selecting a file which is part
of a backup,
when clicking on the context menu. I've
created a backup.desktop file, which appears in the context menu in Dolphin.
When clicking on the name for it ("Backup") the file should be
selected in the view
of the backup application.
Now when the backup application is not running, it should be started.
But when it's already running,
another instance should not be started, but the running instance
should get notified about the file selected.
How do I do that? Is it required to do this via dbus, or are there
other - simpler - ways.