[erlang-questions] starting multiple erlang nodes with a single command
kid_a
loris.fichera@REDACTED
Fri May 7 20:28:26 CEST 2010
Jon Meredith wrote:
> Have you looked at the slave() module?
>
> If you're using X11 you might be able to do something like this from
> inside erlang
>
> start_displays() ->
> {ok, D1} = slave:start(net_adm:localhost(), display1, " -env DISPLAY "
> ++ net_adm:localhost() ++ ":1 "),
> {ok, D2} = slave:start(net_adm:localhost(), display2, " -env DISPLAY "
> ++ net_adm:localhost() ++ ":2 "),
> {D1, D2}.
>
> You'll need to start erlang as a named node (erl -name master), then you
> should be able to access them using the node names in the return tuple.
> Then just use rpc:call to start up whatever you need (or tweak the
> startup args if you prefer).
It seems to be what I was looking for. Thank you. :)
Loris
--
[ "let me take you down, 'cos i'm going to Strawberry Fields." ]
[ Loris Fichera a.k.a. kid_a | HOME http://www.kida.netsons.org ]
[ Visiting Student @ Uni of Herts | l.fichera@REDACTED ]
[ JABBER loris[dot]fichera[at]gmail[dot]com |GPG key ID 179FC4DD ]
More information about the erlang-questions
mailing list