Skip to content

Latest commit

 

History

History
64 lines (43 loc) · 2.02 KB

File metadata and controls

64 lines (43 loc) · 2.02 KB

Remote M-x matlab-shell

You can use Emacs TRAMP to run matlab-shell on a remote system.

  1. First verify you can connect to the remote system in a terminal

    For example, we can use ssh to connect:

    ssh user@system pwd
        

    You should configure your ssh keys to avoid prompting, which will make things smoother with Emacs.

  2. In Emacs visit a remote location.

    A typical method is to use File menu to visit a file or C-x C-f

    C-x C-f
    Find File: /ssh:USER@SYSTEM:~
        

    will open dired-mode to the USER home (~) directory on the remote SYSTEM.

  3. Run matlab-shell

    With the current buffer as a remote location, e.g. dired-mode buffer of a remote location, run:

    M-x matlab-shell
        

    matlab-shell will copy files to the remote system and place them in ~/.emacs-matlab-shell/. These are needed for matlab-shell to work correctly on the remote system.

    If you get a message that Emacs couldn’t find matlab on the remote system, you need to tell Emacs where matlab is located and there are several ways to do this, see How TRAMP finds and uses programs on remote host. For example, suppose your remote system is Linux and you are using the Bash shell. You can setup your remote /ssh:USER@HOST:~/.profile to place the location of MATLAB on your PATH:

    # ~/.profile
    PATH=/usr/local/MATLAB/Ryyyyab/bin/$PATH     # Replace Ryyyyab with the MATLAB release you are using
    export PATH
        

    After that you can add to your local ~/.emacs,

    (eval-after-load
        '(add-to-list 'tramp-remote-path 'tramp-own-remote-path))