public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Terminal output disappearing after SSH into cygwin
@ 2021-01-21 13:08 Martyn B
  2021-01-21 13:13 ` Takashi Yano
  2021-01-21 15:13 ` Marco Atzeri
  0 siblings, 2 replies; 19+ messages in thread
From: Martyn B @ 2021-01-21 13:08 UTC (permalink / raw)
  To: cygwin

Hi list!

Usually after an ssh session, the lines in my terminal are persistant 
after exiting the session. This is what I need.

But at the moment when I exit an ssh session into Cygwin, the terminal 
gets cleared and all session information is lost.

How can I change this behavior? I need the commands and their output.

Server: Cygwin 3.1.4-1 on Windows 10 (1909), CYGWIN cygsshd
Client: Ubuntu 20.04 / Gnome terminal, xterm

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-21 13:08 Terminal output disappearing after SSH into cygwin Martyn B
@ 2021-01-21 13:13 ` Takashi Yano
  2021-01-21 13:29   ` Takashi Yano
  2021-01-21 15:13 ` Marco Atzeri
  1 sibling, 1 reply; 19+ messages in thread
From: Takashi Yano @ 2021-01-21 13:13 UTC (permalink / raw)
  To: cygwin

On Thu, 21 Jan 2021 14:08:45 +0100
Martyn B wrote:
> Hi list!
> 
> Usually after an ssh session, the lines in my terminal are persistant 
> after exiting the session. This is what I need.
> 
> But at the moment when I exit an ssh session into Cygwin, the terminal 
> gets cleared and all session information is lost.
> 
> How can I change this behavior? I need the commands and their output.
> 
> Server: Cygwin 3.1.4-1 on Windows 10 (1909), CYGWIN cygsshd
> Client: Ubuntu 20.04 / Gnome terminal, xterm

Please update cygwin to 3.1.7.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-21 13:13 ` Takashi Yano
@ 2021-01-21 13:29   ` Takashi Yano
  2021-01-21 14:45     ` Martyn B
  0 siblings, 1 reply; 19+ messages in thread
From: Takashi Yano @ 2021-01-21 13:29 UTC (permalink / raw)
  To: cygwin

On Thu, 21 Jan 2021 22:13:53 +0900
Takashi Yano via Cygwin <cygwin@cygwin.com> wrote:
> On Thu, 21 Jan 2021 14:08:45 +0100
> Martyn B wrote:
> > Hi list!
> > 
> > Usually after an ssh session, the lines in my terminal are persistant 
> > after exiting the session. This is what I need.
> > 
> > But at the moment when I exit an ssh session into Cygwin, the terminal 
> > gets cleared and all session information is lost.
> > 
> > How can I change this behavior? I need the commands and their output.
> > 
> > Server: Cygwin 3.1.4-1 on Windows 10 (1909), CYGWIN cygsshd
> > Client: Ubuntu 20.04 / Gnome terminal, xterm
> 
> Please update cygwin to 3.1.7.

Sorry, I might misunderstand your problem.

