reusing Konsole...

Kevin Puetz puetzk at iastate.edu
Thu May 23 02:30:21 BST 2002


dominique devriese wrote:

> Hi,
> 
> I'm rather new to kde development, and to this list, but I would like to
> bring up an issue here, since i've run into it on numerous occasions, and
> i don't understand why it isn't addressed:
> The problem is that although konsolePart seems to do his job of terminal
> emulation very well, it is hard to reuse it in another program.  It simply
> lacks the ability to run other programs than the shell.  It determines
> what is to be run by doing getenv("SHELL"), and passing arguments to the
> program is completely impossible.
> 
> This is a _very_ annoying miss, and it seems to be _very_ easy to fix.  I
> would post a patch myself, if i hadn't seen Kevin Puetz post his patch
> here some time ago
> (http://lists.kde.org/?l=kde-core-devel&m=101955160309112&w=2), and see it
> totally ignored.  Although i don't think his solution was the best, i do

Ignored mostly because Stepehen Binner (Beineri on IRC) told me OK, and then 
I though of an improvement to make before committing - and then didn't get 
it made :-)

> think this discussion needs to be held, and i don't see why this was
> ignored.

I'm still alive. I dropped that to finish up on finals/starting summer job, 
but it's not dropped for good. Stephan Binner has told me he's OK with the 
API, so when I get it done it'll go in. What's missing in that patch is 
that it needs to get a BrowserExtension in order to be secure (since it 
will be invoking programs, it needs ask the calling program whether or not 
the URL is 'trusted'). The URLArgs stuff put into kparts when KHTML had 
this problem of identifying trusted vs. unstrusted links seems good for 
this, but I haven't written it yet) I just need to hook it up and didn't 
get to it before the world got crazy :-)

> This Konsole feature would be useful _throughout_ kde, for showing console
> programs' output (e.g. kpackage and apt output (now it's shown in a

Heh, you nailed the example I wanted it for

> klineedit...), in kdevelop for showing compile output etc.), and for other

And that's a good one I hadn't thought of.

> stuff (e.g. i'm working on an interactive script widget, which would show
> the user a dcop shell of an application in some scripting language to the
> user (i have a javascript shell working, and i'm looking into python) (it
> would be something like kdelibs/interfaces/kscript, but it would get its
> code from the user instead of from a file))
> 
> Anyway, I'd like to hear your thoughts on this, specifically if there are
> any reasons not to include this feature into konsole...

If you would like to take my patch and add the needed URLArgs trustedness 
checking, feel free. The libkparts documentation in the reference section 
of developer.kde.org should tell you all you need, and I haven't worked out 
the details myself so I'm no more help than that :-). I will review/run it 
by Beineri and commit it if you write it, or you do so and commit it 
yourself if you have CVS write access. Or I'll probably get to it 
eventually, but if you want it now you know what to do :-).

> regards,
> domi






More information about the kde-core-devel mailing list