Operating System - HP-UX
1829187 Members
8958 Online
109986 Solutions
New Discussion

Re: less getting "WARNING: terminal is not fully functional"

 
Snowy Angelique Maslov
Occasional Advisor

less getting "WARNING: terminal is not fully functional"

Hi all,
I have installed the less-394-ia64-11.23.depot from http://hpux.cs.utah.edu/ only whenever I go to use it I receive the error message:

WARNING: terminal is not fully functional

Inspection of the less source code suggests that is it missing termcap information however the terminal (in this case vt100) exists in /etc/termcap which is symbolically linked to /usr/share/lib/termcap. I have tried using infocmp -C vt100 and adding the full information to the termcap file to no avail.

Has anyone else had a similar issue like this?

The box in question is a relatively fresh install of 11.23 HP-UX on ia64 hardware.
9 REPLIES 9
RAC_1
Honored Contributor

Re: less getting "WARNING: terminal is not fully functional"

What does following command say?

ttytype -s and what if you you set required settings that the command gives?
There is no substitute to HARDWORK
Snowy Angelique Maslov
Occasional Advisor

Re: less getting "WARNING: terminal is not fully functional"

ttytype (the terminal identification program) produces the following output using '-s':

TERM='vt100'; export TERM;
LINES=40; export LINES;
COLUMNS=153; export COLUMNS;
ERASE='^?'; export ERASE;

Setting these variables in the environment does not change the error whatsoever. In actual fact for my account on the machine I have ttytype -s as part of my .profile.
RAC_1
Honored Contributor

Re: less getting "WARNING: terminal is not fully functional"

What if you set TERM to something else? Does it work. For example xterm or hp?
There is no substitute to HARDWORK
Snowy Angelique Maslov
Occasional Advisor

Re: less getting "WARNING: terminal is not fully functional"

We have tried with the following terminal types:

vt100
vt220
xterm

The warning message has remained the same. I do not have a 'hp' capable terminal emulater to test the TERM=hp option but I would have to assume it will end up with the same result.
A. Clay Stephenson
Acclaimed Contributor

Re: less getting "WARNING: terminal is not fully functional"

It's very unusual for any software to use termcap anymore (termcap is at least 15 years out of date). I haven't bothered to look at the less source but I'll bet almost anything that you need to concentrate on terminfo entries rather than /etc/termcap.
If it ain't broke, I can fix that.
Snowy Angelique Maslov
Occasional Advisor

Re: less getting "WARNING: terminal is not fully functional"

I guess Im showing my age a touch then ;

I have done an infocmp -C on all the terminals we have in use which does query the terminfo database and they appear sane. Are there any places people can perhaps suggest in particular where to look for terminfo problems?
RAC_1
Honored Contributor

Re: less getting "WARNING: terminal is not fully functional"

What does following report?
ttytype -v
stty -a
There is no substitute to HARDWORK
Snowy Angelique Maslov
Occasional Advisor

Re: less getting "WARNING: terminal is not fully functional"

They produce the following results:
$ ttytype -v
ttytype: ANSI terminal response "^[[?6c" mapped to "vt100"
vt100
$ stty -a
speed 9600 baud; line = 0;
rows = 40; columns = 153
min = 1; time = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U
eof = ^D; eol = ^@; eol2 ; swtch
stop = ^S; start = ^Q; susp ; dsusp
werase ; lnext
parenb -parodd cs7 -cstopb hupcl -cread -clocal -loblk -crts
-ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon -ixany ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo echoe echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop tab3
$
Snowy Angelique Maslov
Occasional Advisor

Re: less getting "WARNING: terminal is not fully functional"

Thanks to all I found the problem was due to not having GNU Termcap installed. I downloaded it from the porting center and it fixed all my problems. For those who are compiling from source and still experiencing odd errors; the response I received from Phil Peterson (Philip.Peterson@NOSPAMREMOVEME.wfhc.org) should prove most helpful (and is what lead me to look at GNU Termcap) as detailed below.

[response from Phil Peterson]

I haven't used the precompiled binaries of less from utah.edu, but I did compile my own from the less-394 source code. I got the same problem on Itanium servers. (Worked just fine on PA-RISC servers by the way.)

Here is the answer I got from Mark Nudelman, the author of less.

"I had another report of this bug a while ago. It appears the root of this problem is that the Itanium system has implemented tgetent and tgetflag incorrectly. A more complete report is appended below. I'm loath to add a workaround in the less code, since this seems to be a clear bug in the Itanium software. But it's on my list of things to consider. For now, it shouldn't be hard for you to make a local modification to change the calls to these functions.

--Mark

-----------------------------------------------------------------
The problem turns out to be with the return code from tgetent and tgetflag. On these systems, tgetent returns 0 on success and -1 on failure, where the rest the world apparently returns 1 on success and 0 (or it is -1?) on failure. tgetflag returns 1 for success and -1 for failure, where the rest of the world apparently returns 0 for failure. Fortunately, all this is easily worked around, in get_term and ltgetflag.

What's odd is that HP-UX/PA-RISC systems seem to return the expected values. Why is this different for Itanium? (Not that it matters, but anyway...). -----------------------------------------------------------------"

I'm going to guess the precompiled binaries have the same problem my original compiles had. I had to go and change the source code in a couple of places to work around the stuff Mark mentioned. Once I did that, everything worked fine. I can get you the changes I made to the source code, but then you will have to compile your own less binaries. I'm going to guess the stuff from utah.edu just isn't going to work on Itanium servers.

[/response]