(New page: == Scripting Marble from the shell using D-BUS == As MarbleWidget and MarbleMap provide their full amount of methods as a D-BUS Interface you can easily script Marble from the command lin...) |
|||
| Line 1: | Line 1: | ||
== Scripting Marble from the shell using D-BUS == | == Scripting Marble from the shell using D-BUS == | ||
| − | + | MarbleWidget and MarbleMap provide their full amount of methods as a D-BUS Interface. Therefore you can easily create a shell-script to control Marble using the <b>qdbus</b> command line tool. | |
| + | |||
| + | So assuming that e.g. 25733 would be the PID of the running process you could call | ||
| + | |||
| + | <code> | ||
| + | qdbus org.kde.marble-25733 /MarbleWidget | ||
| + | </code> | ||
| + | |||
| + | to get a list of all the methods that MarbleWidget supports. | ||
| + | From this list you can choose the one that you'd like to call, e.g. | ||
| + | |||
| + | <code> | ||
| + | qdbus org.kde.marble-25733 /MarbleWidget org.kde.MarbleWidget.zoomIn | ||
| + | </code> | ||
| + | |||
| + | to zoom into the map. Note that for function calls you shouldn't pass the brackets "()". | ||
| + | |||
| + | As a convenient tool you can use <b>qdbusviewer</b> to get a graphical list of the interfaces and methods that get provided through D-BUS. | ||
| + | |||
| + | |||
| + | |||
| + | This article is a stub, please extend it. | ||
MarbleWidget and MarbleMap provide their full amount of methods as a D-BUS Interface. Therefore you can easily create a shell-script to control Marble using the qdbus command line tool.
So assuming that e.g. 25733 would be the PID of the running process you could call
qdbus org.kde.marble-25733 /MarbleWidget
to get a list of all the methods that MarbleWidget supports. From this list you can choose the one that you'd like to call, e.g.
qdbus org.kde.marble-25733 /MarbleWidget org.kde.MarbleWidget.zoomIn
to zoom into the map. Note that for function calls you shouldn't pass the brackets "()".
As a convenient tool you can use qdbusviewer to get a graphical list of the interfaces and methods that get provided through D-BUS.
This article is a stub, please extend it.