Does your problem happen when you exit from ssh session to cygwin?
If so, are you using ~/.bash_logout (for bash) or ~/.logout (for tcsh)?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-21 13:29   ` Takashi Yano
@ 2021-01-21 14:45     ` Martyn B
  2021-01-21 17:28       ` Takashi Yano
  0 siblings, 1 reply; 19+ messages in thread
From: Martyn B @ 2021-01-21 14:45 UTC (permalink / raw)
  To: cygwin

Takashi Yano via Cygwin wrote on 21.01.21 14:29:
> Takashi Yano via Cygwin <cygwin@cygwin.com> wrote:
>>
>> Please update cygwin to 3.1.7.
> 
> Sorry, I might misunderstand your problem.
> 
> Does your problem happen when you exit from ssh session to cygwin?
> If so, are you using ~/.bash_logout (for bash) or ~/.logout (for tcsh)?
> 

Thanks for asking.

Cygwin version is 3.1.7 now

This is exactly what happens:

-------------------------------------------------
     (1) Screen looks like this:
-------------------------------------------------

martyn@linuxbox:~$ echo local command 1
local command 1
martyn@linuxbox:~$ echo local command 2
local command 2
martyn@linuxbox:~$ ssh Winuser@<remote IP>

-------------------------------------------------
     hit RETURN
-------------------------------------------------
     (2) Screen looks like this:
-------------------------------------------------

martyn@linuxbox:~$ echo local command 1
local command 1
martyn@linuxbox:~$ echo local command 2
local command 2
martyn@linuxbox:~$ ssh Winuser@<remote IP>
Last login: Thu Jan 21 14:52:35 2021 from <local IP>

Winuser@WINDOWS-BOX ~
$ echo I want to keep this output
I want to keep this output

Winuser@WINDOWS-BOX ~
$ vim /home/Winuser/editing-testtext.txt

Winuser@WINDOWS-BOX ~
$ ls /home/Winuser/editing-testtext.txt
/home/Winuser/editing-testtext.txt

Winuser@WINDOWS-BOX ~
$ exit

-------------------------------------------------
     hit RETURN
-------------------------------------------------
     (3) Screen looks like this:
-------------------------------------------------

Connection to <remote IP> closed.
martyn@linuxbox:~$ echo all lines are gone
all lines are gone
martyn@linuxbox:~$

-------------------------------------------------
     ADDITIONAL INFORMATION
-------------------------------------------------
- same behavior if I use "exit" or "logout".
     "bash_logout" gives me "command not found"
- shell is /bin/bash on both sides
- the command "cygcheck -c Cygwin" clears the local lines from
     screen (1) immediately even _before_ exit


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-21 13:08 Terminal output disappearing after SSH into cygwin Martyn B
  2021-01-21 13:13 ` Takashi Yano
@ 2021-01-21 15:13 ` Marco Atzeri
  2021-01-21 15:49   ` Martyn B
  1 sibling, 1 reply; 19+ messages in thread
From: Marco Atzeri @ 2021-01-21 15:13 UTC (permalink / raw)
  To: cygwin

On 21.01.2021 14:08, Martyn B wrote:
> Hi list!
> 
> Usually after an ssh session, the lines in my terminal are persistant 
> after exiting the session. This is what I need.
> 
> But at the moment when I exit an ssh session into Cygwin, the terminal 
> gets cleared and all session information is lost.
> 
> How can I change this behavior? I need the commands and their output.
> 
> Server: Cygwin 3.1.4-1 on Windows 10 (1909), CYGWIN cygsshd
> Client: Ubuntu 20.04 / Gnome terminal, xterm

very simple:

ssh <your connection> |& tee /tmp/ssh.log


you can also use screen logging capability
https://stackpointer.io/unix/linux-ssh-session-logging/564/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-21 15:13 ` Marco Atzeri
@ 2021-01-21 15:49   ` Martyn B
  2021-01-21 16:02     ` matthew patton
  0 siblings, 1 reply; 19+ messages in thread
From: Martyn B @ 2021-01-21 15:49 UTC (permalink / raw)
  To: cygwin

Marco Atzeri via Cygwin wrote on 21.01.21 16:13:
> 
> very simple:
> 
> ssh <your connection> |& tee /tmp/ssh.log
> 
> 
> you can also use screen logging capability
> https://stackpointer.io/unix/linux-ssh-session-logging/564/

Thanks for the suggestions. I am aware of tee and screen and might as 
well even copy/paste the screen content before I terminate the connection.

Still I'd prefer to
1) understand why this happens. - Is this the Cygwin standard behavior?
2) thus hopefully learn a solution that keeps my server logins uniform 
and leaves the chronology of the terminal window lines untouched

I've posted the exact output and some additional information here:
https://sourceware.org/pipermail/cygwin/2021-January/247546.html






^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-21 15:49   ` Martyn B
@ 2021-01-21 16:02     ` matthew patton
  2021-01-22  8:16       ` Brian Inglis
  0 siblings, 1 reply; 19+ messages in thread
From: matthew patton @ 2021-01-21 16:02 UTC (permalink / raw)
  To: cygwin


    On Thursday, January 21, 2021, 10:49:14 AM EST, Martyn B <mb@stefanist.com> wrote:  
 > 1) understand why this happens. - Is this the Cygwin standard behavior?

Not in the slightest.
  

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-21 14:45     ` Martyn B
@ 2021-01-21 17:28       ` Takashi Yano
  2021-01-21 18:13         ` Ken Brown
  0 siblings, 1 reply; 19+ messages in thread
