Openscad: DBus not accepting actions on startup

Created on 6 Jul 2020  路  5Comments  路  Source: openscad/openscad

I would like to control OpenSCAD from emacs via DBus. I have enabled DBus in Preferences-> Features -> input-driver-dbus and Axes -> DBus. It appears that DBus is not being initialized correctly. (To me, it seems as though it is only able to execute commands after the user has manually invoked some actions from the menu.)

To start with, I have built the (helpful) openscad-dbus-reference app by @MichaelPFrey

To reproduce:

  • Start openscad (with a scad file, doesn't seem to matter which)
  • Start the dbus reference app (it indicates connected status, good)
  • Press "get actions" to populate the list of all available actions (works, good)
  • Select an action, such as "viewActionViewAll" or "viewActionHideConsole" and press "send action" to send it

Actual result:

  • Nothing happens

Expected result:

  • The action should be executed

Now, manually choose some items from the menu (in my case it was View -> Zoom in, Preferences, etc). After enough tinkering, you can try sending the action from the reference app and the action succeeds. From then on, the DBus interface seems to be working (both from the reference app, and from my test functions within emacs).

I am on Ubuntu 20.04 using openscad-nightly 2020.06.14.nightly (git be16bd8) but get the same behaviour with release 2019.05


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Input Devices Bug

Most helpful comment

Once the DBus interface is up and running, it's really handy.

I've put together a simple emacs package utilizing it, at https://github.com/Lenbok/scad-dbus

All 5 comments

Is the application having input focus? For normal input devices, events are only forwarded to the active window. This may need some special handling for DBus.

Once DBus is up and running, I'm happily sending commands from my emacs (or the reference app), which are the ones that have focus, so that is probably not the issue.

Strange, I'm not aware of other special cases for the action list vs. other calls, but I guess that's what happens with bugs sometimes :wink:.

It's not just the action list (those are just the ones I've been trying out first). The other commands for zooming, etc in the reference app also do nothing.

Once the DBus interface is up and running, it's really handy.

I've put together a simple emacs package utilizing it, at https://github.com/Lenbok/scad-dbus

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dorkmo picture dorkmo  路  11Comments

dorkmo picture dorkmo  路  12Comments

samyk picture samyk  路  10Comments

yeus picture yeus  路  14Comments

vovcacik picture vovcacik  路  7Comments