extra console/shell

Per Hedeland <>
Mon Jul 1 11:58:04 CEST 2002

"Vlad Dumitrescu" <> wrote:
>I wonder if there is (or if you think too there should be) a general way to 
>connect to an erlang node via additional consoles, creating several 
>unrelated shells.

Besides what has already been mentioned, there is of course the "remote
shell" built into the "job control" - requires that the node is running
distributed though, and that you can run Erlang on the system you want to
connect from. E.g. if you want another shell on the node '',
just connect to it from another node (here ''):

Eshell V5.0.1.1.b4  (abort with ^G)
()1> ^G
User switch command
 --> r ''
 --> c
Eshell V5.0.1.1.b4  (abort with ^G)

You can create any number of shells that way AFAIK (plus of course you
can create additional "local" shells the same way), but the interface for
switching between them is perhaps a tad awkward for those that aren't
used to traditional Unix "job control"...:-) - unless you fire up one
node for each shell, then you can of course switch between them whichever
way you like.

Note also that this remote shell is actually authenticated (via the
erlang cookies) - having something that "drops right into an erlang
shell" listening on a TCP port in a production system is not such a hot
idea if you care about security:-), but it should be fine for

>If my memory serves me right, on Solaris there is a to_erl utility, but I 
>think it only allows connecting to the active shell, not create a new one.

Yes, and it's a hack (I wrote the original version:-) that has no real
business being included with Solaris, I think. I did it for the VxWorks
port, where it made some sense, since on such systems you typically don't
have window systems or job control, and frequently only a single serial
port through which you may need to access both the VxWorks shell and the
Erlang shell.

So you give the serial port to the VxWorks shell, and fire up Erlang
behind a pseudo-tty ('start_erl' did this IIRC) - and then you can run
to_erl from the VxWorks shell to talk to that pseudo-tty, returning to
the VxWorks shell when to_erl finishes (on ^D).

--Per Hedeland

More information about the erlang-questions mailing list