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.

When I remotely log into one linux terminal, the terminal repeats what I type automatically, which makes the screen a big mess. I can recover the screen by typing ctrl+L. Does anyone know what's the cause and what's the solution?

I'm using mac terminal and ssh.

PS1=[\e]0;\u@\h: \w\a]${debian_chroot:+($debian_chroot)}[\033[01;32m]\u@\h[\033[00m]:[\033[01;34m]\w[\033[00m]\$

Thanks,

share|improve this question

migrated from stackoverflow.com Nov 1 '10 at 18:08

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

    
Which terminal - an Xterm window? –  verisimilidude Nov 1 '10 at 18:06
    
A number of people have voted to close this question as off-topic - can anyone suggest a better forum for it? –  Mark Bannister Nov 1 '10 at 18:07
    
Which protocol? Telnet or SSH? Which client? Which OS on client and server? –  thejh Nov 1 '10 at 18:07
    
@Mark Bannister: superuser.com maybe? –  klez Nov 1 '10 at 18:08
    
I'm assuming you're using Bash, can you provide us the value of the variable PS1? –  cYrus Nov 1 '10 at 18:15

1 Answer 1

up vote 0 down vote accepted

Edit your remote ~/.bashrc (or whatever) to change the value of the variable PS1 to something simpler like:

PS1='\u@\h:\w\$ '

and try again. If it works there must be some mess with the control characters in your PS1.

share|improve this answer
    
It works. Thanks, –  derekwei Nov 1 '10 at 18:32
    
If you want the color version try something like: PS1='\[\e[01;32m\]\u@\h\[\e[00m\]:\[\e[01;34m\]\w\[\e[00m\]\$ '. It should be similar to the one in your answer, but correct. –  cYrus Nov 1 '10 at 18:35

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.