Application of the Month: Konsole

As part of the March 2004 issue
of the "Application of the month" series on, Andreas C. Diekmann
has interviewed Lars Doelle, author of
Konsole. Konsole is what is known as an X terminal emulator and gives you the equivalent of an old-fashioned text screen on your desktop, but one which can
easily share the screen with your graphical applications. The Dutch KDE website is
offering an English translation of the interview
and the overview of this issue. Many thanks to Tom Verbreyt and Wilbert Berendsen for their help in translating this issue.

Dot Categories: 


by Wes Hardaker (not verified)

You can do this with tcsh, though I admittedly haven't actually tried it, but I'm sure you can. See tcsh's special variables and a special alias (all of which I forget the name of since I haven't used them recently) to execute a command before each prompt. I set the title of my konsole screens like this, which you could take a mess with.

setenv XTITLE "!*";cwdcmd; dcop `echo $KONSOLE_DCOP_SESSION | sed "s/DCOPRef.//;s/,.*//"` `echo $KONSOLE_DCOP_SESSION | sed "s/.*,//;s/)//"` renameSession "$XTITLE"

I realize I haven't been a great help, but I can only offer a starting suggestion since I don't have any more time.

by Aurélien Gâteau (not verified)

This is not really what you're looking for, but you might find it useful:

by hysterion (not verified)

This depends on which shell you use: you can do it in tcsh or zsh using the 'postcmd' or 'preexec' hooks [1, 2]. Unfortunately, as others have said, you can't do it in standard bash because it lacks such a hook [3]. (There is, however, a patch to add it [4, 5].)


by Allan Sandfeld (not verified)

I am wondering how make it stop! I does it all the time for me, which is embarresing when I am logging onto a SQL-server using a clear-text password after --password.

by Stephen (not verified)

I added this to my .cshrc

if ("$TERM" == "xterm") then
alias precmd 'echo -n "\033]0;`history | tail -n 1 | cut -f 3-`\007"'

by ac (not verified)

So... is anyone convinced that Konsole needs to put back in the Kicker default yet?

I know I am!

by David Johnson (not verified)

I second the motion. Konsole needs to remain on Kicker! If some particular distro can't stand this, then they can trivially change it for themselves. Konsole is there for a purpose. I am getting sick of this attitude that usability means dumbing down the interface.

by Aaron J. Seigo (not verified)

> I am getting sick of this attitude that usability
> means dumbing down the interface.

good thing that wasn't why it was done, then =)

by David Johnson (not verified)

Perhaps "dumbing down" was the wrong phrase. Maybe I'm just an old fart out of touch with the times, but for me Konsole is one of the most frequently used applications in KDE. It's the primary starting point for most of my tasks.

I realize that there is very limited room on Kicker, and that stuff needs to be prioritized. The question is whether we prioritize according to the needs of the ex-Windows user who has no idea what a terminal is, or prioritize for the current Unix user who sees the command line as a useful tool.

So why was it done? Set an old codger straight in his ways...

by Rayiner Hashem (not verified)

I'm curious. Why does console need to remain in the kicker? I mean, I use the konsole all the time (I've got half a dozen open at any given time) but I see no reason it needs to remain in the default kicker. Certainly, I'd wager most KDE users don't use it enough to warrent it.

by Nick Matteo (not verified)

Are you kidding? No matter what you do, almost all linux users need the command line from time to time. Konsole and Firefox are the ONLY icons I need in kicker. It's trivial to add them myself, of course, but I really can't see how anything else can warrant inclusion by default over konsole.

by Sashmit Bhaduri (not verified)

> I am getting sick of this attitude that usability means dumbing down the interface.

Getting rid of konsole from the default kicker config was dumbing down the interface? Just found that comedic.

That is all.

by Cloaked Penguin (not verified)

My counterargument at the time was that people who use consoles have their hands at the keyboard, and for them doing an alt-f2; ko is way more comfortable than pulling mouse to icon. I don't think that has changed.

by Duncan (not verified)


Or.. use KHotkeys to set up a hotkey shortcut, as I have for all my frequently used apps.

I have one of those fancy keyboards with a bunch of "multi-media" and "internet" keys, and set up one of them, XF86WWW, as the "user-menu" key. "UMenu, C" gives me a konsole, "UMenu, Ctrl-C" gives me the KDESU prompt and then a root konsole. F/Ctrl-F work the same way as C/Ctrl-C but for file management (Konqueror). E/Ctrl-E are the same for editing (KWrite), N for news (PAN, since KNode doesn't do yEnc, last I checked), M for Mail (KMail), G for one game, Ctrl-G for another, etc. I use Alt, as in Alt-E, for alternatives, so UMenu, Alt-E, for instance, opens KHexEdit.

I haven't set up any mouse gestures yet, as I just installed KDE 3.2 since Mandrake is a bit behind on AMD64 and just came out with 3.2 for AMD64 (the reason I'm working on switching to Gentoo, BTW). I will eventually, most likely, but that isn't really appropriate for a konsole shortcut anyway, for the reasons you mentioned.

Duncan (who followed the link from LWN).

by jfb3 (not verified)

I think KNode supports decoding of yEnc now. (As of KDE 3.2)

by Jens (not verified)

There is a spelling error in the name of the interviewee.

by Fabrice Mous (not verified)

Thanks .. fixed


