LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-09-2009, 06:19 PM   #1
Pscylo
Member
 
Registered: Mar 2008
Distribution: Slackware 13.37 64bit & 32bit
Posts: 38

Rep: Reputation: 1
Error opening terminal: xterm Terminal type "xterm" unknown


HI,

I'm getting error messages as above, but there are other symptoms. I think trying to install OpenEmm caused the problem though I can't be absolutey certain of this.

I get the two error messages as above logged in as a user trying to run either pine or lynx, but I don't get the same messages running the same apps under root. Fluxbox also seems to run OK under root, but I can't get it to run under a user.

When I log in under kdm (?), as a user trying to run fluxbox, I get the kdm background and after a few seconds an xterm open up, but I have no menus, the only input is via the xterm. If I log in as root, fluxbox works OK.

I'm sure there are other symptoms as well, but this is as much as I've researched so far. I may be wrong, but it appears to be something to do with ncurses. I'm no newbie, but I'm a little out of my depth here and any help would be much appreciated.

Would a sensible step be to reinstall slack over the current installation, or do I need to reinstall a part of the OS; and how would I go about either.

As I say though, any help much appreciated.

Rob
 
Old 04-09-2009, 07:00 PM   #2
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Rep: Reputation: 75
It is indeed strange behaviour for xterm to not know it's own terminal type. ;-) In /etc there are files termcap*
What are the rights on them?

Code:
ls -l termcap*
should give:
Code:
-rw-r--r-- 1 root root   8969 2004-02-16 05:04 termcap
-rw-r--r-- 1 root root 706385 2000-03-03 00:51 termcap-BSD
-rw-r--r-- 1 root root   8969 2004-02-16 05:04 termcap-Linux
I'm assuming there's something not entirely right with your termcap settings. I could be wrong, but it'd be the 1st place I'd look.

Now your situation does not seem to fully cover your topic title. So please answer these questions, to give an idication what is going wrong:
- you cannot open xterm at all as normal user?
- The problem fluxbox is probaly not related to this issue; I would suggest opening another thread about this. I'm not a fluxbox wizard, but others may be but won't look into this thread. (hardly anyone reads all threads)

However, since you say that things work OK under root, but not under a normal user, the first (and probably right) guess is that we're dealing with rights problems here. There is no need to fix this with a total reinstall, however updating regulary is not a bad thing at all to do. What is your current Slackware version?

ncurses is only a library about how to put stuff in a CUI; I doubt it has to do with that.

I could go check, but it's late here. What is OpenEmm? What is it supposed to do?

If you do an
Code:
echo $TERM
with both user "root" and the normal user, do they give the same result? Things could be as simple as a difference in environment settings that would make the applications (un)happy.
 
Old 04-10-2009, 04:58 AM   #3
Pscylo
Member
 
Registered: Mar 2008
Distribution: Slackware 13.37 64bit & 32bit
Posts: 38

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Ramurd View Post
It is indeed strange behaviour for xterm to not know it's own terminal type. ;-) In /etc there are files termcap*
What are the rights on them?

Code:
ls -l termcap*
should give:
Code:
-rw-r--r-- 1 root root   8969 2004-02-16 05:04 termcap
-rw-r--r-- 1 root root 706385 2000-03-03 00:51 termcap-BSD
-rw-r--r-- 1 root root   8969 2004-02-16 05:04 termcap-Linux
I get:

-rw-r--r-- 1 root root 8969 2004-02-16 04:04 termcap

so not that same as your's. What that means though is beyond me.

