Author Topic: Editting with darktable.  (Read 1846 times)

Offline Bob M

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • The McElroys of Point Alexander
Editting with darktable.
« on: March 11, 2023, 05:23:28 PM »
I am running PM+ V6 build 6738 on Windows 10.

I am having a problem launching darktable from PM.  The problem I am having is that if I set up darktable as a secondary editor, it will only launch darktable if I set the properties of the dartable.exe file to run as an administrator.  Then I have to contend with a Windows popup asking “Do you want to allow this app from an unknown publisher to make changes to your device?” every time, which I find to be an unsatisfactory situation.

But the situation is actually a little deeper than that.  What I really want to do is have PM launch a batch file that calls darKtable so that I can add additional parameters to the call.  So that the batch file I call contains the single line:
"C:\Program Files\darktable\bin\darktable.exe" %1 --library :memory:
This works if darktable runs as administrator but not otherwise.

As an experiment, I can simplify the single line of the batch file to: "C:\Program Files\darktable\bin\darktable.exe"  Again, if launched by PM this works only if darktable runs as administrator.  But this where it gets interesting.  If instead of launching the batch file via PM, I simply double click it, it works whether darktable is running as administrator or not.

Is there anything about how PM launches an external editor that could account for this behaviour?  (I have been discussing this on the discuss.pixls.us website with no resolution.)  Do you have any suggestions as to how I can make this work?  ... any suggestions as to what may be going on.

As a p.s., I fully expect that calling an external editor via a batch file was not what you had in mind when you designed the software but I have doing this for several years to launch RawTherapee.  In that case the batch file contains the single line: "C:\Program Files\RawTherapee\5.9\rawtherapee.exe" -R %1 (I should put in a feature request for the ability to add additional parameters to the call to an external editor then I could skip the batch file stage.)

Offline ahoward

  • Camera Bits Staff
  • Hero Member
  • *****
  • Posts: 973
    • View Profile
Re: Editting with darktable.
« Reply #1 on: March 14, 2023, 11:52:22 AM »
When Photo Mechanic tries to launch an editor, it essentially simulates a drag and drop to that application's main window. This works well for most editing applications.  If we were to support passing paths to files to batch files, there would be a low limit to how many images could be opened at once due to long absolute file paths can get and the character-number limitations of a command-line.

Offline Bob M

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • The McElroys of Point Alexander
Re: Editting with darktable.
« Reply #2 on: March 14, 2023, 12:44:09 PM »
Thank you for explanation; I'll need to think about this some more.  But a couple of quick comments.

Given that that is how it works, I would guess that it would be difficult, if not impossible to implement passing additional parameters.  If that is the case then I can save my breath and not bother asking for a feature request.

More importantly, however, I don't now understand how it is that I can pass a file to RawTherapee by listing a batch file as the editor and yet I can't with Darktable.  And why does "run as administrator" allow it to work?

I'll go experiment with drag and dropand see what I learn.