[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

^M in remote prompt

From: Canellas
Subject: ^M in remote prompt
Date: Fri, 9 Dec 2011 15:43:36 -0200


Michael help me a lot, but I still can not log into a HP UX using emacs + tramp.

The problem is caused, I believe, by the remote script, executed after I type the password, which displays a bunch of text, where the last line is:

 "Teste de Sistemas        - TST2CADM - Kenan/BP 11^M"

(the ^M is not actually displayed, as it is a non-printable char, but it is there).

Then comes a new line, and the script waits for input (I want the number '3' to be automatically typed).

In the long text printed by the remote script there are othe non-printable chars, like ^[2.

In my .emacs I have:

(defconst dpa-prompt "Teste de Sistemas        - TST2CADM - Kenan/BP 11^M" )

(defun dpa-action (proc vec) "Resposta ao script q roda na dpa."
    (with-current-buffer (tramp-get-connection-buffer vec)
      (tramp-message vec 6 "\n%s" (buffer-string))
      (tramp-send-string vec "3"))))

(add-to-list 'tramp-actions-before-shell
             '(dpa-prompt dpa-action))

Would any one, please, help on that?

Thansk a lot,

    Rodrigo Canellas

    Programador C++
    Fotógrafo amador

reply via email to

[Prev in Thread] Current Thread [Next in Thread]