Operating System - HP-UX
1819687 Members
3432 Online
109605 Solutions
New Discussion юеВ

Reflection for Unix & Digital session

 
Alan Meyer_4
Respected Contributor

Reflection for Unix & Digital session

I'm having a difficult time with the key function key mappings in the reflection sessions conencted to my HP servers. For instance, when I am in Glance and I want to look at the Memory pane, I press F3 and get the find menu box from the reflections application.

Has anyone else had this issue and, if so, what have you done to resolve it?

Thanks,
-alan
" I may not be certified, but I am certifiable... "
23 REPLIES 23
Bill Hassell
Honored Contributor

Re: Reflection for Unix & Digital session

The emulator for Unix/Digital defaults to a really dumb terminal called a vt100. A vt100 has no programmable softkeys at all. So the keys are given local features for the emulator. Change the terminal emulation to vt220 or higher. Then logout and back in again. Then check the value for TERM:

echo $TERM

It should match you emulation setting. To change the emulation mode, select Setup -> Terminal. Also check that your terminal response matches the emulation: select Connection -> More Settings, then check the option to: Use emulation ID.


Bill Hassell, sysadmin
Mahesh Kumar Malik
Honored Contributor

Re: Reflection for Unix & Digital session

Hi Alan

You may set TERM=hp and then try Glance

Regards

Mahesh
Bill Hassell
Honored Contributor

Re: Reflection for Unix & Digital session

Actually, manually setting the TERM value, either at the command line or hardcoded in login profiles will cause a lot of problems with menu programs like Glance, SAM, top, swintstall, etc. The WRQ prodict called Reflection for Unix/Digital has no HP terminal capability. The character mode programs mentioned have no way to determine what type of terminal you are using (there are hundreds of models, many are radically different). SO you must allow HP-UX to set the TERM variable to match what you are using.

In HP-UX, there have been two methods to do this, the tset program and ttytype. tset is deprecated due to lack of updates and a very clunky option list, while ttytype works quite well. Here's what ttytype does: It sends a number of terminal query sequences, pausing for one second to listen for a response. The first is query is for the Wyse family. If no response, a query for ANSI or vt100 products. Still no response, then a query is sent for HP terminals. If no response is received at all, the program pauses and asks for a terminal model--BUT the model must match one of the known models in the terminfo database located in /usr/lib/terminfo.

Unfortunately, both the man page for ttytype as well as default profiles from HP bypass the ttytype program if TERM has already been set. It turns out that telnet protocol allows for the passing of the client's currrent value of TERM. When all connections through telnet/ssh/rlogin come from other HP-UX machines, this is fine. But login from a Linux box and the TERM value may be preset to TERM=linux, totally useless because there is no such terminal as linux, and it is not found in the terminfo database.

So the fix is to modify /etc/profile and remove all the preset TERM tests, in other words, always run ttytype in /etc/profile (and /etc/csh.login if you allow this shell to be used). Something like this:

change this:

if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup" \
-o "$TERM" = "network" ]
then
eval `ttytype -s -a`
fi
export TERM

to this:

eval $(ttytype -s)
export TERM

Now, every time you login, no matter what terminal emulator you are using (and settings in the emulator), the TERM variable will be set correctly.

WRA does make an HP terminal emulator called Refection for HP which does include a few vtXXX emulations along with the HP terminal emulations. If you've been stuck using vt100 type emulators on HP-UX, using a 'real' HP terminal is a big step up in useability. Labels for programmable keys are 2 lines, display enhancements make the menus a breeze to navigate, screen memory can be made extremely long and printing a screen, selected text or all of memory is trivial.


Bill Hassell, sysadmin
TwoProc
Honored Contributor

Re: Reflection for Unix & Digital session

If you have the "Reflection for HP with NSVT" version, then there is full hpterminal emulation (character mode). There is a difference in price vs regular Reflection, but it covers a range of HP terminal emulations.
http://www.attachmate.com/en-US/Products/Reflection/Technical+Specifications/Reflection+for+HP+with+NSVT.htm
It *does* say that the HP terminal types are for HPe3000 computers, but I've used them in the past with success on HP9000 systems. However, that was probably version 9 (back then called "Enterprise Version"). The current version is version 13.

