Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This is the situation: I open a terminal in Ubuntu, and do ssh host-1, which works as expected. From host-1, I do ssh host-2, which again works fine and connects me to host-2. From host-2 I do, for example, echo "blah", which prints blah to the screen. Problem: If I do exit, the screen is cleared, and I am left with only the following:

Connection to host-2 closed.
myusername$

How can I prevent the clearing of output from the screen generated by commands run on host-2 (i.e. blah, etc.), after I exit back to host-1?

Some debugging I've already done: I've had a friend login to host-1 and host-2, exactly as above, and when he exit's from host-2, his screen is NOT cleared. So it must be something to do with my environment...right? Any ideas what it could be?

I've tried this using PuTTY in Windows XP, and from a terminal in Ubuntu - same behaviour regardless.

Thanks in advance! Roy

share|improve this question

migrated from stackoverflow.com Sep 8 '10 at 11:14

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

Check ~/.bash_logout

It probably contains "clear" command. Comment that out.

Also, in a lot of terminals, (e.g. gnometerm) you can just scroll back up and see what was "cleared".

share|improve this answer
    
Yep, it was in ~/.bash_logout. Thanks :) –  Roy Mar 13 '09 at 21:39
    
thanks. that's been driving me nuts for a while. :) –  Tim Kennedy Oct 31 '11 at 14:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.