Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1532484

Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for all VGA consoles

From Manuel Schölling <manuel.schoelling@gmx.de>
Newsgroups linux.kernel
Subject Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for all VGA consoles
Date 2016-11-29 17:40 +0100
Message-ID <sITBL-2rZ-19@gated-at.bofh.it> (permalink)
References <sGJGx-7OY-7@gated-at.bofh.it> <sIaY2-6ON-15@gated-at.bofh.it> <sIfkZ-1mC-11@gated-at.bofh.it> <sIBER-7sc-1@gated-at.bofh.it> <sINwn-75C-45@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Andrey,

On Di, 2016-11-29 at 10:01 +0000, Andrey Utkin wrote:
> Regarding logout scrollback clearing not working for me. ncurses-6.0-rc1
> which I tested it with is the latest available in Gentoo portage, please
> confirm whether I need any newer version, or should I tune something
> else. I'd appreciate if you also tested your patch with gentoo setup.
Are you sure ncurses is involved at all?
My Debian agetty(8) manpage says:

       -J,--noclear
              Do not clear the screen before prompting for the login name (the
              screen is normally cleared).

And digging into the source code of agetty shows these lines [1]:

static void termio_clear(int fd)
{
	/*
	 * Do not write a full reset (ESC c) because this destroys
	 * the unicode mode again if the terminal was in unicode
	 * mode.  Also it clears the CONSOLE_MAGIC features which
	 * are required for some languages/console-fonts.
	 * Just put the cursor to the home position (ESC [ H),
	 * erase everything below the cursor (ESC [ J), and set the
	 * scrolling region to the full window (ESC [ r)
	 */
	write_all(fd, "\033[r\033[H\033[J", 9);
}

So I guess that agetty relies on on switching the console for flushing
the scrollback buffer and we'd had to add the \E[3J sequence here.

Note that up until now I just had a look at the theory (manpage and
source code). I'd need some days to find time to show at runtime that
this really is the reason why the buffer is not flushed.

Bye,

Manuel

[1] https://github.com/karelzak/util-linux/blob/master/term-utils/agetty.c#L1175

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v7 0/3] console: Add persistent scrollback buffers for all VGA consoles Manuel Schölling <manuel.schoelling@gmx.de> - 2016-11-27 18:00 +0100
  Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for  all VGA consoles Andrey Utkin <andrey_utkin@fastmail.com> - 2016-11-27 22:40 +0100
    Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for  all VGA consoles Adam Borowski <kilobyte@angband.pl> - 2016-11-28 00:20 +0100
      Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for  all VGA consoles Jakub Wilk <jwilk@jwilk.net> - 2016-11-28 00:40 +0100
      Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for  all VGA consoles Andrey Utkin <andrey_utkin@fastmail.com> - 2016-11-28 01:10 +0100
    Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for  all VGA consoles Manuel Schölling <manuel.schoelling@gmx.de> - 2016-11-28 22:30 +0100
      Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for  all VGA consoles Andrey Utkin <andrey_utkin@fastmail.com> - 2016-11-29 11:10 +0100
        Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for  all VGA consoles Adam Borowski <kilobyte@angband.pl> - 2016-11-29 11:50 +0100
        Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for  all VGA consoles Manuel Schölling <manuel.schoelling@gmx.de> - 2016-11-29 17:40 +0100
        Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for  all VGA consoles Manuel Schölling <manuel.schoelling@gmx.de> - 2016-12-01 22:10 +0100
          Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for  all VGA consoles Andrey Utkin <andrey_utkin@fastmail.com> - 2016-12-01 22:40 +0100
  Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for  all VGA consoles Adam Borowski <kilobyte@angband.pl> - 2016-11-28 01:00 +0100
    Re: [PATCH v7 0/3] console: Add persistent scrollback buffers for  all VGA consoles Manuel Schölling <manuel.schoelling@gmx.de> - 2016-11-28 22:30 +0100

csiph-web