- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: stty::not a typewriter
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
08-28-2006 06:10 PM
08-28-2006 06:10 PM
stty::not a typewriter
- Tags:
- tty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2006 06:19 PM
08-28-2006 06:19 PM
Re: stty::not a typewriter
set -vx in your profile (may be it is in /etc/profile) and check where the message is coming from.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2006 06:27 PM
08-28-2006 06:27 PM
Re: stty::not a typewriter
Guess the below ulr should answer your query..
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=891850&admit=-682735245+1156832713212+28353475
Best Regards,
Prashanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2006 07:17 PM
08-28-2006 07:17 PM
Re: stty::not a typewriter
@(#)B.11.11_LR
# Default (example of) system-wide profile file (/usr/bin/sh initialization).
# This should be kept to the bare minimum every user needs.
# Ignore HUP, INT, QUIT now.
trap "" 1 2 3
# Set the default paths - Do NOT modify these.
# Modify the variables through /etc/PATH and /etc/MANPATH
PATH=/usr/bin:/usr/ccs/bin:/usr/contrib/bin
MANPATH=/usr/share/man:/usr/contrib/man:/usr/local/man
# Insure PATH contains either /usr/bin or /sbin (if /usr/bin is not available).
if [ ! -d /usr/sbin ]
then
PATH=$PATH:/sbin
else if [ -r /etc/PATH ]
then
# Insure that $PATH includes /usr/bin . If /usr/bin is
# present in /etc/PATH then $PATH is set to the contents
# of /etc/PATH. Otherwise, add the contents of /etc/PATH
# to the end of the default $PATH definition above.
grep -q -e "^/usr/bin$" -e "^/usr/bin:" -e ":/usr/bin:"\
-e ":/usr/bin$" /etc/PATH
if [ $? -eq 0 ]
then
PATH=`cat /etc/PATH`
else
PATH=$PATH:`cat /etc/PATH`
fi
fi
fi
export PATH
# Set MANPATH to the contents of /etc/MANPATH, if it exists.
if [ -r /etc/MANPATH ]
then
MANPATH=`cat /etc/MANPATH`
fi
export MANPATH
# Set the TIMEZONE
if [ -r /etc/TIMEZONE ]
then
. /etc/TIMEZONE
else
TZ=MST7MDT # change this for local time.
export TZ
fi
# Be sure that VUE does not invoke tty commands
if [ ! "$VUE" ]; then
# set term if it's not set
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
stty erase $ERASE
# Set up shell environment:
trap "echo logout" 0
# This is to meet legal requirements...
cat /etc/copyright
# Message of the day
if [ -r /etc/motd ]
then
cat /etc/motd
fi
# Notify if there is mail
if [ -f /usr/bin/mail ]
then
if mail -e
then echo "You have mail."
fi
fi
# Notify if there is news
if [ -f /usr/bin/news ]
then news -n
fi
# Change the backup tape
if [ -r /tmp/changetape ]
then echo "\007\nYou are the first to log in since backup:"
echo "Please change the backup tape.\n"
rm -f /tmp/changetape
fi
fi # if !VUE
# Leave defaults in user environment.
trap 1 2 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2006 11:08 PM
08-29-2006 11:08 PM
Re: stty::not a typewriter
change the statement
if [ ! "$VUE" ]; then
to
if [ ! "$CDE" ]; then
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2006 11:45 PM
08-29-2006 11:45 PM
Re: stty::not a typewriter
After i have commented out the vue line.
As soon as i login the error message "ttytype: couldn't open /dev/tty for reading
stty: : Not a typewriter
above appears & the entire screen is scrambled
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2006 12:00 AM
08-30-2006 12:00 AM
Re: stty::not a typewriter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2006 12:19 AM
08-30-2006 12:19 AM
Re: stty::not a typewriter
just better: change the statement
if [ ! "$VUE" ]; then
to
if [ ! "$CDE" -o ! -t 1 ]; then
so just every condition, where stdout is not available is caught.
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2006 12:22 AM
08-30-2006 12:22 AM
Re: stty::not a typewriter
$ tty
/dev/pts/ta
If instead you get something like "not a pty" then your login is non-standard. Are you running ssh similar to remsh, that is, simply running a remote or batch command and not an interactive session with a shell prompt?
If so, that is the problem. There are several commands in your profiles that require a 'real' terminal. Among these are:
stty ttytype tset tput tabs
All of them will report "not a typewriter" when you are connected in batch mode. Now this is a common error because cron jobs and other batch or background jobs that perform a profile'd login will not have a tty/pty device. And the fix is to always protect these terminal-only commands:
if tty -s
then
ttytype -s
stty ...
tabs ...
fi
Now if this conditin exists only when more than 10 users on the system, I would suspect that your maximum pty/tty kernel parameter does not match your device files, or someone has removed one or more of these files. To fix this, run SAM and change the 3 parameters:
npty nstrtel nstrpty
all equal to 70 or so (actual number depends on the maximum number of connections you expect in the future). SAM will change the parameter and also repair the device files.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2006 12:31 AM
08-30-2006 12:31 AM
Re: stty::not a typewriter
sh: tty: Parameter not set.
gwsae02:moe:/users2/BAK # $tty
sh: tty: Parameter not set.
Thats the output..
Will check the kernel settings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2006 12:39 AM
08-30-2006 12:39 AM
Re: stty::not a typewriter
The kernel figures are all on 60.I have about 100 cron jobs running,most would be averaging around 30 at atime
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2006 01:21 AM
08-30-2006 01:21 AM
Re: stty::not a typewriter
just call the tty command, no $ in front!
tty
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2006 01:51 AM
08-30-2006 01:51 AM
Re: stty::not a typewriter
get a response
/dev/pts/21
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2006 05:31 AM
08-30-2006 05:31 AM
Re: stty::not a typewriter
so now try =my corrected= entry in .profile:
if [ ! "$CDE" -a -t 1 ]; then
...
fi
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2007 05:39 AM
06-24-2007 05:39 AM
Re: stty::not a typewriter
Even I'm facing the same problem as well. When I manually inserting incidents for a particular message through java consolve the OVO is throwing an error; please check the attachment for ur refernce.
Thanks,
Rama
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2007 07:47 AM
06-24-2007 07:47 AM
Re: stty::not a typewriter
Be carefull while you modify/apply (init q)anything on /etc/inittab as it can casue a reboot.Check if any other critical services are mentioned in the file as thay also may get initialised.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2007 07:58 AM
06-24-2007 07:58 AM
Re: stty::not a typewriter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2007 07:58 AM
06-24-2007 07:58 AM
Re: stty::not a typewriter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2007 08:58 AM
06-24-2007 08:58 AM
Re: stty::not a typewriter
Standard profiles are badly written. They are not correctly designed for batch operations. You must protect *all* interactive programs so they do not run if there is no tty device. The code would look like this:
if tty -s
then
eval $(ttytype -s)
stty erase "^H" kill "^U" intr "^C" eof "^D" -parity ixoff
stty susp \^Z dsusp \^Y
tput reset
tabs
TMOUT=3600
export HISTFILE=${HISTFILE:-$HOME/.sh_history}
export HISTSIZE=5000
DISPLAY=$(who -muR | awk '{print $NF}'):0.0
fi
This should be implemented for any flavor of Unix.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2007 07:32 PM
06-24-2007 07:32 PM
Re: stty::not a typewriter
I'm using OVO 8.x and HP-UX hpus01 B.11.11 U 9000/800 versions.
Thanks,
Rama