Can't find the dbus API documentation of Terminator

Asked by /sshGuillaume Leclerc

Hello,

I would like to configure Terminator from another process. I was about to change the config file but, it requires to reload Terminator. I heard there was a dbus API but I was not able to find it.

Does anyone know where it is ?

Thank you,

Guillaume Leclerc

Question information

Language:
English Edit question
Status:
Answered
For:
Terminator Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Stephen Boddy (stephen-j-boddy) said :
#1

There is a basic dbus API in the gtk2 version. (the experimental gtk3 branch has dbus disabled, because the original implementation doesn't work, and the porter didn't have the time/knowledge to spend fixing it)

I don't think there is any official documentation for the API apart from the code.
The interface/commands are defined in terminatorlib/ipc.py and example usage can be seen in the main scripts in remotinator (simple wrapper for doing dbus calls) and terminator which uses dbus if enabled and an instance of terminator is already running with the DBus interface running.

It's quite basic, with a handful of commands from a quick glance at the source:
new_window(self, options=dbus.Dictionary())
new_tab(self, options=dbus.Dictionary())
terminal_hsplit(self, uuid=None)
terminal_vsplit(self, uuid=None)
get_terminals(self, uuid)
get_terminal_tab(self, uuid)
get_terminal_tab_title(self, uuid)

If you want to add further capabilities, you would need to extend the ipc.py file. You could either add an ability to change config to the DBus interface, or change the config file directly and add a DBus call to reload config.

Bear in mind that this only works for the first instance of Terminator that owns the DBus interface. If you for some reason use the -u flag to have multiple Terminator instances (I use it for grouping) then you cannot control those instances with the DBus interface.

Can you help with this problem?

Provide an answer of your own, or ask /sshGuillaume Leclerc for more information if necessary.

To post a message you must log in.