Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have two problems, in both cases the problem usually occurs when I resize my terminal client xterm.

  1. When ssh'd into a server all the output from commands doesn't scroll. It doesn't happen right away.
  2. Occasionally the margins don't resize when the client resizes.

I have seen an article on a command to run to fix this, but I can't seem to find it again.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You can force a reset of terminal state -- reset command might work. If it doesn't, send a RIS sequence to xterm -- printf "\033c"

share|improve this answer
add comment

The resize command should fix this. Try

eval `resize`

if you are in the bash shell (note the backticks).

Here's a reference.

share|improve this answer
    
What if the remote machine doesn't have xterm? –  frogstarr78 Jan 19 '11 at 16:47
    
I think (despite what that article says) that resize works in many other shells besides xterm. Is that what you are asking? –  Phil Hollenback Jan 19 '11 at 17:29
    
yes. my experience says otherwise though. –  frogstarr78 Jan 21 '11 at 21:22
    
...at least on a redhat distro. –  frogstarr78 Jan 28 '11 at 17:38
    
This doesn't seem to help either: shopt -s checkwinsize –  frogstarr78 Apr 27 '11 at 17:00
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.