0

I am running a bash script in a Konsole window, which opens a kitty console in a new window, and I want to run a command already in this new kitten window,

how can I do that?

#!/bin/bash

kitty <some command which i wanna run in kitty>
Dominique
  • 16,450
  • 15
  • 56
  • 112
Sanart0
  • 1
  • 1
  • The version of KDE would be helpful. Nonetheless, presuming it's not TDE (KDE3) which would use `dcop`, KDE4/Plasma can use `dbus`. Essentially you will use the inner-process communication language to launch konsole and then issue the command to run in that new session. In the old days that would be similar to `dcop KID SID sendSession yourcommand` where `KID` is the konsole ID and `SID` is the session ID. I don;t have a dbus example for you. – David C. Rankin Feb 14 '23 at 08:03
  • thanx for answer, qdbus works. – Sanart0 Feb 14 '23 at 09:05
  • You are welcome. Good luck with your konsole scripting. You can do a whole lot with `qdbus`. (and the older `dcop`) I have a script that runs that launches konsole and opens 9 konsole tabs and reestablishes `ssh` connections with 5 remote hosts, renaming the tabs with the remote hostnames and renaming and numbering the local tabs with the hostname plus `-1`, `2`, .... Originally just written as a time-saving effort, it exposed what all can be done in KDE with the inter-process communications (and that's a lot!) – David C. Rankin Feb 15 '23 at 03:32

1 Answers1

0

kitty command-you-want-to-run arguments-for-the-command...

See man kitty or kitty --help

for details

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 11 '23 at 00:27