If you don't want to spend the extra $$$ on the special version of Reflections - you can easily use /usr/bin/X11/hpterm on the "Regular" version of Reflections X instead of using /usr/bin/X11/xterm from the Reflections command line. This gives you a great hpterminal in xwindows.

My F3 key works fine for memory report - with no modification of the keymap using hpterm. Command line from Reflections through the ssh connect method is
(/usr/bin/X11/hpterm -fn user9x17 -sl 2500 -sb -ls -display %IP#% -name %T% &)
The TERM variable that works with this is "hpterm"

We are the people our parents warned us about --Jimmy Buffett
Steven E. Protter
Exalted Contributor

Re: Reflection for Unix & Digital session

I think the best bet is to build TERM=vt220 into the startup script for Reflections.

That keeps it out of the user profiles.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
TwoProc
Honored Contributor

Re: Reflection for Unix & Digital session

Just for clarification(I'm not sure if this is what SEP is referring to) - When I mentioned that "hpterm" was the term variable that worked, I didn't actually manually "set" it, it was evaluated for me by the .profile script (the default test section taken from root's default .profile that I like to copy to user accounts).

if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
We are the people our parents warned us about --Jimmy Buffett
Alan Meyer_4
Respected Contributor

Re: Reflection for Unix & Digital session

I've got the proper TERM setting, the problem is with the keyboard mappings within the Reflection program. My question is, does anyone have the proper keyboard map settings (file) to get the correct function key mappings?
" I may not be certified, but I am certifiable... "
TwoProc
Honored Contributor

Re: Reflection for Unix & Digital session

Well, it's the default keyboard mapping. The "HP Function Key" F3 is mapped to F3.

I'm sending the keyboard map file that it is using as an attachment.

We are the people our parents warned us about --Jimmy Buffett
Bill Hassell
Honored Contributor

Re: Reflection for Unix & Digital session

As mentioned, you cannot 'map' the keys because they are non-functional in vt100 mode. For those that have have never seen/touched a DEC vt100, here is a resource page:

http://vt100.net/
or better yet
http://vt100.net/vt_history

A vt100 has no programmable keys at all so the Reflection program rightfully assigns local features to the keys. In order for Glance to use the keys, it must first download the codes to the keys or reset the keys to their default settings. Since there aren't any, the f1-f12 keys are non-functional.

So change the emulation mode to vt200 or higher and verify that $TERM matches the new emulation mode after you login. Then your PC function keys will be part of the terminal feature set.


Bill Hassell, sysadmin
Alan Meyer_4
Respected Contributor

Re: Reflection for Unix & Digital session

Bill, my TERM and the emulation is set to vt220. The F3 key is still mapped to the find function from the Reflection program while in Glance.

John, I'm looking inside the emulation window to load the map file and cannot find where it loads.
" I may not be certified, but I am certifiable... "
Bill Hassell
Honored Contributor

Re: Reflection for Unix & Digital session

OK. That's the correct setup. It looks like some of your keys have been manually mapped. While you're at a shell prompt (not in the middle of Glance), select: Setup -> Keyboard Map. Then click on Defaults and OK. Now run Glance and it should be OK. To make this setting permanent, click on File -> Save and all the keyboard changes (and color scheme and any other settings) are kept in the default .r2w settings file.


Bill Hassell, sysadmin
Alan Meyer_4
Respected Contributor

Re: Reflection for Unix & Digital session

No go Bill, F3 stays mapped to the find function.
" I may not be certified, but I am certifiable... "
Bill Hassell
Honored Contributor

Re: Reflection for Unix & Digital session

OK. That's the correct setup. It looks like some of your keys have been manually mapped. While you're at a shell prompt (not in the middle of Glance), select: Setup -> Keyboard Map. Then click on Defaults and OK. Now run Glance and it should be OK. To make this setting permanent, click on File -> Save and all the keyboard changes (and color scheme and any other settings) are kept in the default .r2w settings file. That should fix the mapping problem.


Bill Hassell, sysadmin
DCE
Honored Contributor

Re: Reflection for Unix & Digital session

Alan,

have you tried logging in using Reflections X instead of Host - Unix? The F keys work fine in the hpterm window.

Steven E. Protter
Exalted Contributor

Re: Reflection for Unix & Digital session

It has been brought to my attention that my first post would break certain hp products like Glance.

So please ignore my mistake.

It might be possible to make .profile or /etc/profile smart enough to recognize the login type and issue stty commands to deal with the issue at hand.

I don't quite have my lab running yet in Israel, though the 9000 servers are up, Or I'd try it for you.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: Reflection for Unix & Digital session

Sorry for the double post. I re-read your note and the mapping for f3 is to a function not available in the keyboard mapping. Check the changed settings by selecting: Settup -> View Settings -> click on Changed from factory default. The list presented are all the differences between a true default settings file and what you're using now. f3=Find is very strange so I suspect something is wrong with the settings file.


Bill Hassell, sysadmin
DCE
Honored Contributor

Re: Reflection for Unix & Digital session

Alan

If you use Reflection X I forgot to mention to unset your DISPLAY - this allows the non-graphical form of some apps to run.

sorry about the omission
TwoProc
Honored Contributor

Re: Reflection for Unix & Digital session

Alan, they key file I sent was for hp terminal emulation. I know that you're also trying an alternate solution for vt200, which is fine. But for trying the map I sent - you should be using the command I sent you, or something similar that invokes "hpterm". And your environment variable TERM must be set/evaluated to be "hpterm". Also, under the "Keyboard Remapping" dialog box - the drop down box above the second visible "virtual" keyboard should be changed from "UNIX Function Keys" to "HP Function Keys". Don't confuse what I'm trying to show you with what Bill is and Steven are, as it is a different approach. Keep in mind that they've been doing this a long time, so their method should work too - I'm just not familiar with doing it that way to get the Function keys to work.
We are the people our parents warned us about --Jimmy Buffett
Alan Meyer_4
Respected Contributor

Re: Reflection for Unix & Digital session

I can make it work great with X using hpterm, but I wanted to use the vt terminal emulation because it is usually a faster connection. I may have to use the X connection until I can convince someone to purchase the Reflection for HP package.

the function key mapping isdefinately something that is done by the Reflection program overlayed on top of whatever mapping is done by ther TERM setting. I know this because the F8 key works fine to exit Glance, but Reflections maps the F1 & F3 keys to help and find.

Thanks for all your help I appreciate it.
" I may not be certified, but I am certifiable... "
TwoProc
Honored Contributor

Re: Reflection for Unix & Digital session

OK Alan,

What about under the "settings" Drop down menu. When you click on the "Keyboard" icon - what is the setting for "Allow clients to remap keyboard" - is it currently checked on? I'm thinking it should be turned on.
We are the people our parents warned us about --Jimmy Buffett
Alan Meyer_4
Respected Contributor

Re: Reflection for Unix & Digital session

I don't have a settings option. I have a setup with a view settings selection. but the items listed do not include "Allow clients to remap keyboard".

I'm thinkuing tha twe have different versions of Reflections here. Mine is version 10.
" I may not be certified, but I am certifiable... "
TwoProc
Honored Contributor

Re: Reflection for Unix & Digital session

I'm pretty sure it was there in v 10. Are you looking at the "Settings" drop down that has the vertical list in icon form. You click on the keyboard icon in that vertical scrolling list. Can you try it again to find it in that part?
We are the people our parents warned us about --Jimmy Buffett
Alan Meyer_4
Respected Contributor

Re: Reflection for Unix & Digital session

nope, the only settings available is the "View Settings" and it does not have icons under it at all.
" I may not be certified, but I am certifiable... "