- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- stty : : not a typewriter message
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
Forums
Discussions
Discussions
Discussions
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
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
04-17-2003 02:03 AM
04-17-2003 02:03 AM
HP-UX is producing a message
stty: : Not a typewriter (note the 2 colons!)
I want to suppress this properly, but can't see exactly where the culprit is. Do you know?
This occurs (a) when executing a !echo something-or-other from with an isql subshell, and (b) when executing a .!sh on a command line within vi.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2003 02:10 AM
04-17-2003 02:10 AM
Solutionread this -
> This is caused by the 'stty' settings you have in
> your user profile (either ~/.profile or /etc/profile)
> Try commenting them out and then login again.
>
> Rcp is notorious for failing for this reason.
> For example, the following is an excerpt of the man page
> for csh on HPUX:
>
> WARNINGS
> The .cshrc file should be structured such that it cannot generate any
> output on standard output or standard error, including occasions when
> it is invoked without an affiliated terminal. rcp(1) causes .cshrc to
> be sourced, and any output generated by this file, even to standard
> error causes problems. Commands such as stty(1) should be placed in
> .login, not in .cshrc, so that their output cannot affect rcp(1)..
also, see this link -
http://bizforums.itrc.hp.com/cm/QuestionAnswer/0,,0xc726543254bfd611abdb0090277a778c,00.html
HTH.
- ramd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2003 02:32 AM
04-17-2003 02:32 AM
Re: stty : : not a typewriter message
In lieu of unconditionally defeating the 'stty' logic found in a '.profile', you can make the execution conditional when the process is associated with a terminal, giving the "best of both worlds":
...
if [ -t 0 ]; then
stty ...
fi
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2003 04:42 AM
04-17-2003 04:42 AM
Re: stty : : not a typewriter message
/etc/profile
/etc/csh.login
$HOME/.profile
$HOME/.cshrc
$HOME/.kshrc
and whatever additional shell profiles might be on the system. It is often useful to separate all the interactive commands into a separate file and source that file only if interactive.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2005 09:24 AM
02-03-2005 09:24 AM
Re: stty : : not a typewriter message
"The sysadmin must rewrite the profiles to only run terminal commands IF the script has a real terminal attached."
Bill: Can you give an example of HOW to do this (what the code would look like)?
Thanks,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2005 09:37 AM
02-03-2005 09:37 AM
Re: stty : : not a typewriter message
Have the profile find out if the session is interactive:
case $- in
*i* ) export INTERACTIVE=/sbin/true
;;
* ) export INTERACTIVE=/sbin/false
;;
esac
Then you can you can change you terminal commands:
if [$INTERACTIVE]
then
/sbin/stty {insert whatever here}
etc.
etc.
fi
Hope it helps.
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2005 09:54 AM
02-03-2005 09:54 AM
Re: stty : : not a typewriter message
Thanks. CAn I tell jsut by looking at the profile?
The profile looks like this:
# @(#)B.11.11_LR
# DEFAULT user .profile file (/usr/bin/sh initialization)
# Set up the terminal:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
# Set up the search paths
PATH=$PATH:.
# Set up the shell environment
set -u
trap "echo 'logout'" 0
#Set up the shell variables
EDITOR=vi
export EDITOR
# Set up for application
#. abcde_env
The last line should be uncommented but it's commented because of the errors I was getting ... this _env actually puts up some screen options and I'm not sure how to pass the screen answer to it via a script!
For example: After I su to this person and get their profile (with the _env) a screen comes up for them to choose 1, 2, 3, 4, or 5.
I also need to figure out how to pass a choice ... any help there as well?
Thanks!
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2005 02:38 PM
02-03-2005 02:38 PM
Re: stty : : not a typewriter message
similar type problem was there in my system.i think system is not able to determine the terminal type.
then i included the following line in my .profile
export TERM=vt100
the problem got solved.
regds,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2005 01:50 AM
02-04-2005 01:50 AM
Re: stty : : not a typewriter message
1. Test for interactive in /etc/profile as in:
case $- in
*i* ) export INTERACTIVE=/sbin/true ;;
* ) export INTERACTIVE=/sbin/false ;;
esac
2. Put all the terminal (interactive commands inside an interactive section:
if $INTERACTIVE
then
... terminal code
fi
3. GET RID of this tset code:
# Set up the terminal:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
and replace all of the above with:
if $INTERACTIVE
then
eval $(ttytype -s)
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff -parity
stty susp \^Z dsusp \^Y
tabs
fi
Now, the interactive (terminal) commands ttytype, stty and tabs will not be run if the script is being run in batch (ie, cron or at) . The tset command is deprecated (obsolete) for modern terminals and emulators. Use ttytype and remove all tests concerning the $TERM value. $TERM should never be hardcoded. Use the ttytype command to ask the terminal what it is.
Bill Hassell, sysadmin