by ac666 (not verified)

i setup a few sessions in konsole like this:

ssh -t [email protected] screen -r -d ScreenSessionName

(menu, Settings, Configure Konsole, Session Tab -> Execute)

this way, i'm only one klick away from my remote hosts

by _Fast_Rizwaan___ (not verified)

I can't type hindi in Konsole, even after setting the font to mangal (ms hindi unicode font).

And also, I can 't save a file with Hindi names (unicode characters). Though all the KDE environment looks hindi fine. But one can not have hindi file/folder names in KDE...

by A.N. Onimus (not verified)

Indeed. My locale is "en_US.utf8" and I use gnome and gnome-terminal.

I tried konsole and I can't even type quotes or accented chars('"çéñŕģùŸ ...)

by Benjamin. (not verified)

If I type the following:
$ tes
and the available applications are test, testparm, and testprns, bash beeps and completes up to the "t":
$ test
This interacts with the Konsole visual bell in a way that bugs me immensely. Instead of printing the "t" and flashing to indicate the bell, Konsole flashes to indicate the bell, then prints the t. During the delay it looks like it can't complete anything at all!

My configuration has bell set to "System Bell" in Konsole, and "Use visible bell" under KDE Control Centre/Accessability/Use visible bell. Hmm... it actually seems to behave better when set to visual bell in Konsole itself.

My feature request: Make the visual bell concurrent with subsequent updates for the visual bell accessabilty option.


by Steve (not verified)

I like konsole - I like being able to have anti-aliased fonts, and have a widget set that fits with everything else, but there are a couple of features which I miss too much to give up using rxvt:

- Scrolling lots of text is very much slower than rxvt (which can slow compiles down!)

- I can't ask it that $DISPLAY is; rxvt can tell me. This feature can be very useful; I don't want to "ssh -X" all the time as that's slower.

The memory footprint could also be considered a point, but these days that's becoming more and more insignificant. I don't have a 486 w/ 12MB anymore. :-)

-- Steve

by Anonymous (not verified)

> - I can't ask it that $DISPLAY is; rxvt can tell me.

I don't understand what you mean. Asking within a program what environment variables are set?

by Steve (not verified)

It's not asking what environment variables are set directly. You probably know that you can do things like set the terminal title by echoing a command sequence. There are similar sequences for moving the cursor, setting colours, asking the terminal about itself and so on. One such sequence (^[[7n) will cause rxvt to write the name of the display it's on back to stdin, which you can read in and use to set $DISPLAY. You can configure rxvt (in the source) to give you either the hostname of the IP address.

It's a very nifty feature for those of us who use remote X apps. I'd very much like to have this in konsole as an option (disabled by default though).

-- Steve

by Anonymous (not verified)

If you really want to have a feature then please file a wishlist entry at

by Fred (not verified)

I really like konsole but have to agree on the fact is it quite slow. It's not a problem normally, but the testbed for my programming project takes about 20 seconds to run in xterm and 35 seconds to run in konsole. It spits out a lot of debug text on the way, so konsole appears to be much slower in displaying it. In xterm, it just whizzes by. I'd rather use konsole, but for this instance the time really adds up and I am forced to use the more primitive xterm instead.

by Ian Monroe (not verified)

Sounds like something is wrong since obviously your choice of console shouldn't change what the environment variables are.

And you can't have your cake and eat it too. Scrolling takes a long time because of the anti-aliasing. When I'm doing large compiles I usually minimize Konsole since all that text scrolling by can take a chunk of CPU.

by Anonymous (not verified)

Try to use a non-antialiased bitmap font.

by Fred (not verified)

But then it will look ugly like xterm. :)

Couldn't the programmers implement something where it would be more conservative about how much text is displayed? My program spits out screens of data, so fast that you cannot read it. The only thing I need to know is that it is streaming out text (i.e. it hasn't stopped moving). Like a frames per second limiter or something.

by Steve (not verified)

This is a good idea.

What I could imagine is a jump-scroll mode, where instead of trying to scroll through everything, the konsole jumps to the bottom of what is visible, and just renders that.

If rendering the scrollable part (offscreen) means that this wouldn't help much, maybe limiting the scroll refresh to every 100ms or so and then jumping to the bottom would help. I've not looked at the konsole source, but I would guess they use a QTextSomething, and that that would only render the visible part - so doing the jump thing could be quite effective.

-- Steve

by Duncan (not verified)

I've noticed it is slow on scrolling as well. The effect becomes more noticable when Konsole is displaying more text, however, so when I'm doing something like compiling a kernel or something, I shrink the konsole window down fairly small, and it the text whizes by as it normally does when I'm using a virtual console directly.

Duncan (who followed the link from LWN)

by Fred (not verified)

Can this not be fixed with programming though? In some of my circumstances, I found xterm was about 50% faster at displaying large quantities of scrolling text. I would rather use konsole here and minimizing the window is a hacky solution that would not be practical in general.

by Davy Durham (not verified)

Yep, I've noticed this too.. it's quite annoying.. rxvt is SO much faster.

It appears as tho konsole doesn't copy the part of the screen that is the same, then render the new part when scrolling text... it just redraws the whole thing. This is very expensive when antialias fonts are enabled.

by wfa (not verified)

great interview, and thanks to Mr. Diekmann and Mr. Doulle!