| |||
Garbage chars after remote login Posted by neo (The Architect), 14 June 2005 I don't know if I have asked this question before (I have been having the prob for a long time now)I use an expect script to login to my remote machine. After send'ing the username and password I am prompted for the term type (xterm?) to which I send a "\r" I then do a interact. This works fine but if I do anything else (a send etc to telnet to another machine) I get garbage chars after the prompt appears and when I try to type a command. It looks like some termcap chars (not really sure). Is there anything I can do to avoid this garbage chars? Posted by admin (Graham Ellis), 14 June 2005 Have you tried sending dumb\r or tty\r when asked for the terminal type? I'm pretty sure that your analysis that they're termcap characters is correct, and if you say you're a dumbe terminal rather than the default (which may well be ANSI or VT100) then it should help.Posted by neo (The Architect), 15 June 2005 Thanks a lot Graham. You are a genius . Works like a charm now. Posted by neo (The Architect), 15 June 2005 Hi again,A friend wanted this script and so I gave it to him. He is now getting this same porblem. I went to his place and tried it out myself and saw that when he logs in he is not asked for the term type. (I think it assumes xterm) Is there any workaround for this? Posted by admin (Graham Ellis), 15 June 2005 Yes - he'll be able to send an extra command when he enters interact mode ... something like:export TERM=dumb The exact command / format to use will depend on which shell he's using. Posted by neo (The Architect), 17 June 2005 But the garbage chars come before the prompt appears. Posted by admin (Graham Ellis), 17 June 2005 You're using expect to establish the connection and get to the prompt in the first place, right? In which case, an extra send / expect sequence (using a globbed or regex match to await the prompt no matter what terminal mode is set as default) should do the trick This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
| |||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |