Wednesday, January 24, 2007

Introductions and the future of Konsole

Hello,

I have been maintaining KDE's terminal program ( Konsole ) since August last year. I'd like to give a brief overview of what is happening for KDE 4. I spent some time triaging bug reports, and talking to KDE users and developers at aKademy to get an idea of what people would like to see in the future. From this I have defined a few goals for the KDE 4.0 release:

- Make it easier to work with many terminal sessions open ( this means navigating between sessions, monitoring activity in sessions etc. )
- Better performance ( mainly when scrolling large screens of output, and also quick startup )
- Make the configuration of Konsole more intuitive

Good progress is being made on the first two of those goals, mostly in the branches/work/konsole-split-view branch in SVN.

As the branch name says, the major feature is the ability to split the view top/bottom so you can, for example, write code in Vim or Emacs in the bottom view and watch the result of a compilation in the top view. Views can be detached and reattached (via a "Merge Windows" option which merges all the open Konsole windows into one). In order to allow views to be moved between windows, I rewrote the front-end as a single-instance application. The KDE libraries make this extremely easy to do. This means that if you launch say, a couple of Konsole windows from the panel, another from the K-Menu, and perhaps another from a shell script, they will all be part of the same process ( plus secondary windows open instantly and less memory is used ).

Split-view screenshot (navigation area not shown)

A much more experimental feature I am playing around with is abandoning tabs and using a list at the side of the window. A little like Kate. The problem with tabs is that they are not very expressive, with only a small amount of text and a tiny icon. Web pages often have sensible titles and associated icons, so this isn't such a problem, but terminal sessions don't. Lists allow the possibility of providing arbitrary information to help users monitor activity in various sessions, and also perhaps using colours or images to make it easier to locate a particular session in the list quickly. The obvious downside is that they consume horizontal space. It is also important to avoid the temptation to go overboard and put too much distracting information there. I want Konsole to feel 'clean' and 'simple', despite its feature set.
It is easy (in the code) to switch between using a list or using tabs, so if the experiment does not work out, or users don't like the change, I can go back to tabs.

A number of backend changes have been made to improve performance. In KDE 3, every time Konsole scrolls the display up one line, it has to move 40KB of data in memory (for a default-sized window) because the screen image was held in one array. In KDE 4, lines of output are stored as reference-counted vectors, so moving the display up one line just involves adjusting the array which keeps track of which vector goes with which line. A side benefit of this is that if you resize the Konsole window to make it smaller, and then make it larger agan, output is not lost as it is in KDE 3. The change which makes the biggest difference for day-to-day usage on large displays is that in KDE 3, every time the display is scrolled, the entire terminal view is repainted from scratch - which involves lots of computationally expensive text rendering. In KDE 4, the emulation gives hints to the view about how the image has been transformed since the last display update, and the view can use this to achieve the same result in a cheaper fashion (eg. using the standard widget scrolling mechanism instead of repainting every line when you scroll up or down one or two lines).

KDE 4 is still a long way from release, so there is a "new" KDE 3 feature to keep the 'candy whores happy ;). KDE 3's Konsole has a compile-time option to enable true-transparency. This is not very convenient because you have to recompile the code yourself to get the effect. So for KDE 3.5.7 it has been made into a command-line option, accessible like so:

konsole --real-transparency

This is not enabled by default because I need to find a reasonably reliable test for a compositing manager, and also because UI changes are necessary to allow users to choose between fake and real transparency ( yes, there are plenty of users who prefer the "fake" system used at present ) - that will probably have to wait until KDE 4.

61 comments:

Anonymous said...

Really nice. One feature I would like to see in konqueror was a single keyboard shortcut to create a new session and detach it (or to create it detached). That would be killer.

Troy Unrau said...

Hey Robert, nice summary...

I'd like to write a dot.kde.org article on your konsole improvements sometime down the road. Can you email me with your contact information?

troy(dot)unrau(at)gmail(dot)com

Scott said...

I like the idea of being able to see multiple console screens at once! Hopefully, it would allow splitting vertically as well, because I could see creating a profile with 4 consoles 2x2!

