Open In Photoshop Plugin for Darktable - Available Now

Thanks for this. I have no LUA experience but I have at least a rudimentary understanding of scripting and program language. I would like to use this for Pixelmator and it seems that should be simple enough. I edited the not_installed subroutine tp replace “photoshop” with “Pixelmator” but it still says required software not found when I try to launch. Where else do I need to make changes?

Update: I got rid of the errors, so the module runs and export runs, but the application never launches. I would appreciate any assistance

Any plans for Affinity Photo too? I also wouldn’t mind Krita for people who choose Krita over GIMP because ND editing. There’s also Photoflow.

Frank, technically you did not need to make any changes to the code. Just under lua preferences (found as a tab under settings inside DT) point to the pixlemator binary instead of photoshop binary. I would suggest you try that before editing the script. Let me know how it goes.

Also, what operating system are you on?

Not at this time. As I just mention in my reply to Frank this script can be used with programs besides PS as is. Just point to whatever program you want to use it with via the executable path chooser found for this script under lua options in dt’s settings dialog box.

2 Likes

Thanks Kevin.

I tried using the unmodified script. No errors and dialog comes up “Opening in Photoshop” but the application never launches. If I had to guess I would say some permissions are preventing the script from launching another application.

MacOS 10.13.6
DT 2.6.0

Ok, please run dt in debug mode by launching it via:

Darktable -d lua

Then try again with the script. I’m not certain where the debit lognfiles are stored on Mac (it’s document on darktables site. If I get a chance I’ll update this post with the location) open the log file and post the info here please (or message it to me directly)

Thanks

Easier said than done in the Mac world but I got it to launch. Seems the script cannot handle the .app bundles in the mac world, and does not provide a way to navigate to the unix executable. Here are the lines from the terminal

25.777570 LUA Opening in Photoshop
25.778387 LUA OpenInPS run_cmd = “/Applications/Photo tools/Pixelmator.app” /Users/frank/Pictures/Darktable library/2019/March 2019/_FEW0447.ORF
sh: /Applications/Photo tools/Pixelmator.app: is a directory

Might work if I modify the run cmd line to “open -a /path/program”? Nope, not as simple as I thought. Over my head!

This isn’t a limitation of the script, but rather a limitation of macOS. You can find the path by right clicking on the app and selecting Show Package Contents.

While true, I have no way to enter that path in the GUI

Frank Walsh

While slightly error prone, you could type it in.

Otherwise use the cd command in the terminal to navigate to inside the app bundle, then use the pwd command to print the full path, copy and paste it to the dt plugin.

This plugin doesn’t appear to give me an option to type in the path or paste it. It brings up a navigation window. I’ll play around with some options

Frank Walsh

This comment was made on another thread about a similar or the same problem:

1 Like

To all the MaxOS users here. It would be very welcome if someone could find a solution to start .app bundles via the command line.

Update:
I searched myself and found this:

open ./AppName.app --args -AppCommandLineArg

Perhaps a MacOS user can test it.

Unfortunately (as far as my experience shows) that won’t work, Tobias. You need the entire directory path in the command line. For example:

/Applications/darktable.app/Contents/MacOS/darktable --args

Agreed. The Open command will not work with arguments for the executable binary contained in the bundle (in my experience). You have to enter the full path. I will try the “favorites” trick above when I get some time. A bit of a kludge but if it works that will be good to know

Having trouble getting this working…It seems the Lua implementation has changed a bit since this was released.

I put the file in the Lua/contrib folder, and i can see it in the start stop scripts folder in the lua panel in the bottom left. When I try to start it, I get ‘failed to load’.

Any help would be appreciated

Just stumbled into this problem as well. Seems one of the imports was removed in a newer version of the script manager. I’ve put up a pull request to resolve this but for now you’ll want to remove the line that says ‘require “official/yield”’ in the LUA file.

Pull request is here Remove deprecated import by robotal · Pull Request #2 · BzKevin/OpenInPS-Darktable-PlugIn · GitHub

Hi, I installed the plugin.
It does not open photoshop.
If i debug with : /Applications/darktable.app/Contents/MacOS/darktable -d lua
I see the following error message
2,3050 LUA OpenInPS - Executable Path Preference: /Applications/Adobe Photoshop 2023/Adobe Photoshop 2023.app
3,5792 LUA ERROR Photoshop not found

In case somebody is still fighting with this: I succeeded by manually changing the path to the Photoshop executable in /.config/darktable/darktable.rc, like

lua/executable_paths/photoshop=/Applications/Adobe Photoshop 2024/Adobe Photoshop 2024.app/Contents/MacOS/Adobe Photoshop 2024

In addition, in OpenInPS.lua I removed (commented by “–”) the two original external program invocations, like

–resp = dsys.external_command(run_cmd)

and replaced them by the following:

run_cmd = "open -a "..run_cmd  
os.execute(run_cmd)		

This is for macOS only, don’t do it on Windows …

I might do a PR later, but there is another PR pending for nearly two years now, so not sure if the original author is still active.