- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Strange tty behaviour
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-26-2004 01:23 AM
04-26-2004 01:23 AM
I have a weird problem. When I telnet into machine x I login in fine - no errors. When I rlogin, the profile develops an error which I have traced to the use of `tty` to determine the device file. When rlogged in, typing tty produces "not a tty" (which is where the profile error comes from) and when I type ps I get "ps: don't know which terminal to select".
Can anyone help?
Thanks,
Tony
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 01:33 AM
04-26-2004 01:33 AM
Re: Strange tty behaviour
Do you have something like this in your .profile??
# 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
echo
echo "Value of TERM has been set to \"$TERM\". "
export TERM
EDITOR=vi
export EDITOR
fi # if !VUE
Also, are you telnet'ing or rlogin'ing(?) from another unix box or from a M$ PC? If so, what software (terminal emulator) are you using?
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 01:51 AM
04-26-2004 01:51 AM
Re: Strange tty behaviour
# Set TERM variables
#
if [ `tty` = /dev/console ]
then
if [ $LOGNAME = "root" ]
then
TERM=hp
else
TERM=wyse50
fi
WSID=no
else
TERM=vt220
I'm telnetting/rlogin from another HP machine.
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 03:29 AM
04-26-2004 03:29 AM
Re: Strange tty behaviour
rlogin, then issue:
tset -r
What term type is returned?
Your script, ON the CONSOLE, will set root to termtype=hp and any other account on the console to "wyse50".
All other locations will set the TERM to vt220. Are you exporting TERM?
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 03:40 AM
04-26-2004 03:40 AM
Re: Strange tty behaviour
Erase is Backspace
Kill is Ctrl-U"
And TERM is exported a few lines further down than the ones I've detailed above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 06:43 AM
04-26-2004 06:43 AM
Re: Strange tty behaviour
login and type in:
alias
Is "ps" redefined (aliased) ??
Do an "ls -l /dev/pts", do you have any, if so then how many?
Also, try these:
# grep telnet /etc/inetd.conf
telnet stream tcp nowait root /usr/lbin/telnetd telnetd
# ls -l /usr/lbin/telnetd
-r-xr--r-- 1 bin bin 94208 Sep 16 2002 /usr/lbin/telnetd
# what /usr/lbin/telnetd
/usr/lbin/telnetd:
Copyright (c) 1983, 1986 Regents of the University of California.
Patch ID: PHNE_24829
#
Also, type in "env".
Also, are you loggin in as "root" or a "common" user??
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 12:00 PM
04-26-2004 12:00 PM
Solutioneval $(ttytype -s)
You will always have terminal problems when you set TERM= something since the script has no idea what is conected. All it takes is a user to change emulators or options on a terminal and the hardcoded TERM= will create problems. By using ttytype, the TERM value will be set automatically (as long as the terminal behaves like one of the several dozen models listed in /usr/lib/terminfo)
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2004 08:50 PM
04-26-2004 08:50 PM
Re: Strange tty behaviour
Alas I've come in this morning and the problem no longer exists:| Bill, I'll look into implementing the use of ttytype instead - looks like its about time some of our machines got a rewrite!
Cheers,
Tony