[kde-linux] Executing bash scripts - redux

Robin Atwood robin at binro.org
Tue Aug 11 12:02:30 UTC 2009


About 18 months ago you guys helped me with an KDE3 app I developed where I 
needed to execute and capture the output of bash init scripts:
http://lists.kde.org/?l=kde-devel&m=120488838806612&w=2

Now I have updated it to KDE4 and currently have an embedded konsole part 
using code copied from the kateconsole plugin. What I have working is a shell 
made by "TerminalInterface::showShellInDir()" and I send it commands with the 
"sendInput()" method. This works but I don't want the user to have access to 
the shell prompt, what I need is a read-only shell that only displays the 
output of the commands. I tried 
"startProgram( "/bin/sh", script )" but then the widget just closes. Anybody 
know the trick to this? I know KDevelop has something like this but doesn't 
seem to use the TerminalInterface when I searched.

TIA
-Robin
-- 
----------------------------------------------------------------------
Robin Atwood.

"Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst"
         from "Mandalay" by Rudyard Kipling
----------------------------------------------------------------------











More information about the kde-linux mailing list