How can I use a bash shell in emacs (M-x shell) when I am trying to connect restart a GNU screen session (on a remote ssh connection)? When I try it, I get:

avilella@remote-machine-002~$ bash
avilella@remote-machine-002 ~ > screen -RD
Clear screen capability required.

If I try it on a bog-standard terminal, I can restart the same screen session without a problem.


I'd say 'good luck'. From what I remember, and what I just tried, emacs does not handle full terminal support under the shell command. For example, in an emacs shell, I try:

$ less /etc/hosts
WARNING: terminal is not fully functional
/etc/hosts (press RETURN)

Then less begins to act like it is a dumb terminal (TERM=dumb less /etc/hosts from a regular terminal).

I'm sure that you can set terminal settings inside emacs using elisp, but that doesn't mean that the shell applet will honor them.

  • An Emacs shell buffer does not use a pseudo-terminal, so I agree with @Arcege here. You may have some luck using the terminal-emulator command, which does allocate a pty. – Fran May 30 '12 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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