[Pkg-zsh-devel] Bug#794968: zsh: please clear console on logout (if recommended config is used)
Carsten Hey
carsten at debian.org
Sun Aug 9 16:05:48 UTC 2015
Hi Axel,
* Axel Beckert [2015-08-09 16:57 +0200]:
> Carsten Hey wrote:
> > * Axel Beckert [2015-08-09 16:12 +0200]:
> > > Carsten Hey wrote:
> > > > Please clear console on logout if the recommended config for new
> > > > users is used.
>
> ...
>
> Ok, thanks for the clarification.
>
> I'm mostly annoyed by such behaviour upon remote logins via SSH as
> usually the whole terminal history gets lost in such cases.
>
> > I wonder if you still think that it's annoying if you know, that it
> > only clears a console if, and only if, the parent process is
> > /bin/login.
>
> Does SSH use /bin/login by default? (IIRC not.)
SSH does not use a console but a pseudo terminal, even if it is invoked
from a console (and even if this would not be true in rare cases, the
check to avoid spawning a new subprocess if SSH_CONNECTION is set would
avoid running clear_console anyway). Therefore the screen would never
be cleared when returning from an SSH session. I assume this answers
your actual question.
> So if it's really just for the Linux (or FreeBSD or Hurd :-) virtual
> console, I'm fine with it.
You might remember that I asked you if you had physical access to
a kFreeBSD box. Now you know what I wanted to test ...
> There it indeed makes sense. Just not for SSH logins ...
This would not be console ;)
> ... or calling "zsh" or "zsh -l" ....
This could be described as subshell (i.e., the parent process is
a shell) and therefore clear_console would not be run.
Pasting the code that would be part of the recommended .zlogout could
help to clarify some things, but there's still a GPL'd triviality in it.
Carsten
More information about the Pkg-zsh-devel
mailing list