Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Interactive programs and dumb terminals (emacs shell)

3 views
Skip to first unread message

john maclean

unread,
Jul 12, 2006, 12:12:25 PM7/12/06
to help-gn...@gnu.org
Hey Chaps,

I've been using M-x shell recently and getting the hang of the
difference between this shell and say /bin/bash.

My question is in the cases where one installs a program (via say
apt-get -y install foo) which then prompts you for some configuration
settings. The emacs shell is a "dumb terminal" as I understand it and
interactive programs that use ncurses
won't work. Install latex, tetex or xorg and you'll get asked system
settings like your resolution, paper size etc.

How can I over come this? ( Hope that this is all clear).


--
John Maclean - 07739 171 531
MSc (DIC)


Markus Triska

unread,
Jul 12, 2006, 12:29:56 PM7/12/06
to
"john maclean" <jay...@gmail.com> writes:
>
> How can I over come this? ( Hope that this is all clear).
>

M-x term ?

harry meyers

unread,
Jul 12, 2006, 12:34:18 PM7/12/06
to

john maclean schrieb:

You can use M-x term which activates /bin/bash by default.

harry

Pascal Bourguignon

unread,
Jul 12, 2006, 2:40:53 PM7/12/06
to
"john maclean" <jay...@gmail.com> writes:

> Hey Chaps,
>
> I've been using M-x shell recently and getting the hang of the
> difference between this shell and say /bin/bash.

What difference?

Here, M-x shell RET echo $SHELL RET
prints: /bin/bash


> My question is in the cases where one installs a program (via say
> apt-get -y install foo) which then prompts you for some configuration
> settings. The emacs shell is a "dumb terminal" as I understand it and

You are understanding wrong.

The shell is the shell, and the terminal is the terminal. Two
different unrelated things.

The shell program run under M-x shell is most probably /bin/bash,
unless you've configured another shell.

The terminal emulator run under M-x shell is emacs, and emacs is
nearly dumb. (There are emacs and dumb entries in termcap).

The dumbness is in the lack of cursor movement control sequence for
the emacs (and dumb) terminal emulators, (and unless your activate M-x
ansi-color-for-comint-mode-on, lack of color, blink, etc).


> interactive programs that use ncurses won't work.

Yes.

> Install latex, tetex or xorg and you'll get asked system
> settings like your resolution, paper size etc.
>
> How can I over come this? ( Hope that this is all clear).

M-x term RET
or:
M-x terminal-emulator RET

Another possibility is to use: xterm -display :0.0 -e apt-get install stuff &
in M-x shell.
You could even make an alias; put this in ~/.emacs_bash :

export TERM=emacs
export PAGER=cat
alias less=cat
alias more=cat
alias apt-get='xterm -display :0.0 -e apt-get'
stty rows 10000 coluns 80
echo '# Welcome to emacs shell'

--
__Pascal Bourguignon__ http://www.informatimago.com/

"Remember, Information is not knowledge; Knowledge is not Wisdom;
Wisdom is not truth; Truth is not beauty; Beauty is not love;
Love is not music; Music is the best." -- Frank Zappa

Miles Bader

unread,
Jul 12, 2006, 8:09:55 PM7/12/06
to help-gn...@gnu.org
Pascal Bourguignon <p...@informatimago.com> writes:
> alias apt-get='xterm -display :0.0 -e apt-get'

Well the basic point is good, but for apt-get in particular, why?

apt-get should work fine in Emacs shell mode... shell mode basically
implements a dumb terminal, but it _can_ handle stuff like using
carriage-return to update a single-line progress display -- and that's
basically all that apt-get uses.

-Miles

--
Is it true that nothing can be known? If so how do we know this? -Woody Allen


Tim X

unread,
Jul 14, 2006, 1:15:59 AM7/14/06
to
"john maclean" <jay...@gmail.com> writes:

A couple of things possibly worth trying out.

1. apt-get can be configured to use text mode rather than a gui style
interface, such as with dialog or whiptail etc. So, if you are
configured for text mode, then you should be able to run apt-get
within a 'dumb' terminal without any problems.

2. Instead of using M-x shell, you could try M-x term. This is a more
sophisticated terminal emulator and will probably support curses
based apps.

Tim

--
tcross (at) rapttech dot com dot au

0 new messages