From: Takashi Yano @ 2021-01-21 17:28 UTC (permalink / raw)
  To: cygwin

On Thu, 21 Jan 2021 15:45:28 +0100
Martyn B wrote:
> - same behavior if I use "exit" or "logout".
>      "bash_logout" gives me "command not found"
> - shell is /bin/bash on both sides

What does "cat ~/.bash_logout" say?

> - the command "cygcheck -c Cygwin" clears the local lines from
>      screen (1) immediately even _before_ exit

This is normal behavior of cygwin 3.1.7.
I doubt some non-cygwin program is automatically executed
in ~/.bash_logout .

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-21 17:28       ` Takashi Yano
@ 2021-01-21 18:13         ` Ken Brown
  2021-01-21 18:30           ` Takashi Yano
  0 siblings, 1 reply; 19+ messages in thread
From: Ken Brown @ 2021-01-21 18:13 UTC (permalink / raw)
  To: cygwin

On 1/21/2021 12:28 PM, Takashi Yano via Cygwin wrote:
> On Thu, 21 Jan 2021 15:45:28 +0100
> Martyn B wrote:
>> - same behavior if I use "exit" or "logout".
>>       "bash_logout" gives me "command not found"
>> - shell is /bin/bash on both sides
> 
> What does "cat ~/.bash_logout" say?
> 
>> - the command "cygcheck -c Cygwin" clears the local lines from
>>       screen (1) immediately even _before_ exit
> 
> This is normal behavior of cygwin 3.1.7.
> I doubt some non-cygwin program is automatically executed
> in ~/.bash_logout .

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

Ken

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-21 18:13         ` Ken Brown
@ 2021-01-21 18:30           ` Takashi Yano
  2021-01-21 19:06             ` matthew patton
  2021-01-21 19:32             ` Ken Brown
  0 siblings, 2 replies; 19+ messages in thread
From: Takashi Yano @ 2021-01-21 18:30 UTC (permalink / raw)
  To: cygwin

On Thu, 21 Jan 2021 13:13:56 -0500
Ken Brown wrote:
> # when leaving the console clear the screen to increase privacy
> if [ "$SHLVL" = 1 ]; then
>    [ -x /usr/bin/clear ] && /usr/bin/clear
> fi

That should be the culprit. 
Is editing /etc/bash.bash_logout the right thing?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-21 18:30           ` Takashi Yano
@ 2021-01-21 19:06             ` matthew patton
  2021-01-21 19:32             ` Ken Brown
  1 sibling, 0 replies; 19+ messages in thread
From: matthew patton @ 2021-01-21 19:06 UTC (permalink / raw)
  To: cygwin, Takashi Yano

On Thursday, January 21, 2021, 01:30:41 PM EST, Takashi Yano via Cygwin <cygwin@cygwin.com> wrote:
 
 
 On Thu, 21 Jan 2021 13:13:56 -0500
Ken Brown wrote:
> # when leaving the console clear the screen to increase privacy
> if [ "$SHLVL" = 1 ]; then
>    [ -x /usr/bin/clear ] && /usr/bin/clear
> fi

That should be the culprit. 
Is editing /etc/bash.bash_logout the right thing?

Yes. and furthermore REVERT that little cherry-bomb. Put the lines in and commented-out is fine. It's not OK to screw with people's environment like that.
  

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-21 18:30           ` Takashi Yano
  2021-01-21 19:06             ` matthew patton
