Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

Dialog is a utility that provides dialog boxes from shell scripts, you may have seen them in aptitude during upgrades. When i use Emacs shell (M-x shell) and type sudo aptitude safe-upgrade, i get the following error several times:

debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline

Why doesn't Dialog work with Emacs shell? And should i use some substitute?

share|improve this question
up vote 5 down vote accepted

Dialog uses ncurses, which doesn't work in Emacs' shell-mode, and according to SO: "What would be a good alternative to ncurses that will work under emacs shell?", there's no suitable alternative to ncurses that would work in emacs-shell, but it hints to full terminal capabilities of other Emacs' modes (which unfortunately I know nothing about), maybe Multi Term?

share|improve this answer
I tried to use whiptail, which uses libnewt instead of ncurses, and it said Your terminal lacks the ability to clear the screen or position the cursor. And i don't think multiterm supports ncurses. – Mirzhan Irkegulov Mar 19 '12 at 10:14
There's also Ansi Term and EShell, maybe some combination of all these works (I don't know which, sorry). Apparently Ansi Term can run mutt but I couldn't find out if that's linked against ncurses or slang. – sr_ Mar 19 '12 at 10:21
Whether it's linked against ncurses, slang, or just sending out raw terminal directives (the horror), for a full-screen application to run on a terminal, that terminal must understand terminal directives (i.e. it's up to the terminal, not the library), and the OS must have an appropriate termcap/terminfo entry for it. By definition, a dumb terminal is one that doesn't grok terminal directives. Without them, you're limited to outputting characters (including ASCII control chars). No cursor repositioning, character attributes, clearing the screen etc. It's basically an ASR-33. – Alexios Mar 19 '12 at 11:51
With a sufficiently new Emacs, M-x term does work with a graphical debconf, but you may need to pull in additional dependencies. Tangentially, see also bugs.launchpad.net/ubuntu/+source/emacs24/+bug/1285864 which suggests installing ncurses-term. – tripleee Jun 29 '15 at 3:45

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.