1752677 Members
5549 Online
108789 Solutions
New Discussion юеВ

Junk

 
SOLVED
Go to solution
N.S. WARGHADE
Occasional Contributor

Junk

Hi,
Recently we have upgraded our os from 10.20 to hp-ux 11.0 64 bit on l-class 2000.
After login to system we r getiing some junk char. like,
" 4;80R " or " ^[[24;8 ". perticularly in menu based user.

How to solve this prob.
pl help.
Hello unix
9 REPLIES 9
James R. Ferguson
Acclaimed Contributor

Re: Junk

Hi:

Check your TERM variable, especially if you are setting it and/or using 'tput' commands in your menu script.

Regards!

...JRF...
Uday_S_Ankolekar
Honored Contributor

Re: Junk

Hi,

This could be your terminal setting problem. Export your terminal setting to vt100 or hp depending on what kind of terminals you are using
the command would be
TERM=hp;export TERM. Replace hp with appropriate terminal type
Goodluck
-USA..


Good Luck..
harry d brown jr
Honored Contributor

Re: Junk

Most definitely your TERM variable is screwed up. When you said you "upgrade" from 10.20 to 11.0, did you do a fresh install of 11.0 or actually upgraded?

live free or die
harry
Live Free or Die
Sridhar Bhaskarla
Honored Contributor

Re: Junk

tput is the way to go for scripts that spawn menus.

Check your TERM variable and set it appropriately otherwise.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
N.S. WARGHADE
Occasional Contributor

Re: Junk

Thanks for quick responce friends.

I have installed fresh 11.x. I have set TERM=vt100;
Also using tput in scripts.
But the junk appears in unix script menu as well as forms field also.

THanks
Hello unix
Sanjay_6
Honored Contributor
Solution

Re: Junk

Hi,

Try some other termcap.

TERM=vt220;export TERM

or

export TERM=vt220

If you are using hp console, use

export TERM=hp

Hope this helps.

Regds
Bill Hassell
Honored Contributor

Re: Junk

This is a common problem, especially on the console. Start by identifying the terminal you are using:

Is it a real terminal, you know, the kind with a keyboard and no disk or mouse or soundcard or USB or LAN...you get the picture--a 'real' terminal. If so, is it an HP terminal? If yes, then the value for TERM should be a minimum of "hp". This is handled automatically by /etc/profile with the ttytype program (more about that later). If it is a modern HP smart terminal, the value will be more specific such as TERM=hp70094.

If it is a non-HP terminal (or a cheap imitation of the real thing called a terminal emulator), then things get complicated. The terminal must match the capabilities listed for that terminal's model. To see the capabilities, use untic as in:

$ untic vt100

and you'll see some cryptic information. You can decode these details with the terminfo man page (big manpage warning!). So if the terminal is truly a vt100 or proper subset, then TERM=vt100 will get things going.

Note that there is NO guarenteed way to accurately identify every terminal! Dumb terminals are just that--too stupid to answerback anything useful. Smart terminals do a better job, but emulators are quite random in features.

HOWEVER: The proper behavior of a terminal is very dependent on the application program (you mentioned menu program) using the curses library or a script using tput. If the program is not using curses, then most likely there are hardcoded escape sequences (bad design) which will have to be handled with a rewrite.

Now for the LKFAQs (Little-Known FAQs): The A,N and L-class computers have a separate processor called the GSP and it runs independently of the main CPU(s) and HP-UX. It can be reached via the console, the remote support modem and/or the LAN console if equipped. The designers of the GSP made changes to communication drivers such that regardless of the terminal actually connected to the console port (and only the console port), the value for TERM would be overridden by the GSP code.

This means that by default, an HP terminal such as an HP 700/94 connected to an A-,N-, or L-class machine will have TERM=vt100 when /etc/profile runs, and this causes the cursor to jump around and mess up other programs such as sam and swinstall. The fix is usually stated: change the 700/9x emulation to EM100 (emulate vt100) which is not a good workaround. vt100 emulation performs very poorly for tools like sam, swinstall and glance as there are no such things as function keys.

Instead, the fix is (on the console) to type CTLR-B so you can get the GSP prompt. You will be asked to login but is never setup before, just press Return a couple of times. Then type the command CA (UPPERCASE or lowercase OK) to configure the serial port. Answer Y then Return for the next couple of questions, then Y to modify the Current Terminal Type. Change from vt100 to hpterm, and press Return. Answer N to change the Remote Console and you are done.

BTW: if you want to turn off that blinking ATTN light, type the command: SL then E, then read what you like, and finally, type Q to exit back to GSP.

Finally, return the GSP back to console mode by typing CO. Now, when you login at the console using an HP smart terminal, the TERM value will be set correctly (assuming you have configured the HP terminal to HP mode and not EM100 mode).


Bill Hassell, sysadmin
N.S. WARGHADE
Occasional Contributor

Re: Junk

Hi Bill Hassell ,
I am using dumb terminal. The same had working fine with 10.20 hp-ux, the junk problem is coming when it is connected 11.x hp-ux.

Any solution.
Hello unix
Sridhar Bhaskarla
Honored Contributor

Re: Junk

am not begging for points.. but sometimes we do not want to elaborate minor things like "how to set TERM" variable. So I simply mentioned to set it appropriately so that you could try with different TERM types.

We had a post by Dan previously about assigning the points. By seeing the time stamps of the first four posts one could easily understand that they were posted simultaneously.

Interestingly all other posts got some acknowledgements (I prefer to call than points) except for mine.

Again. It's not about points. It's about showing courtesy that someone tried to spend sometime how small it might be.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try