0

When I run the erl shell my .erlang file is evaluated and loads in my shell_default module (shell_default:c(ShellDefaultFilePath).). I can use all the functions defined in my shell_default module directly in the shell. In a remote shell the functions from my shell_default are not present. My remote shell (remsh) is connected to an Erlang node on a remote host via SSH port forwarding so I thought it may have been evaluating the .erlang file on the remote server, but I verified that my local .erlang file is evaluated by adding an io:format/2 call to the end of the file and I saw the message printed out when I start the remsh.

Why aren't my shell_default functions not loaded in remote shells? And is there a workaround to get my shell_default functions loaded?

juan.facorro
  • 9,791
  • 2
  • 33
  • 41
Stratus3D
  • 4,648
  • 4
  • 35
  • 67
  • Where is the `.erlang` file located in the remote host? Is it in the home folder of the user that starts the Erlang VM? The `.erlang` in your local host won't make any difference when connecting to the remote Erlang node with the `-remsh` option. – juan.facorro Mar 04 '17 at 14:27
  • @juan.facorro The remote node is on a different server, and I'm not sure what the contents of it were when I discovered this. It still seems odd that my local `.erlang` file was evaluated. I'll try setting up the `.erlang` file and `shell_default` module on the remote server and see if that fixes the issue. – Stratus3D Mar 04 '17 at 22:05

0 Answers0