Would it be difficult to have a live preview of the console as your list icon?
To bad tabs cannot have bigger icons, because I would like that in Konqi as well. Maybe if the 'list' could be placed at a user configurable edge including the top or bottom, it would take care of your issue with taking up horizontal space, and still remind the user of the tab concept.

Anonymous said...

What about adding some stuff Yakuake became popular for? Like getting a konsole out of the top or stuff like that?

Robert Knight said...

Hi Scot,

It is possible, although console sessions don't have pretty pictures and visual styles so thumbnail previews of terminal sessions would be harder to distinguish between than thumbnails of a web page.

I thought about using the terminal session's background colour or image to colour its entry in the list though.

Guss77 said...

What I would really like to see, is improvements to the session manager (that thing that allows you to have preconfigured terminal sessions). I have a habit of creating sessions for remote computers I manage, and pretty quickly it gets out of hand - with a session list 10 miles long. It would be great to have some kind of hierarchical menu system for the session manager

pipitas said...

I'd be very unhappy if I'd have to see konsole tabs go.

I work a *lot* with konsole tabs, and give them names I know to remember. I also like the keyboard navigation from tab to tab (or by just using the mouse wheel while the pointer is over the tab row), and the shortcut to create a new tab.

Yes, Kate has a "list". But it also has "tabs". So it has both. The drawback with Kate tabs is that they do do not work as elsewhere (at least for me): no keyboard navigation that I'm aware of, and mousewheel certainly doesn't work. Just klik-ety-klik....

Split views would be nice.

What I'm missing here (but this could be a semi-b0rken local installation), is an easy way to safe a "profile" of my current tablist. That would include the current dir paths for each konsole tab, and their names, and possibly the logins. (If I'm using different usernames and remote logins to different computers in a session, save it and the next day I want to reproduce the saved session, Konsole should remember where I was logged in and under which name, and it should display the connection command (like "ssh -p 333 user@remote") and have it ready for me to just hit [enter]...

I'm seeing that there is a "Settings --> Save Session Profile..." in the menu, but it doesn't work here (SUSE-10.0/KDE 3.5.5). I can save the profile as often as I want, under whatever name, but I never figured where to get that session back from. Not even "grep -R" helped me to find the session name again in my .kde directory. Somehow the session saving does not work, but I'm not getting any feedback that it failed either...

Hmmmm... maybe I verify that on a Knoppix, maybe it works there and only my local installation is hosed...

Anonymous said...

Please, what is you window decoration theme? What is your color scheme? Can you upload me your color scheme? And is the horizontal/round gradient effect part of the window decoration or is it because of transparency with the desktop background image? Is there a package for KUbuntu (I use Dapper)?

I like very much your window decoration.

Scott said...

Hi, robert,
What I was thinking with the thumbnail preview, is that If you made it big enough, then maybe the multiple consoles would not be as necessary. If it is live, then it would be like a mini console that you could glance at to see if your compile is done. Maybe highlight it on changes, or maybe highlight it when it is waiting for input from the user.

Robert Knight said...

> Please, what is you
> window decoration theme?

A very slightly modified version of the one which comes with Kubuntu Edgy ( that is where the rounded windows come from )

The window decoration is called "Crystal", and I have a landscape as a desktop background with a blue-green sky. "Crystal" has an "Enable transparency" option which lets the background show through in the window decoration. That is where the colours come from. The background landscape was downloaded using the "Get New Wallpapers" button in the Background settings in System Settings -> Desktop

Robert Knight said...

> Konsole should remember where
> I was logged in and under
> which name

I honestly don't know how to do that. If you know how I might be able to find out the name and location which an SSH session is showing, given only the process ID of the SSH process, then please let me know - it would be a very useful feature.

