1

I'm trying to write a script that will create a split Konsole & run a bunch of commands, similar to tmuxinator. Konsole has arguments to run commands in tabs, but the only way I found to do it in splits is via qdbus. Per this post:

  1. qdbus org.kde.konsole-<pid> /konsole/MainWindow_1 org.kde.KMainWindow.activateAction split-view-left-right

  2. Find which session you want to run the command in

  3. qdbus org.kde.konsole-<pid> /Sessions/1 org.kde.konsole.Session.runCommand "echo"

In step 3, if I use Sessions/1 it runs the command in the 'first' split, as expected. However, I can't seem to figure out how to run a command in any of the others - any value other than '1' throws an error.

If anyone knows how to figure out the 'session' needed to run a command in any of the other (non-primary) splits, I'd greatly appreciate any pointers. Sadly I'm completely inexperienced with qdbus, and haven't turned up much after quite a bit of Googling.

J23
  • 461

0 Answers0