Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having trouble running htop within an ansi-term in Emacs 24.2. It looks like some of the control characters are not interpreted correctly.

I thought ansi-term was capable of handling font control characters. Is there a way to have ansi-term work with graphical console applications?

share|improve this question

It works for me. Without a screenshot, there's not enough information in the question to guess what you were seeing. By the way, TERM=eterm-color (some users override TERM, which won't work well).

Here is a screenshot to illustrate the graphic characters:

enter image description here

If one sets TERM to xterm (something frequently done...), you can see it works not as well:

enter image description here

Without overriding TERM, htop looks fine:

enter image description here

but again, setting TERM=xterm works not as well:

enter image description here

Further reading:

share|improve this answer

I have tried replicating your issue and I don't see the problem. I was able to run htop in ansi-term mode both in my tty window (using -nw) and in the graphical window.

share|improve this answer
Hmm, I am running Emacs 24.2 and while I am able to run htop within ansi-term, some of the characters are clearly not displayed correctly (e.g. at the top left of the window). I have also tried with emacs -Q and the problem persists. – Amelio Vazquez-Reina Dec 6 '12 at 23:24
@user815423426: Does changing the shell emacs uses fix the behavior? When entering emacs' term-mode, my emacs defaults to /bin/bash, and htop looks mangled. If I ask emacs to use /bin/dash, htop displays correctly. – jthetzel Sep 4 '14 at 11:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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