[erlang-questions] clarify: run_erl and ssh

Patrik Nyblom pan@REDACTED
Thu Dec 20 10:49:15 CET 2012


On 12/19/2012 08:37 AM, Bengt Kleberg wrote:
> Greetings,
>
> How do I get the prompt when pressing "ENTER" when I use "ssh" to start
> Erlang with "run_erl"?
>
> I have this script:
>
> #! /bin/sh
> run_erl -daemon /tmp/eleberg/ /tmp/eleberg/ "exec erl"
>
> It can be run like this:
> sekic1152 [8:24am] [/home/eleberg] -> ./afile
>
> And I get a nice interaction:
>
> sekic1152 [8:26am] [/home/eleberg] -> to_erl /tmp/eleberg/
> Attaching to /tmp/eleberg/erlang.pipe.1 (^D to exit)
>
>
> 1> q().
> ok
> 2> [End]
>
> For the second example I use "ssh" and the nice interaction gets worse:
>
> sekic1152 [8:26am] [/home/eleberg] -> ssh sekic1152 ./afile
> These computer resources, specifically Internet access and E-mail, are
> ...
> IF YOU ARE NOT AN AUTHORIZED USER, PLEASE EXIT IMMEDIATELY.
> sekic1152 [8:26am] [/home/eleberg] ->
>
>
> sekic1152 [8:26am] [/home/eleberg] -> to_erl /tmp/eleberg/
> Attaching to /tmp/eleberg/erlang.pipe.1 (^D to exit)
>
> ^R
>
>
>
>
> q().
> ok
> 2> [End]
>
>
> How can I persuade the prompt (1>) to show up upon "CR" in the second
> example?
I guess the PTY does not get initialized correctly when you run via ssh. 
I'd try something like setting TERM=vt100 before the run_erl to inform 
the program that you have a terminal capable of running "newshell", i.e. 
the interactive shell we're all used to.
>
> This is not important, as you can see it is possible to give command in
> the Erlang shell. I can even see them, which is nice. But pressing "CR"
> does not print the prompt and I would like that.
>
>
> bengt
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
CHeers,
/Patrik



More information about the erlang-questions mailing list