- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Standard Terminal Sizes?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2006 11:14 PM
тАО06-07-2006 11:14 PM
I'm interested in interfacing with HP-UX, but also with Linux, and it feels like I've outgrown 132 columns ...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2006 11:49 PM
тАО06-07-2006 11:49 PM
Re: Standard Terminal Sizes?
http://www.seagullsoftware.com/products/bluezone/faq/emulation-faq.html
Under TN3270/TN3270E screen sizes:
Model 3290 (62 x 160)
So it may be possible in general, although I'm not sure if it would work under HP-UX.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2006 11:58 PM
тАО06-07-2006 11:58 PM
Re: Standard Terminal Sizes?
Just tested that on my 22" LCD, and got to a readable workable xterm of 314 columns.
With the smallest font I've configured available for my xterms here on my laptop, I get to 250 columns and 105 visible lines (scrollback stores 5000 more), which I use *very* often, for example to review the statistics I post here.
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 12:10 AM
тАО06-08-2006 12:10 AM
Re: Standard Terminal Sizes?
As far a X, I've still got to fix my recent Cygwin update -- some bits, including X were quite broken.
Just looking at terminfo on the two machines in front of me ...
HP-UX 11i:
$ ll -d /usr/lib/terminfo/*/* | wc -l
1827
$ ll -d /usr/lib/terminfo/*/* | grep 3270
$ ll -d /usr/lib/terminfo/*/* | grep 3290
Ubuntu 5.10 (Breezy Badger):
$ ll -d /lib/terminfo/*/* | wc -l
35
$ ll -d /lib/terminfo/*/* | grep 3270
$ ll -d /lib/terminfo/*/* | grep 3290
There seem to be some more limited options under Ubuntu, and neither seem to have 32[79]0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 12:39 AM
тАО06-08-2006 12:39 AM
SolutionI ran the attached script on my SuSE box, and it shows a lot of non-comforming (if you see 80/132 as conforming) terminal defenitions.
--8<---
#!/pro/bin/perl
use strict;
use warnings;
use File::Find;
my %t;
find (sub {
-f or return;
-l and return;
my $term = $_;
local @ARGV = ("infocmp $term |");
while (<>) {
m/^(\w.*)/ and $t{$term}{nm} = $1;
m/\bcols#(\d+)/ and $t{$term}{cl} = $1;
}
}, "/usr/share/terminfo");
foreach my $term (sort keys %t) {
printf "%5d %-16s %s\n", $t{$term}{cl} // 0, $term, $t{$term}{nm} // $term;
}
-->8---
Here's the tail of that list, when piped through sort -n:
144 xnuppc+144x48 xnuppc+144x48|Darwin PowerPC Console 144x48 support (1152x768 pixels),
160 rt6221-w rt6221-w|Ramtek 6221 160x48,
160 xnuppc-160x64-m xnuppc-160x64-m|darwin-160x64-m|Darwin PowerPC Console (monochrome) 160x64,
160 xnuppc-160x64 xnuppc-160x64|darwin-160x64|Darwin PowerPC Console (color) 160x64,
160 xnuppc+160x64 xnuppc+160x64|Darwin PowerPC Console 160x64 support (1280x1024 pixels),
178 guru-76-w guru-76-w|guru 76 lines by 178 cols,
178 guru-76-wm guru-76-wm|guru 76 lines by 178 cols with 255 cols memory,
178 guru-76-w-s guru-76-w-s|ann arbor guru/76 lines+status+wide,
200 xnuppc-200x64-m xnuppc-200x64-m|darwin-200x64-m|Darwin PowerPC Console (monochrome) 200x64,
200 xnuppc-200x64 xnuppc-200x64|darwin-200x64|Darwin PowerPC Console (color) 200x64,
200 xnuppc+200x64 xnuppc+200x64|Darwin PowerPC Console 200x64 support (1600x1024 pixels),
200 xnuppc-200x75-m xnuppc-200x75-m|darwin-200x75-m|Darwin PowerPC Console (monochrome) 200x75,
200 xnuppc-200x75 xnuppc-200x75|darwin-200x75|Darwin PowerPC Console (color) 200x75,
200 xnuppc+200x75 xnuppc+200x75|Darwin PowerPC Console 200x75 support (1600x1200 pixels),
256 xnuppc-256x96-m xnuppc-256x96-m|darwin-256x96-m|Darwin PowerPC Console (monochrome) 256x96,
256 xnuppc-256x96 xnuppc-256x96|darwin-256x96|Darwin PowerPC Console (color) 256x96,
256 xnuppc+256x96 xnuppc+256x96|Darwin PowerPC Console 256x96 support (2048x1536 pixels),
32767 citoh-prop citoh-prop|citoh-ps|ips|citoh in proportional spacing mode,
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 01:08 AM
тАО06-08-2006 01:08 AM
Re: Standard Terminal Sizes?
http://vt100.net/
It really does not matter whether your terminal is set to 132, 150, 200 or more columns. If your favorite menu application was never written to handle variable screen measurements, all you'll get is a mess. Now the good news for HP-UX users is that not only is there a great terminal independent API library called curses, but HP has created a great terminal identifier called ttytype. (note: tset is deprecated)
Now the reason a terminal identifier is so important is that your systems can't guarentee that every user will login with the same terminal emulator. (I'll refer to emulators because almost no modern system uses 'real' glass terminals these days) And worse, each emulator is configurable, from escape sequence options to screen dimensions.
The WORST thing you can do as an adminstrator is to hardcode TERM, COLUMNS and LINES. And the second worst thing is to allow /etc/profile to bypass ttytype if TERM is already set. You absolutely want to test the terminal and set the 3 critical values at every login. Unfortunately, the standard HP-UX /etc/profile assumes that telnet negotiations will preset these variables correctly and bypass ttytype. This ONLY works if you never use PCs, never use Linux and never use a non-HP-UX system for your emulation.
Since this is totally impractical, all /etc/profile files should be modified to always query the terminal. Here is the standard code in /etc/profile:
> if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup" \
> -o "$TERM" = "network" ]
> then
> eval `ttytype -s -a`
> fi
>
> export TERM
>
> # set erase to ^H, if ERASE is not set
> if [ "$ERASE" = "" ]
> then
> ERASE="^H"
> export ERASE
> fi
All that code will do is to use whatever the remote emulator (actually, the telnet client) thinks is the current terminal and screen dimensions. FOr instance, some Linux variants will report TERM=linux which is very strange because linux never manufactured a terminal nor does it define a terminal standard -- it is an OS with many variations and possible emulator choices. Naturally, there is no way to associate this TERM value with a terminal or emulator.
For completeness, I do have to mention tic and untic which allow you to create terminfo entries for anything...read the man pages.
So the above /detc/profile code should be replaced with:
eval $(ttytype -s)
--for csh users, replace the line:
> if ( ! $?TERM ) then # if TERM is not set,
> setenv TERM hp # use the default
> endif
with:
eval ttytype -s
Now as to COLUMNS and LINES:
When you login with a noe-standard screen dimension (typically 24x80), the ttytype command will set the values automatically. However, since the days of 9.0, the special telnet signal SIGWINCH (window change) will update COLUMNS and LINES automatically. BUT *only* if the client side OS (PC, Linux, etc) *AND* emulator is smart enough to send this telnet code:
http://www.faqs.org/rfcs/rfc1073.html
So with some terminal emulators, you can set a new screen size and HP-UX will see this new setting. Some emulators (especially Xwindows) will trigger SIGWINCH whenever you resize the window. (see man 5 signal, and man termio) Note: there is a deprecated command: resize which sort-of emulates ttytype but was designed primarily for Xwindows and csh. If your emulator+OS does not change LINES and COLUMNS, then just type: eval $(ttytype -s) whenever you change the window size. An alternative is to alias this to something simple like:
alias rs='eval $(ttytype -s)'
Then just type: rs whenever you change window size.
Now all of this is background for the question. But the real answer is: use whatever you can see on the screen (90x300 for example) and all will work OK as long as the application understands TERM, COLUMNS and LINES. An application that really works well with a proper TERM COLUMNS LINES setting is vi.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 01:22 AM
тАО06-08-2006 01:22 AM
Re: Standard Terminal Sizes?
"If your favorite menu application was never written to handle variable screen measurements, all you'll get is a mess."
Which I'd like to take as, "If you're writing a terminal-aware program, be prepared to handle variable measurements."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 01:28 AM
тАО06-08-2006 01:28 AM
Re: Standard Terminal Sizes?
which is more completely decribed as: Use terminal independent libraries (ie, curses) and never hardcode ANY escape sequence to accomplish a particular control. The man page for tput (and terminfo) is a great resource for shell scripters writing menu programs.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 02:19 AM
тАО06-08-2006 02:19 AM
Re: Standard Terminal Sizes?
Now it *is* possible to write it yourself, but it is NO fun!
HP, please open-source it!
instead of curses, GNU gives us ncurses, which is even more portable
Enjoy, Have FUN! H.Merijn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 02:48 AM
тАО06-08-2006 02:48 AM
Re: Standard Terminal Sizes?
But as most senior sysadmins spend very little time on the console (or LAN console) using fancy menu programs (let's hear it for command line tools!), it is a minor inconvenience.
It turns out that ttytype could actually be reverse engineered with either a serial analyzer or Ethereal. ttytype groups the hundreds of terminals into 3 main groups: ANSI/DEC-VT, Wyse and HP. The ID process involves sending an automated query escape sequence and waiting for one second for a reesponse. If none, the next emultion (Wyse) is tried and again if no response, then an HP terminal query is done. That's why you see a couple of characters (ie, . and .c) on the screen.
When the terminal responds, the program starts down a table of additional queries. The older the terminal, the less detail comes back. For instance, older HP terminals never replied with a model number (ie, 2645A or 2621P, circa 1975+) but newer terminals (like the 2624A, 2392A and all the 700/xx series) could be queried for their exact model and even features like screen memory, softkey contents and peripherals like printer.
Probably the most valuable part of ttytype source code are the comments. They describe all the convoluted tests for older (or super dumb) terminals.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2006 02:58 AM
тАО06-08-2006 02:58 AM
Re: Standard Terminal Sizes?
BTW truss/tusc are also a major help here.
5581 Jul 2 2001 ttytype.c
(Don't tell anyone)
Enjoy, Have FUN! H.Merijn