darktable icon indicating copy to clipboard operation
darktable copied to clipboard

dbus interface not working

Open dov opened this issue 1 year ago • 2 comments

Describe the bug

The manual states:

"It is possible to send a lua command to darktable via its DBus interface. The method org.darktable.service.Remote.Lua takes a single string parameter which is interpreted as a lua command. "

However I could not get it to work under Linux

Steps to reproduce

  1. Run darktable
  2. Open a Linux terminal
  3. Run the following command:
dbus-send --session --dest=org.darktable.service --type=method_call --print-reply /org/darktable/service org.darktable.service.Remote.Lua string:'print("Hello from Lua!")'

The result in the terminal:

Error org.freedesktop.DBus.Error.UnknownMethod: Object does not exist at path “/org/darktable/service”

Further, listing the dbus methods provided by the org.darktable.service, shows that there are no methods supported by the interface:

prompt> dbus-send --session --dest=org.darktable.service --type=method_call --print-reply --reply-timeout=2000 /org/darktable/service org.freedesktop.DBus.Introspectable.Introspect

   string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
                      "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<!-- GDBus 2.82.2 -->
<node>
</node>"

Expected behavior

Darktable should write the string "Hello from Lua!" to itsconsole

Logfile | Screenshot | Screencast

No response

Commit

No response

Where did you obtain darktable from?

distro packaging

darktable version

4.8.1

What OS are you using?

Linux

What is the version of your OS?

Fedora 41

Describe your system?

No response

Are you using OpenCL GPU in darktable?

None

If yes, what is the GPU card and driver?

No response

Please provide additional context if applicable. You can attach files too, but might need to rename to .txt or .zip

No response

dov avatar Nov 26 '24 21:11 dov

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Jan 26 '25 00:01 github-actions[bot]

I got it to work (the string gets printed to stdout) with

dbus-send --session --dest=org.darktable.service --print-reply --type=method_call --reply-timeou=2000 /darktable  org.darktable.service.Remote.Lua string:'print("Hello")'

ralfbrown avatar Jun 24 '25 21:06 ralfbrown

This issue has been marked as stale due to inactivity for the last 60 days. It will be automatically closed in 300 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

github-actions[bot] avatar Aug 24 '25 00:08 github-actions[bot]

No reply from OP in two months, and a working command string has been found.

@dov Feel free to reopen if the suggested solution does not work for you.

ralfbrown avatar Aug 24 '25 01:08 ralfbrown