简体   繁体   中英

How to open a new Konsole window from CLI

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM