How to open a new Konsole window from CLI

690 Views Asked by At

Instead of running konsole &, which is slow, I'd like to open a new Konsole window using D-Bus, which is faster because it doesn't have to start a new Konsole process.

However, inspecting the interface with qdbusviewer, I can't find a method call that opens a new window.

1

There are 1 best solutions below

0
w00t On

It turns out you have to use actions. You can list them with

qdbus org.kde.konsole-`pidof -s konsole` /konsole/MainWindow_1 org.kde.KMainWindow.actions

and you can call the action new-window with

qdbus org.kde.konsole-`pidof -s konsole` /konsole/MainWindow_1 org.kde.KMainWindow.activateAction new-window

From qdbusviewer I also found org.freedesktop.Application.Activate which also opens a new window but I didn't manage to call it using qdbus.