The only thing Konsole knows about a session at the moment is the command used to launch it (as set in the Sessions tab in Konsole's settings dialog), when it starts, when it has terminated, and the characters sent to / received from it.

Illissius said...

I personally much prefer tabs, even in Kate. (And even though as mentioned, Kate's tabs are pretty rudimentary). In konsole, I use the script that sets each tab's title to the current dir or running command, to help differentiate them. Couldn't that be built in?

dhaumann said...

As on of the Kate developers I'd like to bring this up:
- There are lots of people who want tabs in Kate (again and again). This is why the tabbar extension is there
- If you provide split view, users want to be able to split horizontally and vertically.

Greetings :-)

gb said...

Hi and thank you for konsole the best terminal app around.

Your new changes sounds great but as previously mentioned I would alsolike to see the drop-down quake approach. If it could be made so that you can have it slide in from the side as well that would be even better.

A drop-down quake feature would be a priority I think since I like having really quick access to my konsole without having it running in the taskbar or having to start it. Having a drop-down feature would make the konsole feel more integrated into the system.

Anonymous said...

I very much like tabs, and I rather don't see them go away! I give the tabs my own names, and that makes it very intuitive to work. Further more, as others have stated as well, tabs are very easy to navigate using e.g. the keyboard or the scroll button of the mouse.

RB

Anonymous said...

I very much like tabs, and I rather don't see them go away! I give the tabs my own names, and that makes it very intuitive to work. Further more, as others have stated as well, tabs are very easy to navigate using e.g. the keyboard or the scroll button of the mouse.

RB

Anonymous said...

I very much like tabs, and I rather don't see them go away! I give the tabs my own names, and that makes it very intuitive to work. Further more, as others have stated as well, tabs are very easy to navigate using e.g. the keyboard or the scroll button of the mouse.

RB

Scott said...

I like tabs also, but I want tabs to be more useful. I want the icon to be bigger. Big enough in fact to show a usable thumbnail. I also want all multi-document apps like Konsole, Konqui, and the Koffice apps to allow the user to see more than one of their documents at the same time.

Anonymous said...

Something that I would love to see would be different text colors once you have logged into a different machine using ssh or rsh from konsole. Being able to tell at a glance which commands were executed locally and which commands were executed remotely would be great.

Anonymous said...

Thanks Robert. Konsole is always open on my desktop, usually with 4-5 tabs.

The only thing I have ever found difficult with Konsole is setting the fonts. What i would appreciate is a list of monospaced fonts with an realistic example showing what they look like.

For the suggestion about opening a ssh session automatically, how about having tabs or bookmarks (which exist already) with the ability to run a script, or run a series of memorized commands?

Great work.

Derek Kite

Anonymous said...

The new konsole looks pretty super. Thanks for the update.
That said, have you seen the way osx's terminal application works with a vertically split view? If you scroll the window it leaves a few lines of text at the bottom. So you are capable of scrolling back through, say compile output, while also keeping an eye on the still scrolling session. It has actually come in very handy. It also allows for scrolling back through the buffer and then typing a command at the bottom without your focus being taken back to the bottom of the buffer, all the while still being able to see what you are typing.

Anyway I hope the new konsole is also capable of these steps. I know I find them handy on osx and it is something that I miss elsewhere.

bkn said...

Rob,
I will reiterate some previous comments. I would like to keep the tab feature. As you put it:
> The problem with tabs is that they
> are not very expressive, with only a
> small amount of text and a tiny icon

You're right tabs are not expressive, but to express something the user needs to put the energy to express it. I like tabs because they are quick, fast and disposable, if i choose.

If you can successfully bring in the sidepanel like kate and also keep tabs. that would be fantastic. the best of both worlds. I think the kate sidepanel has some big advantages. I like how the kate sidepanel changes the color of the file entry base on the frequency of use. That would be a really cool for konsole.

I'm also looking forward to the configuration changes you mentioned. One of my biggest problems w/ konsole is the configuration.

Split windows == awesome!

I would like to see something like the yakuake, as other users have mentioned. Perhaps that will be a function of kicker (or plasma) and the konsole-part.

Rob, it looks like you're well on your way to bring konsole some needed love. konsole a necessity for me. i'm looking forward to seeing your work!

great job!

Anonymous said...

Another vote for tabs...

I dislike the kate-style list for the amount of horizontal space it takes. I much like the tabs (and navigation) as they are now.

They might only have room for a little text, but mine usually only say stuff like 'src', 'bld' and 'inst' anyway: no essays, just enough to recognise them.

For me, the horizontal space they take is always less than the width of a useful terminal.

caio1982 said...

I thought would be nice to give some more interesting (IMHO) ideas for a better Konsole. Here we go:

- Terminals may be "bonded" so that the output of a command in one terminal is echoed to all the "bonded" terminals [doesn't matter if they are remote shells].

- Terminals may be moved from one Multi Gnome Terminal Window to another.

- Improved support for launching URLs direct from the terminal Window [I sincerely don't know if it's possible today].

Every suggestion above was grabbed from the Multi Gnome Terminal project (which seems to be dead since 2002). I hope you see usefulness on them! Keep up the good work :-)

jayKayEss said...

*PLEASE* don't get rid of the tabs completely! I would not be able to fit two terminal windows side-by-side with a list widget.

Mads Bondo Dydensborg said...

Another vote for keeping the tabs here. List or tab should be selectable at runtime.

Also to the users that use many sessions, remember that you can use dcop to control your konsole session. I have some small scripts, that logs me into a number of remote computers, setting up the tabs, with titles, etc, its very nice. The meat of it is these lines:

`dcop konsole-$konsole konsole newSession "$2"`;
`dcop konsole-$konsole session-$count renameSession "$1"`;
`dcop konsole-$konsole session-$count setEncoding "$3"`;

I even whipped together a small Kommander script to allow me to select one of a number of these "sessions" from a list.

Regards, Mads

Richard said...

I would like to see tabs, or whatever they are replaced with to be integrated with screen sessions somehow. screen being the command line app.

Screen is good, but it would be nice if you could ssh into a box and have all the screen sessions appear as separate tabs/ items in a list.

Right now I use screen because if a ssh connection is lost, screen detaches rather than shuts down, and for some other functionality it provides.

I may have several ssh connections open at once to different servers, so it is fiddly getting to the session I want.

Anonymous said...

the list of available tabs could be displayed via shortcut - like ctrl+tab in opera or alt+tab in KWin (you need to hold ctrl or alt to see the list)

Anonymous said...

Cool, finally real transparency. Did you figure out how to prevent side-effects (like not setting wm_class) of using different QApplication constructor? As I remember this was one of main reasons to not enable transparency.

Robert Knight said...

> Did you figure out how to prevent side-effects
> (like not setting wm_class) of using different
> QApplication constructor?

No, I didn't even know about that. Unfortunately there was no documentation in the code about such issues.

I will look into it.

pipitas said...

"I honestly don't know how to do that"
----

Hmm, then I was maybe too naive...

I don't know if konsole could watch out for "ssh" commands, and f.e. see if it succeeds, and if there is a real session following it (not just a single command executed remotely), and remember that....

Zubin said...

I love Konsole! And I love the idea of split screen. I currently use QuadKonsole for splitting my konsole sessions! Its very configurable, you can have any number of konsoles you specify. I really like tabs in Konsole, and was wondering if you could keep it as a user-configurable option rather than removing it (I'm not sure you're removing it or not, but just in case you are).

Thanks!

Zubin said...

I love Konsole! And I love the idea of split screen. I currently use QuadKonsole for splitting my konsole sessions! Its very configurable, you can have any number of konsoles you specify. I really like tabs in Konsole, and was wondering if you could keep it as a user-configurable option rather than removing it (I'm not sure you're removing it or not, but just in case you are).

Thanks!

Calvin said...
This comment has been removed by the author.
Calvin said...

I find a split terminal window to be very useful, and since it seems the only terminal that offered this with any flexibility was multi-gnome-terminal, I have been using that, despite its apparently being defunct.

But recently when upgrading to FC6, I decided to try to make konsole work for me. I downloaded the source for the current version and spent a little while altering it so that it would allow the user to merge multiple sessions into one tab and then to split them out again if required.

While waiting for KDE4, I guess I will be using this; it seems to work okay for what I want although I am sure it broke some things that I am not using.

Juliano said...

About transparency, it's nice that we will have it in 3.5.7, but if it is a parameter to konsole, how will it be handled on other applications that use konsole_part, like konqueror and kate?

Robert Knight said...

Real transparency will only be available in the Konsole application in KDE 3.5.7 if a commandline option is enabled. It will not exist in the embedded Konsole ( as used in Kate, KDevelop etc. )

That is something which can be discussed later on for KDE 4.x development.

ajfel said...

It would be cool if konsole could connect to a remote GNU screen and represent individual virtual shell sessions as taps. That would rock big time!

Anonymous said...

the comments about konsole "rememebring" anything about my ssh session freaks me out. a great console is all we need, but having it branch into indepth session management smacks of insecurities.

Carl said...

Konsole is the best terminal app ever, and it sounds like you have some great visions for its future.

I would repeat the vote for tabs over side icons, or at least a configurable choice.

Also, by far the biggest missing piece in any terminal app is integration with screen. I'm sure you've seen bug #58868. Being able to log in and pop open a Konsole Session Profile that reconnected with a set of screen sessions automatically (remote or otherwise) would be very cool.

I also like guss77's suggestions of session organization. Sysadmins and others who deal with a large number or remote machines know this pain only too well.

And I can't seem to find out how to delete/edit saved session profiles...

James Stroud said...

I've been using Konsole since forever--simply because no other viable alternative exists. I think the overwhelming design philosophy behind it thus far has been to keep it difficult to use, presumably because we terminal hax0r5 prefer the arcane, even if it applies to the user interface of our terminal programs.

But here are some items from my konsole dream list (please don't construe this as any kind of rant on your work, because I know you just took over this project):

1. This might be fixed in the current version, but in the version I use from 2004, Konsole keeps appending its name to the window titles, so you get 'shell - Konsole - Konsole - Konsole - Konsole' or some-such depending on how many times you ran vi. Totally annoying to no end. I would like to see the option to set the window title explicitly (for the taskbar). If I give a window a title, I'm pretty sure I'll know what program I was running it in, so I don't really need to know it was 'Konsole' (much less 'Konsole - Konsole - Konsole - Konsole - Konsole - Konsole - Konsole - Konsole'.

2. How about a "save session" under the "Session" menu? Perhaps have a bookmark-type menu created for this, complete with *saving session names* (resisting capitalization here). To rephrase, I would like to go to a "Sessions" pull-down and select a session I saved, etc. It would be nice to be able to reorganize this list. I think this is the idea behind "schema", but I think the whole "schema" paradigm is some kind of anachronism dating back to 1991 when color monitors came exclusively as TVs hooked up to trash-80s or as optional accessories on SGIs. How about simply "save session"? I tried "save setting profile", but guess what, it didn't show up in schema. This is annoying and retarded, as I'm sure you are aware. I think I figured out how to make a new schema one time, but it took me half-a-day. To recap: 1. save session (saving color "schema" and session name), 2. open session by clicking on the session name in a menu some where. Perhaps this type of thing is simply too simple for hax0r5, but I thought I'd throw it out.

3. If I quit my KDE session, it would be nice to get all of my Konsoles back complete with session names. (Has the theme of session names become obvious?) Yes, session names. I know this is a big request, because I am the only person in the whole wide world that has more than, like, three windows open (and more than one Konsole (i.e 'Konsole - Konsole - Konsole - Konsole - Konsole') window) at once, but pretty please? It would really help me find my other Konsole windows. (I upgraded from a 13" inch monitor back in the mid '90s so I can have a few windows open at once.)

James Stroud said...

I almost forgot-I would totally like the ability to have about 200,000 lines of scrollback. I just bought a new 128 MB ram chip and I would like to put it to good use!

OnlinePharmacy said...

vjiIpU Your blog is great. Articles is interesting!

buy dosage orxc com from link phentermine html v said...

jZStDK Thanks to author.

online pharmacy meridia international said...

Wonderful blog.

california hotel motel sale said...

Hello all!

name said...

Nice Article.

century bicycle tour in california said...

actually, that's brilliant. Thank you. I'm going to pass that on to a couple of people.

cleveland theater district discovery tou said...

Magnific!

Rich said...

Robert,

Is the new Konsole going to have the ability to 'send input to all sessions' the way the 3.5.6 konsole does? I use this all the time as I manage some 90+ servers all of them pretty much the same.

Stanton said...

I manage 2500+ *nix systems and NEED the "Send Input to All Sessions" (broadcast) feature.

Steve said...

Hi Rob,
thanks for looking after one of the finest terminal 'emulators' going. Ive been using KDE since approx SuSE 7 and have always enjoyed the excellent combination of power and simplicty.

I have recently started using Konsole on Ubuntu and discovered that much of what I thought was powerful to have disappeared from the more obvious areas of the menu. For instance, I used to kssh a lot in SLES / SUSE - and even those distros don't seem to extend konsole with this out of the box anymore.

I wanted to ask you about a couple of features I remember using a lot though and couldn't find in my latest install. I recall that there used to be a tab or facility within a tab to send anything typed in that window to all other open / tabbed windows - which is really useful if you wish to do some work on a number of different servers.

Any idea if this feature is a built in, needs installing or has been deprecated?

best wishes and thanks

Steve Nisbet

Robert Knight said...

Hi Steve,

This feature is now called "Copy Input To..." and it can be found in the Edit menu.

Anonymous said...

I can think of one feature that would help managing multiple
sessions. Currently konsole allows detaching a session, but there is no option
to re-attach a tab (i.e. to move a session/tab from one window to another).
You may already have this in mind with "Merge Windows", but your description
sounds like that option just "merges all the open Konsole windows into one",
while selective merging would be more useful in most cases.

One other thing about making multiple sessions all use the same process. Will
this allow running different sessions on different X11 DISPLAYs? If not, then
there needs to be an option to over-ride this behavior to run a session on a
different display.

Regarding removing tabs: Emphatically, NO. While konsole is currently the best
terminal emulator I have ever used, the change you propose above would make
konsole practically useless. This would make it much more difficult to work
with many terminal sessions open while using screen space optimally.
If you ever remove tabs from konsole, konsole is dead.

I should also note that much of what you mention as "advantages" of the list
view are actually possible with tabs. You could implement arbitrary coloring
and assigning of icons to tabs. I don't know whether KDE 4's konsole has this
feature or not, but Konsole KDE 3.5.10's DCOP interface allows changing the
title of the session, which is nice for scripts/bashrc/etc. It would be nice
to have a DCOP command to set the icon of the session, as well, and even the
tab's background and text colors.

Anonymous said...

It would be nice to be have an option (NOT always enabled) to automatically
split and un-split a session when scrolling up and down. For example, I scroll
up and the display is split. Both areas display the same text buffer. The
bottom area continues to display new text as it is added to the buffer, while
I can scroll up and down in the top area. This would allow me to scroll up and
view the history without missing new text.

Also, konsole in KDE 4.1.3 has a bug with split views. When there is only one
session but the view is split, the tab bar is visible when it should not be.

Anonymous said...

Nice post as for me. It would be great to read something more concerning this topic. Thnx for giving that information.
Joan Stepsen
Gifts geek

generic propecia said...

Hello people want to express my satisfaction with this blog very creative and I really like the views of the focus very good indeed Thank you for the helpful information. I hope you keep up the good work on making your blog a success!

Cris said...

This information is very interesting, I really enjoyed, I would like get more information about this, because is very beautiful, thanks for sharing! costa rica investment opportunities

Isma said...

Hello .. firstly I would like to send greetings to all readers. After this, I recognize the content so interesting about this article. For me personally I liked all the information. I would like to know of cases like this more often. In my personal experience I might mention a book called Generic Viagra in this book that I mentioned have very interesting topics, and also you have much to do with the main theme of this article.

Mobile Application said...

My friend recommended to this blog.... you have some awesome articles shear. keep it up the great work

android application | android web application

doubletree hotel austin tx said...

Very nice blog website. could provide a new information to me. Glad to find a blog like this. Looking forward to more.