On Mon, Mar 13, 2000 at 04:02:58PM -0500, John Joseph Morgan wrote:
> Hello,
> I get the following when I run top at the command line:
> bad data in /var/run/utmp(null)
> I am running redhat 6.1 with kernel 2.2.12.
> Also this is interesting, I am writing this mail in vm under emacs, and when I 
>invoke top via the shell-command I get the following:
> Trespassers will be shot.  Survivors will be prosecuted.
> top: ioctl() failed: Not a typewriter
> 
> the first line comes from the fortune command.
> How can I repair my top command?

Top is fine. Emacs is the problem here. When you run a shell command, emacs
does not allocate a pseudo-terminal, it opens a pipe to the output of the
command you run. Top needs to display to a terminal, as it refreshes the
screen, and needs to know how to do that for whatever kind of terminal you
are on.

Emacs, while having other charming features, is very bad at terminal handling
within the program. If you are in X, I would suggest using M-! xterm -c top,
otherwise, I would suspend emacs with C-z or M-x suspend-emacs, then run
top. 

You might try M-x shell, but on my system at least, I get

top: Unknown terminal "emacs" in $TERM.

Do you know lisp? :-) You could fix it? (or not, but if you do, let me know).



have fun,

greg
-- 
dronf!

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to