Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-10-2014, 07:17 AM
|
#1
|
LQ Newbie
Registered: Jul 2014
Posts: 4
Rep: 
|
top 'xterm': unknown terminal type.
Hello mates,
I have an error when run TOP command:
>top
'xterm': unknown terminal type.
> echo $TERM
xterm
> echo $DISPLAY
DYSPLAY: Undefined variable.
> cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
> ls /usr/share/terminfo/
1 2 3 4 5 6 7 8 9 a A b c d e E f g h i j k l L m M n N o p P q Q r s t u v w x X z
> ls /usr/share/terminfo/x/xterm
/usr/share/terminfo/x/xterm
i have that problem also with Root.
do TOP use xterm?
How can i do?
|
|
|
07-10-2014, 10:19 AM
|
#2
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
Command line applications rely on your TERM variable to determine how to display information your screen. Since top has to show information on you screen (in a text) interface it needs to use the TERM you defined.
xterm is the default for many things and is based on the old vt100 definition.
On my RHEL6.x boxes top runs fine using xterm.
This suggests perhaps there is an issue with the xterm you have or the top you have.
Run "rpm -qf /usr/share/terminfo/x/xterm" to determine which package installed that.
Run "yum list <package>" on the name of the package without version, architecture to see if there are newer versions available.
e.g. if the first command output something like: ncurses-base-5.7-3.20090208.el6.x86_64 then run "yum list "ncurses-base".
That should show which version you have installed and if any later versions are available. If there are later versions you can update by running "yum update <package>" to see if it gives you a better xterm.
Similarly you could check the same for top.
By the way when doing "ls" you might want to get in the habit of doing "ls -l" instead as it gives you much more information about the file. (e.g. if it a link when it shouldn't be).
|
|
|
07-10-2014, 10:24 AM
|
#3
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Seeing that this is a RHEL system and the DISPLAY variable is not set I assume that this system is not running a GUI. Since Xterm is a GUI program it is not really a surprise that top can't handle it when no GUI is running. Set your TERM variable to linux and try it again.
|
|
|
07-10-2014, 11:52 AM
|
#4
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
Quote:
Originally Posted by TobiSGD
Seeing that this is a RHEL system and the DISPLAY variable is not set I assume that this system is not running a GUI. Since Xterm is a GUI program it is not really a surprise that top can't handle it when no GUI is running. Set your TERM variable to linux and try it again.
|
That's not correct.
You're confusing the X application named "xterm" with the Terminal definition of the same name. One does NOT need to be running X nor have the DISPLAY variable set to use the "TERM" variable "xterm" which is specifying the terminal definition rather than the X application. For example all of my PuTTY sessions use "xterm" by default. The "xterm" terminal definition is just a modified version of the old vt100 definition optimized to run INSIDE the xterm X application but other applications are quite happy using that xterm definition as well.
|
|
1 members found this post helpful.
|
07-10-2014, 11:57 AM
|
#5
|
Moderator
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
|
Quote:
Originally Posted by MensaWater
That's not correct.
You're confusing the X application named "xterm" with the Terminal definition of the same name. One does NOT need to be running X nor have the DISPLAY variable set to use the "TERM" variable "xterm" which is specifying the terminal definition rather than the X application. For example all of my PuTTY sessions use "xterm" by default. The "xterm" terminal definition is just a modified version of the old vt100 definition optimized to run INSIDE the xterm X application but other applications are quite happy using that xterm definition as well.
|
Thanks for the correction.
|
|
|
07-10-2014, 02:44 PM
|
#6
|
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,908
|
One possibility is that xterm (or the other GUI terminal emulations) is not installed.
Second,Red Hat Enterprise Linux Server release 6.3 (Santiago) may not even have a GUI installed (which can also require the XTERM terminal definitions to be installed).
Third - if no GUI is installed, then the terminal connection must be using the basic one.
Which happens to be name "linux" for the console. This is NOT an xterm. This also means that the user has the TERM environment variable defined in their profile/.login/.bashrc/... somewhere. This should never be done.
As a point, xterm is an extended ANSI terminal escape specification - it isn't VT100. A VT100 did have a number of escape sequences in common with an ANSI terminal - but only about half. The other half did things like setting scrolling regions, double width and/or double height characters, blinking (I think), and inverse video... As I recall, ANSI did not have color capability - xterm does.
Top uses the ncurses library which uses the terminfo database for terminal information (or termcap if so configured at compile time). This is a portable and reconfigurable set, but it requires the database to contain the definitions. Since the error is "'xterm': unknown terminal type." that means the definition of an xterm is not in the database.
Removing the definition of the environment variable TERM from the profile will allow the system to use the name it has been configured to use (most likely the value is supposed to be "linux").
|
|
|
07-11-2014, 09:06 AM
|
#7
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
Quote:
Originally Posted by jpollard
One possibility is that xterm (or the other GUI terminal emulations) is not installed.
|
Apparently you didn't read the rest of the thread. You do NOT need a GUI to run "xterm" terminal type. You do need it to run the "xterm" X application which is NOT what the OP is doing.
|
|
|
07-11-2014, 11:20 AM
|
#8
|
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,908
|
Quote:
Originally Posted by MensaWater
Apparently you didn't read the rest of the thread. You do NOT need a GUI to run "xterm" terminal type. You do need it to run the "xterm" X application which is NOT what the OP is doing.
|
Reread my answer. You don't need the GUI... but you do need the termcap/terminfo entry - and that isn't installed by default UNLESS you install the GUI. And even if you do install the termcap/terminfo entry it still won't work properly UNLESS you are running an xterm (or compatible) somewhere (such as via ssh).
A TERM environment variable set to "xterm" will not work properly from the console. Not all escape sequences are recognized by the VT console for instance.
Last edited by jpollard; 07-11-2014 at 11:21 AM.
|
|
|
07-11-2014, 01:06 PM
|
#9
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
The OP posted originally that he DOES have the xterm terminfo file as shown by his ls output.
It is NOT correct to say it ONLY works with "GUI" tools such as Xterm.
It is also NOT correct to say it only installs with GUI/X. It is part of the ncurses package that installs multiple terminfo files.
As I noted in a prior post it works in PuTTY and various other terminal emulators as well. Specifically top DOES work with xterm in PuTTY even though neither top NOR PuTTY are X applications.
It IS correct to say that different terminfo files have different capabilities however his issue wasn't one of capability but rather that it was telling him it didn't recognize his TERM at all (i.e. couldn't find it not that it didn't work properly). My initial response to him was talking about additional information he needs to look at because as noted above it DOES work on my systems.
Last edited by MensaWater; 07-11-2014 at 01:07 PM.
|
|
|
07-11-2014, 09:08 PM
|
#10
|
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,908
|
Quote:
Originally Posted by MensaWater
The OP posted originally that he DOES have the xterm terminfo file as shown by his ls output.
|
Simple answer:
'xterm': unknown terminal type.
Thus it is not known.
Quote:
It is NOT correct to say it ONLY works with "GUI" tools such as Xterm.
It is also NOT correct to say it only installs with GUI/X. It is part of the ncurses package that installs multiple terminfo files.
|
Depends on the install. I have seen systems that don't have it because it isn't supported.
The fact that the error says "unknown terminal type" says it isn't installed.
Quote:
As I noted in a prior post it works in PuTTY and various other terminal emulators as well. Specifically top DOES work with xterm in PuTTY even though neither top NOR PuTTY are X applications.
|
It works only where the escape sequences are interpreted.
Quote:
It IS correct to say that different terminfo files have different capabilities however his issue wasn't one of capability but rather that it was telling him it didn't recognize his TERM at all (i.e. couldn't find it not that it didn't work properly). My initial response to him was talking about additional information he needs to look at because as noted above it DOES work on my systems.
|
Works on mine too. It doesn't work where the escape sequences are not interpreted though.
|
|
|
07-14-2014, 10:15 AM
|
#11
|
LQ Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
|
Quote:
Originally Posted by jpollard
meaningless drivel
|
Some people can admit when they make a mistake. Others simply continue posting to try to show they didn't.
The answer is NOT just a "simple" it isn't there. The OP posted that it is there as shown by ls so my original response was trying to get more information.
Since you'll now post more meaningless drivel I'll let you have the last word.
|
|
|
All times are GMT -5. The time now is 08:34 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|