When running terminal programs using GNU screen in gnome-terminal the scroll bar and mouse scroll does not work. I am using a default /etc/screenrc. I am able to circumvent this bug by setting TERM=linux. The default is TERM=xterm but it also fails with TERM=rxvt. multi-gnome-terminal has this same bug however xterm (the terminal not the environment setting) works fine and so does the console Reproducible: Always Steps to Reproduce: 1.gnome-terminal 2.screen 3.bitchx Actual Results: the scroll bar does not show that the history buffer is growing and i cannot scroll up Expected Results: the scroll bar should have gotten bigger and i should have been able to scroll I suspect this is a problem with gnome-terminal's handling of the xterm protocol though it could be a setting in the screenrc. I know nothing about xterm so i cannot help there but I have tried looking through the termcap and termcapinfo settings in /etc/screenrc however it is too cryptic for me to be able to find the cause there
changing TERM also makes it so the terminal does not blank to an unuseable blue when a tab is opened. To cause this to happen you open a gnome-terminal then you run screen then you open a tab then you let both accumulate a few lines using the yes command. Using TERM=linux fixes this too. My guess is that the screen goes blue because of an error in not being able to scroll.
Probably: http://www4.informatik.uni-erlangen.de/~jnweiger/screen-faq.html#TERM > Q: My xterm scrollbar does not work with screen. > A: The problem is that xterm will not allow scrolling if the alternate text > buffer is selected. The standard definitions of the termcap initialize > capabilities ti and te switch to and from the alternate text buffer. (The > scrollbar also does not work when you start e.g. 'vi'). You can tell screen > not to use these initialisations by adding the line > termcapinfo xterm ti@:te@ > to your ~/.screenrc file. I can confirm that this works; either in ~/.screenrc or in /etc/screenrc. Could the reporter please confirm this? http://lists.gnu.org/archive/html/screen-users/2003-04/msg00009.html implies that Debian and Red Hat add the above line to /etc/screenrc. If this is the correct fix then it would be worth considering adding it to our /etc/screenrc; if so this bug should be passed to the screen maintainers.
confirmed. the suggested configuration provides the desired behavior
Oh, that's added _commented out_: Debian (screen-3.9.11-5woody1) has: # Do not use xterms alternate window buffer (won't add lines to scrollback bfr) #termcapinfo xterm|xterms|xs ti=\E7\E[?47l Fedora (screen-4.0.2-5) has: # # Do not use xterms alternate window buffer. # This one would not add lines to the scrollback buffer. #termcap xterm|xterms|xs ti=\E7\E[?47l #terminfo xterm|xterms|xs ti=\E7\E[?47l Perhaps putting a commented out entry into /etc/screenrc would be the correct response? The FAQ link above seems to indicate that screen's behaviour is a misfeature (which, admittedly, interferes with the far-easier-to-use xterm scrollback buffer), not a bug as such.
Considering that i looked through the screenrc for such a commented out setting, especially in the exterm features section i think that would be wise. I've gotten accustomed to doing so because gentoo is so good about it.
Our default screenrc has a lot of xterm tweaks. I added the termcapinfo line to our screenrc. It's enabled by default as all the other tweaks.
isnt this a bug in gnome-terminal and not screen ? gnome-terminal doesnt actually support 'xterm', it just lies about the whole thing ... if you export TERM=gnome inside of gnome-terminal and you remove this setting from your screenrc, does it work fine ?
No, that doesn't work. I think gnome-terminal is doing the right thing here; it's just that screen is stuck in the '70s and assumes it needs to implement its own scrollback buffer in preference to the far easier-to-use scrollback buffer in all modern terminals and terminal emulators.
Created attachment 97203 [details, diff] screenrc-with-gnome.patch Please reopen this bug! This bug has now surfaced again with Gnome Terminal 2.14.2. I suppose, that's because in Gnome Terminal, TERM is set to gnome. When I start "screen", I cannot scroll back. But when I start "TERM=xterm screen", I can scroll back. The attached patch should be applied against /etc/screenrc. What it does, is that in the termcap (et.al.) sections for xterm, it adds "gnome|", so that gnome also is good.
I just want to note that screen-9999-r1 breaks scrollback buffer in kde konsole. (and is unmasked in ~x86!) Not sure what it was trying to fix or how, but this is broken recently, because the same thing works in screen-4.0.3, with a configuration identical besides screenrc. Before, I could shift+pgup/pgdn, now i can't. I looked at the diff between configuration files for a long time and couldn't figure out which option breaks this. I'm simply masking it and going back to 4.0.3, hoping those changes don't make it to 4.0.3-r1. :P