[SOLVED] 'xterm': unknown terminal type.

[SOLVED] 'xterm': unknown terminal type.

Postby ersiko » Wed Apr 08, 2015 6:23 pm

Hi!

After the last upgrade to 16.0, there's a thing that's bugging me... I get these errors on "top" and "htop" (and others, but I think they're all related)
root@lacie:/ # top
'xterm': unknown terminal type.

root@lacie:/ #htop
Error opening terminal: xterm.


Am I the only one? Any hint on how can I fix it?
Last edited by ersiko on Fri Apr 10, 2015 9:49 am, edited 1 time in total.
ersiko
 
Posts: 17
Joined: Tue Dec 03, 2013 11:45 pm

Re: 'xterm': unknown terminal type.

Postby Jocko » Wed Apr 08, 2015 6:37 pm

hi ersiko,

Can you check if you have a xterm file in /usr/share/terminfo/x

Try also to use vt100 as terminal type string in your Putty settings (connection -> Data)
Jocko
Site Admin - expert
 
Posts: 11558
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: 'xterm': unknown terminal type.

Postby ersiko » Wed Apr 08, 2015 7:08 pm

Indeed it is there

root@lacie:/ # ls /usr/share/terminfo/x/
xterm xterm-alt
root@lacie:/ # ls /usr/share/terminfo/v/
vt100


Also changing to vt100 doesn't fix it
root@lacie:/ # echo $TERM
vt100
root@lacie:/ # top
'vt100': unknown terminal type.
ersiko
 
Posts: 17
Joined: Tue Dec 03, 2013 11:45 pm

Re: 'xterm': unknown terminal type.

Postby Jocko » Wed Apr 08, 2015 7:27 pm

:scratch

At least for top, it searches the terminal info in another folder and so a symlink is required. Maybe you lost it:
Code: Select all
root@Acrab:/ # ls -l /opt/share/terminfo
lrwxrwxrwx  1 root root 24 2014-12-30 11:41 /opt/share/terminfo -> ../../usr/share/terminfo
Jocko
Site Admin - expert
 
Posts: 11558
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: 'xterm': unknown terminal type.

Postby ersiko » Fri Apr 10, 2015 9:36 am

Well... I already checked that. Running a strace on top shows:

stat64("//.terminfo", 0xbea2b158) = -1 ENOENT (No such file or directory)
stat64("/opt/share/terminfo", 0xbea2b158) = -1 ENOENT (No such file or directory)
write(2, "'xterm': unknown terminal type.\n", 32'xterm': unknown terminal type.
) = 32
exit_group(1) = ?


But then the soft-link exists
root@lacie:/ # ls -la /opt/share/terminfo
lrwxrwxrwx 1 root root 24 2015-01-26 17:02 /opt/share/terminfo -> ../../usr/share/terminfo


I could access that directory, but as the "../../" part doesn't look good, I removed the soft-link and re-created it again:

root@lacie:/ # ls -la /opt/share/terminfo
lrwxrwxrwx 1 root root 24 2015-01-26 17:02 /opt/share/terminfo -> ../../usr/share/terminfo
root@lacie:/ # rm /opt/share/terminfo
root@lacie:/ # ln -s /usr/share/terminfo /opt/share/terminfo
root@lacie:/ # top
top - 11:32:24 up 1 day, 15:18, 1 user, load average: 0.81, 0.80, 0.87
Tasks: 82 total, 1 running, 81 sleeping, 0 stopped, 0 zombie
Cpu(s): 20.6%us, 2.7%sy, 0.4%ni, 70.8%id, 5.2%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 250404k total, 147584k used, 102820k free, 2828k buffers
Swap: 524284k total, 106692k used, 417592k free, 11908k cached


Now it works!

I think that soft-link is wrong, and it should be fixed in future versions. Any reason why it should stay a relative path instead of an absolute path?
ersiko
 
Posts: 17
Joined: Tue Dec 03, 2013 11:45 pm

Re: [SOLVED] 'xterm': unknown terminal type.

Postby fvdw » Fri Apr 10, 2015 9:53 am

I think that soft-link is wrong, and it should be fixed in future versions. Any reason why it should stay a relative path instead of an absolute path?


no it isn't wrong, unless you changed something in the structure of the firmware.
fvdw
Site Admin - expert
 
Posts: 13472
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: 'xterm': unknown terminal type.

Postby Jocko » Fri Apr 10, 2015 10:07 am

-- In addition with the fvdw post --
ersiko wrote:I think that soft-link is wrong, and it should be fixed in future versions. Any reason why it should stay a relative path instead of an absolute path?
First you must be aware that after upgrading the firmware, filesystem is chrooted. It is why it is better to use a relative path instead of an absolute path.
Indeed if for any raeson, there is an error with the chroot or you don't work in a normal environment (use a serial console), with a relative path, the firmware still uses the resource of the mounted filesystem and not an obsolete file version.

So the symlink is not wrong but we need to understand why you have this issue.

Some ideas:
Did you install some ipkg packages ?
check you chroot environment (what is your mount output)


Note :
Code: Select all
rm /opt/share/terminfo
It is a dangerous command with a symlink. I advise you to use instead the command unlink where there is no risk to delete something on the target side
Jocko
Site Admin - expert
 
Posts: 11558
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: [SOLVED] 'xterm': unknown terminal type.

Postby ersiko » Fri Apr 10, 2015 10:49 am

Indeed I changed the env. That's why my first question was "Am I the only one?" :P

I tried to install a bunch of programs in /opt (ntop, for instance), as I have them before installing this firmware, but I was running out of space quickly (I could install just one or two ipkg apps!), and that's why I copied everything from /opt to /share/1000/opt and then created a soft-link to /opt. It was a quick'n'dirty fix, I know, I'm not proud of it, but it did the trick.

I understand now the reason for the relative path, and why it's not working for me.

Thanks, guys!
ersiko
 
Posts: 17
Joined: Tue Dec 03, 2013 11:45 pm


Return to Lacie cloudbox (white casing)

Who is online

Users browsing this forum: No registered users and 8 guests