Terminal output disappearing after SSH into cygwin

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Fri Jan 22 08:16:17 GMT 2021


On 2021-01-21 09:02, matthew patton via Cygwin wrote:
> On Thursday, January 21, 2021, 10:49:14 AM EST, Martyn B wrote:
>> On 2021-01-21 11:13, Ken Brown via Cygwin wrote:
>>> There's also /etc/bash.bash_logout.  The default version of that clears the screen:
>>> 
>>> $ cat /etc/defaults/etc/bash.bash_logout
>>> [...]
>>> # base-files version 4.3-2
>>> 
>>> # /etc/bash.bash_logout: executed by bash(1) when login shell exits.
>>> 
>>> # The latest version as installed by the Cygwin Setup program can
>>> # always be found at /etc/defaults/etc/bash.bash_logout
>>> 
>>> # Modifying /etc/bash.bash_logout directly will prevent
>>> # setup from updating it.
>>> 
>>> # System-wide bashrc file
>>> 
>>> # when leaving the console clear the screen to increase privacy
>>> if [ "$SHLVL" = 1 ]; then
>>>    [ -x /usr/bin/clear ] && /usr/bin/clear
>>> fi

>> 1) understand why this happens. - Is this the Cygwin standard behavior?

> Not in the slightest.

It appears to be so:

$ cygcheck -f /etc/defaults/etc/bash.bash_logout
base-files-4.3-2
$ ls /etc/**/*bash_logout
/etc/bash.bash_logout  /etc/defaults/etc/bash.bash_logout
$ zgrep bash_logout /etc/**/base-files*
/etc/preremove/base-files-manifest.lst:etc/bash.bash_logout
/etc/setup/base-files.lst.gz:etc/defaults/etc/bash.bash_logout

Whether it should be is a good question.

There's no /etc/bash_logout file under Debian, etc. but /etc/skel/.bash_logout 
and ~/.bash_logout also have the same clear screen code.

Is (or was) /etc/bash.bash_logout that did this in the bash sources or under 
Fedora, which is the Linux basis for some Cygwin approaches, behaviour, and 
conventions?

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]


More information about the Cygwin mailing list