@ 2021-01-21 19:32             ` Ken Brown
  1 sibling, 0 replies; 19+ messages in thread
From: Ken Brown @ 2021-01-21 19:32 UTC (permalink / raw)
  To: cygwin

On 1/21/2021 1:30 PM, Takashi Yano via Cygwin wrote:
> On Thu, 21 Jan 2021 13:13:56 -0500
> Ken Brown wrote:
>> # when leaving the console clear the screen to increase privacy
>> if [ "$SHLVL" = 1 ]; then
>>     [ -x /usr/bin/clear ] && /usr/bin/clear
>> fi
> 
> That should be the culprit.
> Is editing /etc/bash.bash_logout the right thing?

That's what I do.  The only caveat is that once you edit that file, it will 
never be updated by setup again.  So if there's a new release of base-files, you 
should compare /etc/bash.bash_logout with /etc/defaults/etc/bash.bash_logout to 
see if there are any changes that you want to pick up.

Ken

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-21 16:02     ` matthew patton
@ 2021-01-22  8:16       ` Brian Inglis
  2021-01-22 11:10         ` Marco Atzeri
  2021-01-22 15:27         ` Ken Brown
  0 siblings, 2 replies; 19+ messages in thread
From: Brian Inglis @ 2021-01-22  8:16 UTC (permalink / raw)
  To: cygwin

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.]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-22  8:16       ` Brian Inglis
@ 2021-01-22 11:10         ` Marco Atzeri
  2021-01-22 13:18           ` (SOLVED) " Martyn B
  2021-01-22 16:16           ` Thomas Wolff
  2021-01-22 15:27         ` Ken Brown
  1 sibling, 2 replies; 19+ messages in thread
From: Marco Atzeri @ 2021-01-22 11:10 UTC (permalink / raw)
  To: cygwin

On 22.01.2021 09:16, Brian Inglis wrote:
> 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:
>>>>

> 
> 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?
> 


$ cygcheck -l base-files |grep logout
/etc/defaults/etc/bash.bash_logout

the defaults is copied as
    /etc/bash.bash_logout
only if it was not modified.

The file is there by at least 2016, so not a new implementation

Regards
Marco



^ permalink raw reply	[flat|nested] 19+ messages in thread

* (SOLVED) Re: Terminal output disappearing after SSH into cygwin
  2021-01-22 11:10         ` Marco Atzeri
@ 2021-01-22 13:18           ` Martyn B
  2021-01-22 16:16           ` Thomas Wolff
  1 sibling, 0 replies; 19+ messages in thread
From: Martyn B @ 2021-01-22 13:18 UTC (permalink / raw)
  To: cygwin


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:
...
 > # when leaving the console clear the screen to increase privacy
 > if [ "$SHLVL" = 1 ]; then
 >     [ -x /usr/bin/clear ] && /usr/bin/clear
 > fi


Takashi Yano via Cygwin wrote on 21.01.21 19:30:
 >
 > That should be the culprit.
 > Is editing /etc/bash.bash_logout the right thing?
 >

Yes that's the solution as I own both machines.

Thanks to all, also for the additional information:

https://sourceware.org/pipermail/cygwin/2021-January/247574.html
https://sourceware.org/pipermail/cygwin/2021-January/247581.html
https://sourceware.org/pipermail/cygwin/2021-January/247584.html

Cheers
Martyn

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-22  8:16       ` Brian Inglis
  2021-01-22 11:10         ` Marco Atzeri
@ 2021-01-22 15:27         ` Ken Brown
  1 sibling, 0 replies; 19+ messages in thread
From: Ken Brown @ 2021-01-22 15:27 UTC (permalink / raw)
  To: cygwin

On 1/22/2021 3:16 AM, Brian Inglis wrote:
> 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?

There are two separate issues here.  The first is that Cygwin's bash executes 
/etc/bash.bash_logout.  The second is that the default /etc/bash.bash_logout 
clears the screen.

The first issue is dealt with in the bash sources.  It is an option that is 
disabled by default, but Cygwin's bash maintainer chose to enable it.  That's 
done in the following hunk from bash-4.4.12-3.src.patch:

--- origsrc/bash-4.4/config-top.h	2016-05-19 13:34:02.000000000 -0500
+++ src/bash-4.4/config-top.h	2017-01-27 13:11:50.793821100 -0600
@@ -87,10 +87,10 @@
  #define DEFAULT_BASHRC "~/.bashrc"

  /* System-wide .bashrc file for interactive shells. */
-/* #define SYS_BASHRC "/etc/bash.bashrc" */
+#define SYS_BASHRC "/etc/bash.bashrc"

  /* System-wide .bash_logout for login shells. */
