Project

General

Profile

Bug #9563

check if darktable is already loaded

Added by Gerhard Hoogterp almost 7 years ago. Updated over 6 years ago.

Status:
Fixed
Priority:
Low
Category:
General
Target version:
-
Start date:
08/22/2013
Due date:
% Done:

100%

Estimated time:
Affected Version:
1.2.2
System:
unknown
bitness:
hardware architecture:
amd64/x86

Description

I would like darktable to check if it's already loaded.
If this is the case the image should be loaded in the running instance instead of trying to open a second darktable.

The reason it that I use darktable as raw developer from within an other program (digikam). Opening two darktable instances doesn't seem to work (I guess to prevent the database from corruption?) so I have to close darktable between photos. As darktable is a bit slow in loading this would be a welcome addition.

Associated revisions

Revision de6fd6a0 (diff)
Added by Tobias Ellinghaus over 6 years ago

Fix #9563 Use a lock file for the database

The old hack by using sqlite locking seems to no longer work with newer
sqlite releases. So let's change to lock files.

History

#1 Updated by Tobias Ellinghaus almost 7 years ago

  • % Done changed from 0 to 100
  • Status changed from New to Fixed

If darktable doesn't already do that you either have an old version or are missing dbus support (either at compile time or runtime).

#2 Updated by Gerhard Hoogterp almost 7 years ago

Happy that it's fixed, but imho, 1.22 isn't an "old" version.
As far as I can see it's the current release and it does give me an "[init] database is locked, probably another process is already using it" when starting a second darktable from the commandline. dbus is running..

Oh well, nighties are fun too.. thanks..

#3 Updated by Tobias Ellinghaus almost 7 years ago

That code should be in the latest stable release, too. When darktable is running try this from a shell:
qdbus org.darktable.service /darktable org.darktable.service.Remote.Quit
Instead of qdbus you can probably use something else, too.

#4 Updated by Tobias Ellinghaus almost 7 years ago

  • System set to unknown
  • Affected Version set to 1.2.2
  • % Done changed from 100 to 20
  • Assignee set to Tobias Ellinghaus
  • Status changed from Fixed to Incomplete
  • Category set to General
  • Tracker changed from Feature to Bug

#5 Updated by Gerhard Hoogterp over 6 years ago

qdbus org.darktable.service /darktable org.darktable.service.Remote.Quit
closes darktable, which is what it's supposed to do with Remote.Quite I guess..

Then I just got a new nighty (I switch to those after your update that they should do the trick). A opening darktable from the commandline while I already have one opened now gives me a second darktable window. Not completely what I was asking for, but a lot better than an error.

That is darktable 1.3+840~g4a0dfde for now, and for the statistics: "Linux mint 15 kde" as system.

#6 Updated by Tobias Ellinghaus over 6 years ago

Gerhard Hoogterp wrote:

qdbus org.darktable.service /darktable org.darktable.service.Remote.Quit
closes darktable, which is what it's supposed to do with Remote.Quite I guess..

That means that the dbus interface is working. Good.

Then I just got a new nighty (I switch to those after your update that they should do the trick). A opening darktable from the commandline while I already have one opened now gives me a second darktable window. Not completely what I was asking for, but a lot better than an error.

This is definitely not what it's supposed to do. Not at all. Are both instances using the same library file? My guess would be that sqlite for some reason fails to lock our test table so dt doesn't recognize that it's already running with this library in use. Hard to debug from here. I will see if I can come up with anything for you to check.

#7 Updated by Tobias Ellinghaus over 6 years ago

Any news on this? Anyone who can confirm the bug? My guess would be that sqlite isn't doing what we want it to do (we are kind of misusing it a bit I guess).

#8 Updated by Tobias Ellinghaus over 6 years ago

  • % Done changed from 20 to 100
  • Status changed from Incomplete to Fixed

Applied in changeset darktable|commit:de6fd6a0d6559ac74feb2ecd50809358482b6a5e.

Also available in: Atom PDF

Go to top