<SNIP>
Quote:
Originally Posted by Ramurd View Post
Now your situation does not seem to fully cover your topic title. So please answer these questions, to give an idication what is going wrong:
- you cannot open xterm at all as normal user?
A difficult one to answer this. When I log in via kdm as a normal user all I get is an xterm opened automatically, there is no means available to open a new xterm. I can only use the one that is there, or alteratively log in as a user in an xterm opened within the X environment when running as root (since that's the only I time I can ping up xterms at will).
Quote:
Originally Posted by Ramurd View Post
- The problem fluxbox is probaly not related to this issue; I would suggest opening another thread about this. I'm not a fluxbox wizard, but others may be but won't look into this thread. (hardly anyone reads all threads)
Well they may not be related issues, but whatever happened to flux and to the xterm happened at the same time.
Quote:
Originally Posted by Ramurd View Post
However, since you say that things work OK under root, but not under a normal user, the first (and probably right) guess is that we're dealing with rights problems here. There is no need to fix this with a total reinstall, however updating regulary is not a bad thing at all to do. What is your current Slackware version?
I think it's something to do with rights too, but I'm not too sure where to start looking. I get the same symptoms with new users and with old users. When I try and delete a user, I also get:

deluser: can't find 'test' in '/etc/group'
deluser: can't find 'test' in '/etc/gshadow'

don't quite know what that means though.
Quote:
Originally Posted by Ramurd View Post
I could go check, but it's late here. What is OpenEmm? What is it supposed to do?
Newsletter/email broadcast app. It could be unrelated, but things started to go wrong about the same time.

Quote:
Originally Posted by Ramurd View Post
If you do an
Code:
echo $TERM
with both user "root" and the normal user, do they give the same result? Things could be as simple as a difference in environment settings that would make the applications (un)happy.
both are the same (xterm) when switching user within an X session opened as root. I'll try an X session logged in as a user and see what happens though I'll expect it to be the same.

Interestingly when I log in at tty6 under the CLI as a user, and try to run pine I get:

Terminal type "linux", is unknown.

I also get:

fortune: 'Cannot open /usr/share/games/fortunes/fortunes': Permission denied

immediately after logging in as a user. Don't know what that means though.
 
Old 04-10-2009, 07:05 AM   #4
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Rep: Reputation: 75
In termcap the terminal defenitions are set, it's a normal textfile. That you're not getting the exact same outcome of the ls termcap* is possible due to various reasons. Could be that I installed additional software that installed additional termcaps (unlikely) or you're not running the same Slack version as I ;-) No worries, the important part is that the rights on the termcap file are good.

Quote:
A difficult one to answer this. When I log in via kdm as a normal user all I get is an xterm opened automatically, there is no means available to open a new xterm. I can only use the one that is there, or alteratively log in as a user in an xterm opened within the X environment when running as root (since that's the only I time I can ping up xterms at will).
Since you start the kde session and you get an xterm you actually get an xterm. So that part is good. Xterm itself does not seem to be complaining. (You could try to fire up another xterm with the command "xterm &", but I think you'll get another xterm.) Now xterm could be just one of the applications that is loaded since it was "up" when last shutdown. There can be other reasons. Since you state that you cannot fire up another xterm at will (and assuming you tried running the command "xterm" in the xterm: what is the error you get on that? Also the termcap error?)

Quote:
I think it's something to do with rights too, but I'm not too sure where to start looking. I get the same symptoms with new users and with old users. When I try and delete a user, I also get:

deluser: can't find 'test' in '/etc/group'
deluser: can't find 'test' in '/etc/gshadow'

don't quite know what that means though.
At the same time that you updated OpenEmm, did you update kde as well? Or the kernel or glibc or something else? Installing a mail/news client should not mess up your system like this. If you have the package of OpenEmm still (and if it's in tgz format) you could run a tar ztvf against it and see what files actually were in it. Additionally you can check the doinst.sh script that may contain additional commands that were run to perform the installation.

Since -when you remove a user- you get the message about test, it means that it cannot find the group test of said user. In the file /etc/passwd the user's group is set as "test"; A group that you have had in the past and is now gone. In itself there's no harm in it.

There is a real difference between starting a session as root and su-ing to another user, logging in on a tty and logging in in X via KDM, XDM or directly through startx / xinit. Each method is different as other configuratino files are used, inherently coming with other settings.

Quote:
Terminal type "linux", is unknown.

I also get:

fortune: 'Cannot open /usr/share/games/fortunes/fortunes': Permission denied

immediately after logging in as a user. Don't know what that means though.
Both terminal type 'xterm' and 'linux' are very common. Since you also get the permission denied about fortune on your normal user something seems to be very messed up. (not that messing fortune up will do any harm, you just don't get your "nifty" quotes on login) Can you run the following command as your normal user:
Code:
id
This command shoudl give you the groups the user is member of, could be that your user is just not member of some important group (my estimate would be 'usr') and this is messing things up.
 
Old 04-10-2009, 07:29 AM   #5
Pscylo
Member
 
Registered: Mar 2008
Distribution: Slackware 13.37 64bit & 32bit
Posts: 38

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Ramurd View Post
In termcap the terminal defenitions are set, it's a normal textfile. That you're not getting the exact same outcome of the ls termcap* is possible due to various reasons. Could be that I installed additional software that installed additional termcaps (unlikely) or you're not running the same Slack version as I ;-) No worries, the important part is that the rights on the termcap file are good.
I'm running 12.1
Quote:
Originally Posted by Ramurd View Post
Since you start the kde session and you get an xterm you actually get an xterm. So that part is good. Xterm itself does not seem to be complaining. (You could try to fire up another xterm with the command "xterm &", but I think you'll get another xterm.) Now xterm could be just one of the applications that is loaded since it was "up" when last shutdown. There can be other reasons. Since you state that you cannot fire up another xterm at will (and assuming you tried running the command "xterm" in the xterm: what is the error you get on that? Also the termcap error?)
From an xterm running as a user under a root X session:

bash-3.1$ xterm &
[1] 10441
bash-3.1$ No protocol specified
xterm Xt error: Can't open display: :0.0

If I issue the command as root in an xterm, I get another xterm.

Quote:
Originally Posted by Ramurd View Post
At the same time that you updated OpenEmm, did you update kde as well?
Not that I'm aware of.
Quote:
Originally Posted by Ramurd View Post
Or the kernel or glibc or something else? Installing a mail/news client should not mess up your system like this. If you have the package of OpenEmm still (and if it's in tgz format) you could run a tar ztvf against it and see what files actually were in it. Additionally you can check the doinst.sh script that may contain additional commands that were run to perform the installation.
will have a look and see what I can find.
Quote:
Originally Posted by Ramurd View Post
Since -when you remove a user- you get the message about test, it means that it cannot find the group test of said user. In the file /etc/passwd the user's group is set as "test"; A group that you have had in the past and is now gone. In itself there's no harm in it.
I have a feeling I added a new user called "test" to see what happened.
Quote:
Originally Posted by Ramurd View Post
Can you run the following command as your normal user:
Code:
id
This command shoudl give you the groups the user is member of, could be that your user is just not member of some important group (my estimate would be 'usr') and this is messing things up.
uid=1005(rob) gid=100(users) groups=11(floppy),17(audio),18(video),19(cdrom),83(plugdev),100(users)

so usr isn't there.
 
Old 04-10-2009, 08:06 AM   #6
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Rep: Reputation: 75
My bad, I'm at work and working with AIX here; tend to mix up the groups usr and user which have pretty much the same meaning. The default user is member of 'users', that's good. Although I had expected a missing group the output from 'id' looks ok to me.

Quote:
From an xterm running as a user under a root X session:

bash-3.1$ xterm &
[1] 10441
bash-3.1$ No protocol specified
xterm Xt error: Can't open display: :0.0
Very logical, the display is a socket and the file used for the socket is owned by root (the user who started the x display) and if not using authentication mechanisms like xauth the normal user cannot write to it (and rightfully so!)
Quote:
If I issue the command as root in an xterm, I get another xterm.
ok, that's good. But when you start the xterm as normal user while logged into X by the normal user?

In a few hours I will be home; I'll check out a few commands that should check if the terminal types are known; Also if I can find some good places where logging should take place where you can see what may be missing / going wrong. The next kind of errors I suspect should be logged somewhere. Hold on!

Alternately, while waiting you could boot in runlevel 3 (or -as root- type 'telinit 3' in the xterm) X should close by then. After that you can log in on the CLI as normal user and run 'startx'. Pretty curious if things won't startup either this way.
 
Old 04-10-2009, 10:42 AM   #7
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Rep: Reputation: 75
Just arrived home, so thought I'd check a few things out:
- when you start fluxbox as 'rob', you get an empty screen with xterm running you say. If you rightclick somewhere on a blank spot on the desktop, you're not getting a menu either?

You could check the following logs for some messages that could give a clue:
/var/log/messages
/var/log/debug
/var/log/syslog
/var/log/Xorg.0.log
/var/log/kdm.log

Instead of trying to 'tar ztvf' the package you can alternatively get the list of files that were installed with the OpenEmm package (given it's done with the slackware package tools from pkgtools) Still you can extract the package and take a look at the doinst.sh for modifications done by the doinst.sh script (extracting the doinst.sh script can be done with this command:
Code:
tar zxvf <filename of the tgz package> install/doinst.sh
; If unsure you can attach the script in your post)
 
Old 04-10-2009, 11:14 AM   #8
Pscylo
Member
 
Registered: Mar 2008
Distribution: Slackware 13.37 64bit & 32bit
Posts: 38

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Ramurd View Post
My bad, I'm at work and working with AIX here; tend to mix up the groups usr and user which have pretty much the same meaning. The default user is member of 'users', that's good. Although I had expected a missing group the output from 'id' looks ok to me.
I thought it may have beena typo.
Quote:
Originally Posted by Ramurd View Post
ok, that's good. But when you start the xterm as normal user while logged into X by the normal user?
Different result in this case. This may not be verbatim, as I culdn't pipe the output to a file, so it's manually typed. So in this instance, I log in at the kdm screen as a user and the xterm pops up and when I enter xterm&, I get:

Warning: locale not supported by Xlib, locale set to C
Warning: X locale modifiers not supported, using default
Failed to open input method
Quote:
Originally Posted by Ramurd View Post
Alternately, while waiting you could boot in runlevel 3 (or -as root- type 'telinit 3' in the xterm) X should close by then. After that you can log in on the CLI as normal user and run 'startx'. Pretty curious if things won't startup either this way.
If I do this and and startx, I end with a blank screen and the ever present xterm, howver I don't appear able to type anything into the window in this instance
 
Old 04-12-2009, 11:16 AM   #9
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Rep: Reputation: 75
- Have you taken a look at the files installed by the OpenEmm package?
- Have you checked the logs I mentioned for some clues?

- Did xterm (with errors) open or not at all? The fail to open input method looks like a real bad one.

- Your xinit (for normal user) does not seem to have a window manager active. Usual behaviour then is that the window the mouse is above has the focus; you can only type in that window if it has the focus from the "mouse over".

- When you started X from the CLI, were there any messages that may give a clue to what is ailing your system?

For now I don't have any answers yet what is exactly going wrong. Hopefully someone else is having additional clues what may have happened to your system.
 
Old 04-12-2009, 12:05 PM   #10
Pscylo
Member
 
Registered: Mar 2008
Distribution: Slackware 13.37 64bit & 32bit
Posts: 38

Original Poster
Rep: Reputation: 1
Solved

Quote:
Originally Posted by Ramurd View Post
-
- Have you checked the logs I mentioned for some clues?
Yup. Can't recall which logfile it was, but there was an error in there, something like /usr/share/config/xdm unable to access, permission denied.

A little bit of digging and it transpires that as a user I had no rw access to /usr/share. Chmod 755 corrected that, and I was able to log back in again. All xterm problems seem to have gone too.

All "seems" to be working fine now. I can't think what wold have caused that to chage either, but I've wasted enough time on this already so I'm not digging any further. For now I'm happy that it all works.

Thanks chum.
 
Old 04-17-2009, 06:33 AM   #11
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 555

Rep: Reputation: 75
Glad you found it; A simple typo as root can have caused this or a mistake in the openEmm install script.

Thumbs up! 't was an interesting thing to go through with you :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to Type the character "d" in Terminal Window vkichu Linux - Newbie 4 05-03-2009 12:08 AM
Error message on opening up a csh terminal in Fedora 9 Unknown colorls variable `ca'. mrground Linux - Software 3 08-01-2008 11:37 AM
'xterm': unknow terminal type longnam Slackware 2 08-27-2005 09:37 PM
a bit "funnier" terminal then xterm BroinK Slackware - Installation 7 03-10-2004 05:22 AM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-21-2003 11:47 PM


All times are GMT -5. The time now is 12:04 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration