Linux Mint 18.1 (64 bit) Xfce, Emacs 25.3

If I want to connect(via ssh) to remote Linux macnine I do next step:

  1. Open terminal
  2. ssh -oStrictHostKeyChecking=no [email protected]

As result I success connect to remote machine. In remote machine I start Midnight Commander by mc. And it's start success. Nice.

So I want to do same steps by Emacs 25.3

My steps:

  1. M-x shell

  2. ssh -oStrictHostKeyChecking=no [email protected]

As result I success connect to remote machine. But when I try to start Midnight Commander by mc I get error:

Your terminal lacks the ability to clear the screen or position the cursor.
  • Note that M-x shell provides only a "dumb terminal", whereas M-x term is a very capable terminal emulator.
    – phils
    Commented Mar 4, 2018 at 20:37

2 Answers 2


Use M-x term instead of M-x shell. shell isn't a terminal emulator, term is. Also a hint: term-mode has two submodes, line-mode and char-mode. You can switch between them with C-c C-k and C-c C-j. line-mode is more like a normal Emacs buffer, e.g. you don't have a lot of Emacs key bindings like M-x in char-mode.

  • I try open terminal by M-x term. I try two mode: line-mode and char-mode. I success connect to remote Unix machine. By when I try to start Midnight Commadner (mc) I get error: Unknown terminal: eterm-color Check the TERM environment variable. Also make sure that the terminal is defined in the terminfo database. Alternatively, set the TERMCAP environment variable to the desired termcap entry. Commented Feb 3, 2018 at 10:27
  • 1
    – jpkotta
    Commented Feb 3, 2018 at 20:59
  • Or if it's easier, install Emacs on the remote machine, that should add the eterm-color termcap entry.
    – jpkotta
    Commented Feb 3, 2018 at 21:00

Use Tramp. Open in your local Emacs C-x C-f /ssh:[email protected]:

  • Success connect to remote machine by Tramp mode. OK. How start Midnigt Commander? Commented Feb 1, 2018 at 12:28
  • Well, don't know whether Midnight Commander could / should be started inside Emacs. You have dired, which gives you already some of its features. And on the EmacsWiki, some other packages are mentioned, like mc.el emacswiki.org/emacs/MidnightCommanderMode and sunrise-commander.el emacswiki.org/emacs/Sunrise_Commander - I haven't tried them yet. Commented Feb 1, 2018 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.