[Konsole-devel] Controlling konsole with dbus

Andreas 'ads' Scherbaum adsmail at wars-nicht.de
Fri Feb 12 18:39:34 UTC 2010


Hi,

On Sun, 7 Feb 2010 12:42:11 +0000 Robert Knight wrote:

> If your script is running from a terminal then running konsole will
> start a new process with one window
> which can be accessed via org.kde.konsole-$PROCESS_ID.

I switched from shell to perl because it's easier to handle things like
creating new processes.

This is a bit curious: i try to fork() and exec() /usr/bin/konsole in
my script. The parent receives the child pid, the child exec()s
konsole, but the new konsole has another pid, slightly higher than the
child pid. Usually +1, but sometimes +2 or +3.

Is konsole forking again? If yes: why? And how can i stop this
behaviour?

Robert: so basically your idea with org.kde.konsole-$PROCESS_ID is
fine, if i would know the correct process id.



> > How can i find the newly created tabs and execute a specific
> > command in it?
> 
> The newSession DBus call returns the ID of the tab/session.  You can
> then execute commands
> using the sendText method of that session.

This works, as long as i know the pid. See above.



> I'm afraid I don't know of any good documentation to recommend
> on how to do specific things with DBus in KDE.

This matches another experience i had today:

"This document provides a tutorial on accessing a DBus service using
the Perl Net::DBus application bindings. Sadly it is not yet written."

;-)


-- 
				Andreas 'ads' Scherbaum
Failure is not an option. It comes bundled with your Microsoft product.
 (Ferenc Mantfeld)



More information about the konsole-devel mailing list