ncurses: terminfo in wrong place

Bug #335812 reported by chrol
2
Affects Status Importance Assigned to Milestone
Nexenta Operating System
Fix Released
High
Tim Spriggs

Bug Description

Utilities like top and prstat rely on setupterm() call which uses terminfo and /etc/termcap to configure proper terminal settings

in ncp2b2 this is not working properly.

Test: run prstat via ssh from e.g. macosx terminal and notice error message (failed to load terminal info)

I tried moving files from /lib/amd64/terminfo to /usr/lib/terminfo and it cleared up the problem for me

I don't know if terminfo should be replicated to so many places (apt-file find xterm-color) and if it should be arch dependant?

chrol (christian-olrog)
description: updated
Revision history for this message
anilg (anil-verve) wrote :

I tried this on my VMware instance of beta2 and was unable to reproduce (tried both gnome-terminal and xterm on the host). prstat runs fine (and top is a link to prstat). Can you from any linux box if you have one, and report if the issue is seen there as well?

Revision history for this message
anilg (anil-verve) wrote :

My VM was 32 bit, so this can be a 64 bit issue.

Revision history for this message
Cuong Le (cuonglb) wrote : Re: [Bug 335812] Re: ncurses: terminfo in wrong place

Me too. I'm using Parallel Desktop 32bits for Mac.

I try Nexenta Core Beta 2 in my VirtualBox (OSE) in Debian and worked fine
but very slowly when booting.

On Sat, Feb 28, 2009 at 7:47 PM, anilg <email address hidden> wrote:

> My VM was 32 bit, so this can be a 64 bit issue.
>
> --
> ncurses: terminfo in wrong place
> https://bugs.launchpad.net/bugs/335812
> You received this bug notification because you are a member of Nexenta
> Core Team, which is subscribed to Nexenta Operating System.
>

Revision history for this message
Tim Spriggs (tim-tajinc) wrote :

The important test here isn't the terminal you are coming from so much as the TERM environment variable. OSX Terminal defaults to xterm-color which is not recognized as originally stated.

root@fiji:/usr/lib# prstat
prstat: failed to load terminal info, defaulting to -c option
   PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
...

Other instances of this problem can be seen with /usr/bin/vi (but not /usr/bin/vim) or other applications that compile against libcurses.so.1 which is provided by sunwcslr:

# dpkg-query -S /lib/libcurses.so.1
sunwcslr: /lib/libcurses.so.1

In order to work around the problem the sun curses terminfo needs to know about xterm-color (which it doesn't know about by default) but can be augmented using ncurses xterm-color definition:

root@fiji:/usr/share/lib/terminfo/x# ln -s /lib/terminfo/x/xterm-color

Additionally, the /lib/amd64/terminfo directory is a by-product of the 32/64 build. It is redundant and should be cleaned up.

Revision history for this message
Tim Spriggs (tim-tajinc) wrote :

This has been fixed and released into hardy-unstable. Please test and let me know if the problem is fixed for you.

Revision history for this message
chrol (christian-olrog) wrote :

Tested and works on dist-upgraded ncp2b2 today

thank you.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.