Bug 377181

Summary: Support for termcap/terminfo te@/ti@ sequences.
Product: [Applications] konsole Reporter: Marcos Dione <mdione>
Component: emulationAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: egmont, sebastian.englbrecht
Priority: NOR Keywords: investigated, triaged
Version: 17.12.3   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Marcos Dione 2017-03-03 22:42:48 UTC
I use screen with scrolling support turned on[1]. This was working at least on kde4's konsole and works on xterm and rxvt, and it doesn't under the specified version. I started reading a little about terminals and termcap/info and I got the impression that this could be fixed by configuration, but I don't have the slightest idea how.

To reproduce:

* install screen
* add the following line to ~/.screenrc:
termcapinfo xterm ti@:te@
* start screen
* produce more lines than the current window size (for instance, cat'ing a long file)
* try to scroll back with Shift-PageUp, but nothing happens (you can already see that the vertical scroll bar is not growing).

--
[1] http://www.saltycrane.com/blog/2008/01/how-to-scroll-in-gnu-screen/#c7371
Comment 1 Sebastian 2018-10-30 19:55:29 UTC
Note: I am no maintainer but from the bugsquad.

Hey Marcos,

I can reproduce this bug.
Unfortunately I do not know a way to fix it.
I will change the status to confirmed so that the maintainer is more likely to find it.

System Information:
konsole 17.12.3
kde-plasma-version: 5.12.6
kde-frameworks-version: 5.44.0
qt-version: 5.9.5
Comment 2 Marcos Dione 2018-10-30 21:59:14 UTC
Hi Sebastian. Thanks for confirming this bug.

I have to say, I just tried and it works? I even ssh'd into another machine, reattached an old screen, and it still works. I'll keep testing other environments I have...

Ok, I have one screen that works and another that doesn't. But I have no idea what's different or where should I look at. Probably this is a screen bug and not konsole's?
Comment 3 Sebastian 2018-10-30 22:31:06 UTC
Hard to say.

I do not use screen and tbh I don't really know where to start to find the issue.
It would be interesting to see if there are other emulators in which the problem also occurs.

You said xterm and rxvt work, so you already covered this.
Comment 4 Egmont Koblinger 2018-10-31 09:00:18 UTC
This is an invalid bugreport, you guys are on the wrong track.

There are no "ti@" and "te@" capabilities in xterm or anywhere. There are "ti" and "te" capabilities (switch to/from the alternate screen) and these are supported by konsole.

The "@" sign is screenrc's notation for turning _off_ a feature (check in screen's manual page), that is, effectively removing it from xterm's description, not emitting it towards the terminal emulator, pretending that the emulator doesn't support it.

One reason why it no longer works for you might be that I believe konsole now defaults to TERM=xterm-256color rather than xterm, it needs to be adjusted in screenrc's line.

On a side note, turning these off is a broken idea by design. Sure it's more convenient to be able to scroll back using the emulator's scrollbar, but the moment you start using screen's features like detaching and re-attaching, it no longer carries the scrollback contents. Or if you switch between multiple windows inside screen, they'll have a common scrollback.
Comment 5 Sebastian 2018-10-31 09:11:23 UTC
Thanks for you input on this.

Investigating about what you wrote makes me agree with you here.
I do not think this is something we should/can "fix".

If it is ok for you marcos I would like to mark this bug RESOLVED > INTENTIONAL.
Comment 6 Marcos Dione 2018-10-31 20:30:45 UTC
> On a side note, turning these off is a broken idea by design. Sure it's more 
> convenient to be able to scroll back using the emulator's scrollbar, but the 
> moment you start using screen's features like detaching and re-attaching, it 
> no longer carries the scrollback contents. Or if you switch between multiple 
> windows inside screen, they'll have a common scrollback.

This is how I got used to work with screen, using the emulator's scrollback was enough for me in many situations (and you can alwas resort to call screen's copy mode and use it's scrollback).

I'll try those tips you mention, for the moment, yes, by all means, elt's close this bug.