HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Tput mc5 and tput mc4 V11.00
Operating System - HP-UX
1830574
Members
2540
Online
110015
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
07-25-2002 01:13 AM
07-25-2002 01:13 AM
Tput mc5 and tput mc4 V11.00
tput mc5 turn on the printer
and tput mc4 turn off the printer these commands allow to print a file by a cat command whithout echo on screen and preserve format file. with hp-ux 10.20 no problem, but since V11.00 these commands are no longer running ?
must I apply a patch ?
thanks a lot for the answers.
Didier Auffray
and tput mc4 turn off the printer these commands allow to print a file by a cat command whithout echo on screen and preserve format file. with hp-ux 10.20 no problem, but since V11.00 these commands are no longer running ?
must I apply a patch ?
thanks a lot for the answers.
Didier Auffray
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2002 04:06 AM
07-25-2002 04:06 AM
Re: Tput mc5 and tput mc4 V11.00
What TERM value has been setup for your terminal? tput looks up your $TERM value in the terminfo database and if there is an entry for mc4 or mc5, returns the appropriate codes. Try this:
tput mc4 | cat -v
If you don't get anything at all, then the current value for $TERM does not have this code in the terminfo database. To see that tput works normally:
TERM=2392a tput mc4 | catv -
You should see: ^[&p13C
which is the correct escape sequence for the HP 2392a terminal to enable the printer in passthru mode. Now if that does not work, I would check permissions on the /usr/lib/terminfo directories and make suewr you get something back for the command:
untic $TERM
This will report the terminal's capabilities (albeit cryptic) for your current $TERM setting.
Bill Hassell, sysadmin
tput mc4 | cat -v
If you don't get anything at all, then the current value for $TERM does not have this code in the terminfo database. To see that tput works normally:
TERM=2392a tput mc4 | catv -
You should see: ^[&p13C
which is the correct escape sequence for the HP 2392a terminal to enable the printer in passthru mode. Now if that does not work, I would check permissions on the /usr/lib/terminfo directories and make suewr you get something back for the command:
untic $TERM
This will report the terminal's capabilities (albeit cryptic) for your current $TERM setting.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2002 05:51 AM
07-25-2002 05:51 AM
Re: Tput mc5 and tput mc4 V11.00
Thank you for your answer Bill, I use a vt220 terminal
under talkman emulator and the command :
tput mc5 | cat -v is no longer running, idem whith a export TERM=2392a
here is the result of untic :
vt220|vt200|vt220-nam|Digital VT220 w/no am,
eo, km, mir, msgr, xon,
cols#80, it#8, lines#24, vt#3,
bel=^G, cr=\r, csr=\E[%i%p1%d;%p2%dr, tbc=\E[3g$<2>,
clear=\E[H\E[J, el=\E[K, ed=\E[J, cup=\E[%i%p1%d;%p2%dH,
cud1=\n, home=\E[H, civis=\E[?25l, cub1=\b,
cnorm=\E[?25h, cuf1=\E[C, cuu1=\E[A, cvvis=\E[?25h,
dch1=\E[1P, dl1=\E[1M, smacs=\E(0, blink=\E[5m,
bold=\E[1m, smdc=, smir=\E[4h, rev=\E[7m,
smso=\E[7m, smul=\E[4m, ech=\E[%p1%dX, rmacs=\E(B,
sgr0=\E[m$<2>, rmdc=, rmir=\E[4l, rmso=\E[27m,
rmul=\E[24m, is2=\E[1;24r\E[24;1H, il1=\E[1L, kbs=\b,
kdch1=\E[3~, kcud1=\EOB, kf1=\EOP, kf10=\E[21~,
kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf6=\E[17~,
kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kich1=\E[2~,
kcub1=\EOD, knp=\E[6~, kpp=\E[5~, kcuf1=\EOC,
kcuu1=\EOA, rmkx=\E[?1l, smkx=\E[?1h, nel=\n,
dch=\E[%p1%dP, dl=\E[%p1%dM, cud=\E[%p1%dB, il=\E[%p1%dL,
cub=\E[%p1%dD, cuf=\E[%p1%dC, cuu=\E[%p1%dA, mc0=\E[0i,
mc4=\E[?4i, mc5=\E[?5i, rs2=\E>\E[?3l\E[?7l, rc=\E8,
sc=\E7, ind=\ED$<2*>, ri=\EM$<2*>,
sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m%?%p9%t\E(0%e\E(B%;,
hts=\EH, ht=\t, kf11=\E[23~, kf12=\E[24~,
kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~,
kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf20=\E[34~,
el1=\E[1K,
so this command run under V10.20.
Thanks to you.
under talkman emulator and the command :
tput mc5 | cat -v is no longer running, idem whith a export TERM=2392a
here is the result of untic :
vt220|vt200|vt220-nam|Digital VT220 w/no am,
eo, km, mir, msgr, xon,
cols#80, it#8, lines#24, vt#3,
bel=^G, cr=\r, csr=\E[%i%p1%d;%p2%dr, tbc=\E[3g$<2>,
clear=\E[H\E[J, el=\E[K, ed=\E[J, cup=\E[%i%p1%d;%p2%dH,
cud1=\n, home=\E[H, civis=\E[?25l, cub1=\b,
cnorm=\E[?25h, cuf1=\E[C, cuu1=\E[A, cvvis=\E[?25h,
dch1=\E[1P, dl1=\E[1M, smacs=\E(0, blink=\E[5m,
bold=\E[1m, smdc=, smir=\E[4h, rev=\E[7m,
smso=\E[7m, smul=\E[4m, ech=\E[%p1%dX, rmacs=\E(B,
sgr0=\E[m$<2>, rmdc=, rmir=\E[4l, rmso=\E[27m,
rmul=\E[24m, is2=\E[1;24r\E[24;1H, il1=\E[1L, kbs=\b,
kdch1=\E[3~, kcud1=\EOB, kf1=\EOP, kf10=\E[21~,
kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf6=\E[17~,
kf7=\E[18~, kf8=\E[19~, kf9=\E[20~, kich1=\E[2~,
kcub1=\EOD, knp=\E[6~, kpp=\E[5~, kcuf1=\EOC,
kcuu1=\EOA, rmkx=\E[?1l, smkx=\E[?1h, nel=\n,
dch=\E[%p1%dP, dl=\E[%p1%dM, cud=\E[%p1%dB, il=\E[%p1%dL,
cub=\E[%p1%dD, cuf=\E[%p1%dC, cuu=\E[%p1%dA, mc0=\E[0i,
mc4=\E[?4i, mc5=\E[?5i, rs2=\E>\E[?3l\E[?7l, rc=\E8,
sc=\E7, ind=\ED$<2*>, ri=\EM$<2*>,
sgr=\E[%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p6%t;1%;m%?%p9%t\E(0%e\E(B%;,
hts=\EH, ht=\t, kf11=\E[23~, kf12=\E[24~,
kf13=\E[25~, kf14=\E[26~, kf15=\E[28~, kf16=\E[29~,
kf17=\E[31~, kf18=\E[32~, kf19=\E[33~, kf20=\E[34~,
el1=\E[1K,
so this command run under V10.20.
Thanks to you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2002 07:29 AM
07-25-2002 07:29 AM
Re: Tput mc5 and tput mc4 V11.00
You wrote:
> I use a vt220 terminal under talkman emulator and the command :
> tput mc5 | cat -v is no longer running, idem whith a export TERM=2392a
I'm not sure what the above means. What do you see with:
echo $TERM
tput mc5 | cat -v
If you see the string: ^[[?5i then your terminfo database is just fine. This ASSUMES that TERM=vt220. If not, then there is nothing wrong with tput...the routines to setup $TERM need to be reexamined. Since talkman is probably not an HP-UX program but some sort of PC emulator, so if $TERM is not set or set to some strange value, let's start with how you connect to the computer: does talkman start a telnet session or is this some sort of Xwindows emulator? It's possible that your PC/talkman/whatever combination is sending a TERM value using the telnet protocol prior to login. Some emulators are smart enough to control the value sent, others cannot be configured.
Do this to see if your terminal can be properly identified at all:
ttytype -s
If you get something like:
TERM='vt220'; export TERM;
LINES=24; export LINES;
COLUMNS=80; export COLUMNS;
ERASE='^H'; export ERASE;
Then all is well. If not, your terminal emulator is not answering like a vt220, at least as it should for the rules in 11.0 (10.20 definitely has a different ttytype command)
To see if this is the case, add this line to the beginning of /etc/profile:
print "TERM=$TERM at start of /etc/profile"
If this does not show up when you login, then:
- you are not using the standard shell (/usr/bin/sh) when you login
- you are using Xwindows and bypassing normal login setup
If you get TERM= at start.. then all is well and the TERM value will be queried later in /etc/profile. If instead, you get something like TERM=ansi or TERM=vt100 or some other value, then your PC has preset the TERM value using the telnet handshake and you have to modify /etc/profile (this all ASSUMES that you are running a standard /etc/profile). Here is the before and after code:
# set term if it's not set
if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup" -o "$TERM" = "network" ]
then
eval `ttytype -s -a`
fi
------
# set TERM (always)
eval `ttytype -s -a`
------
In other words, remove the above if-then-fi clause and always run the eval statement. This should produce TERM=vt220, biut only if the manual execution of: ttytype -s produces the correct result.
Bill Hassell, sysadmin
> I use a vt220 terminal under talkman emulator and the command :
> tput mc5 | cat -v is no longer running, idem whith a export TERM=2392a
I'm not sure what the above means. What do you see with:
echo $TERM
tput mc5 | cat -v
If you see the string: ^[[?5i then your terminfo database is just fine. This ASSUMES that TERM=vt220. If not, then there is nothing wrong with tput...the routines to setup $TERM need to be reexamined. Since talkman is probably not an HP-UX program but some sort of PC emulator, so if $TERM is not set or set to some strange value, let's start with how you connect to the computer: does talkman start a telnet session or is this some sort of Xwindows emulator? It's possible that your PC/talkman/whatever combination is sending a TERM value using the telnet protocol prior to login. Some emulators are smart enough to control the value sent, others cannot be configured.
Do this to see if your terminal can be properly identified at all:
ttytype -s
If you get something like:
TERM='vt220'; export TERM;
LINES=24; export LINES;
COLUMNS=80; export COLUMNS;
ERASE='^H'; export ERASE;
Then all is well. If not, your terminal emulator is not answering like a vt220, at least as it should for the rules in 11.0 (10.20 definitely has a different ttytype command)
To see if this is the case, add this line to the beginning of /etc/profile:
print "TERM=$TERM at start of /etc/profile"
If this does not show up when you login, then:
- you are not using the standard shell (/usr/bin/sh) when you login
- you are using Xwindows and bypassing normal login setup
If you get TERM= at start.. then all is well and the TERM value will be queried later in /etc/profile. If instead, you get something like TERM=ansi or TERM=vt100 or some other value, then your PC has preset the TERM value using the telnet handshake and you have to modify /etc/profile (this all ASSUMES that you are running a standard /etc/profile). Here is the before and after code:
# set term if it's not set
if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup" -o "$TERM" = "network" ]
then
eval `ttytype -s -a`
fi
------
# set TERM (always)
eval `ttytype -s -a`
------
In other words, remove the above if-then-fi clause and always run the eval statement. This should produce TERM=vt220, biut only if the manual execution of: ttytype -s produces the correct result.
Bill Hassell, sysadmin
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP