[Konsole-devel] Konsole dbus feedSession/sendSession

Arno Töll lists at toell.net
Mon May 11 16:51:54 UTC 2009

Pantelis Koukousoulas wrote:
> Will it be possible to send keystrokes to a konsole tab via dbus?
> (like we could do in old dcop days via feedSession/sendSession).

Unless the current implementation changes, wich I don't suppose to, you
will be able doing this by using the new session handler [1].

For example you may use:

arno at snowball:~$ qdbus org.kde.konsole /Konsole

arno at snowball:~$ qdbus org.kde.konsole /Sessions/2 sendText "ls -l"

You, as every other user of DBus may use the introspect() method to get
a list of supported signatures and paths for dbus-accessible programs.
To get a graphical browser, use qdbusviewer.

> My use-case is for sending input from an external program to console
> vim running inside konsole. This is currently the only way to implement
> asynchronous communication of vim with external programs.

You may be wrong. See [2] for a scary example of what is possible to
feed vi(m). In short:

echo -e "Hello\nWorld" | vi -

[2] http://www.de.ioccc.org/years.html#2004 (look for schnitzi)

More information about the konsole-devel mailing list