-/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
+#define SYS_BASH_LOGOUT "/etc/bash.bash_logout"

  /* Define this to make non-interactive shells begun with argv[0][0] == '-'
     run the startup files when not in posix mode. */

I've added Eric to the CC in case he wants to comment.

I don't know the history of the second issue, but that's a matter for Achim as 
base-files maintainer.

Ken

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-22 11:10         ` Marco Atzeri
  2021-01-22 13:18           ` (SOLVED) " Martyn B
@ 2021-01-22 16:16           ` Thomas Wolff
  2021-01-23 13:22             ` Martyn B
  1 sibling, 1 reply; 19+ messages in thread
From: Thomas Wolff @ 2021-01-22 16:16 UTC (permalink / raw)
  To: cygwin

[somehow my previous response did not go to the list]

Am 22.01.2021 um 12:10 schrieb Marco Atzeri via Cygwin:
> On 22.01.2021 09:16, Brian Inglis wrote:
>> 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:
>>>>>
>
>>
>> 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?
>>
>
>
> $ cygcheck -l base-files |grep logout
> /etc/defaults/etc/bash.bash_logout
>
> the defaults is copied as
>    /etc/bash.bash_logout
> only if it was not modified.
>
> The file is there by at least 2016, so not a new implementation
The clear is conditional. Maybe the value of $SHLVL after ssh login has 
changed somehow?


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-22 16:16           ` Thomas Wolff
@ 2021-01-23 13:22             ` Martyn B
  2021-01-23 14:50               ` Thomas Wolff
  0 siblings, 1 reply; 19+ messages in thread
From: Martyn B @ 2021-01-23 13:22 UTC (permalink / raw)
  To: cygwin



Thomas Wolff wrote on 22.01.21 17:16:

> The clear is conditional. Maybe the value of $SHLVL after ssh login has 
> changed somehow?

It's 1 like in Cygwin Terminal on the Windows box

martyn@linuxbox:~$ ssh Winuser@<remote IP>
Last login: Sat Jan 23 13:34:48 2021 from <local IP>

Winuser@WINDOWS-BOX ~
$ echo $SHLVL
1

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Terminal output disappearing after SSH into cygwin
  2021-01-23 13:22             ` Martyn B
@ 2021-01-23 14:50               ` Thomas Wolff
  0 siblings, 0 replies; 19+ messages in thread
From: Thomas Wolff @ 2021-01-23 14:50 UTC (permalink / raw)
  To: cygwin

Am 23.01.2021 um 14:22 schrieb Martyn B:
>
>
> Thomas Wolff wrote on 22.01.21 17:16:
>
>> The clear is conditional. Maybe the value of $SHLVL after ssh login 
>> has changed somehow?
>
> It's 1 like in Cygwin Terminal on the Windows box
Yeah, but maybe it wasn't 1 before, when it still worked for you?

>
> martyn@linuxbox:~$ ssh Winuser@<remote IP>
> Last login: Sat Jan 23 13:34:48 2021 from <local IP>
>
> Winuser@WINDOWS-BOX ~
> $ echo $SHLVL
> 1
> -- 
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-01-23 14:50 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-21 13:08 Terminal output disappearing after SSH into cygwin Martyn B
2021-01-21 13:13 ` Takashi Yano
2021-01-21 13:29   ` Takashi Yano
2021-01-21 14:45     ` Martyn B
2021-01-21 17:28       ` Takashi Yano
2021-01-21 18:13         ` Ken Brown
2021-01-21 18:30           ` Takashi Yano
2021-01-21 19:06             ` matthew patton
2021-01-21 19:32             ` Ken Brown
2021-01-21 15:13 ` Marco Atzeri
2021-01-21 15:49   ` Martyn B
2021-01-21 16:02     ` matthew patton
2021-01-22  8:16       ` Brian Inglis
2021-01-22 11:10         ` Marco Atzeri
2021-01-22 13:18           ` (SOLVED) " Martyn B
2021-01-22 16:16           ` Thomas Wolff
2021-01-23 13:22             ` Martyn B
2021-01-23 14:50               ` Thomas Wolff
2021-01-22 15:27         ` Ken Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).