- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: remove xterm query on login
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
02-03-2006 01:21 AM
02-03-2006 01:21 AM
I need to remove the xterm query on login. Always when I switch the user with "su- user" I get:
TERM=(hp)
and have to type "xterm". I want to avoid that, but don't know how, will be greatful for any ideas.
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2006 01:26 AM
02-03-2006 01:26 AM
Re: remove xterm query on login
Change your .profile
Remove the section
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
Replace it by
TERM=xterm;export TERM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2006 01:45 AM
02-03-2006 01:45 AM
Solutionif [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
with:
eval $(ttytype -s)
Not only does this query the terminal to find out exactly what terminal it is, but it always runs whereas the code above only runs if TERM is not set. TERM can be set by a telnet subcode from another computer and the likelihood that the remote computer defines the TERM value correctly (for HP-UX) is very low. The eval above will set the terminal characteristics correctly each time. Check out what ttytype does with the command:
ttytype -s
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2006 02:34 AM
02-03-2006 02:34 AM
Re: remove xterm query on login
running "sudo -u user stopsap", I get an ouput:
SAPSYSTEMNAME not set.
This means, that sudo didn't take the user environment and didn't set this variable.
Can I set it up over sudo?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2006 03:07 AM
02-03-2006 03:07 AM
Re: remove xterm query on login
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2006 07:11 PM
02-05-2006 07:11 PM
Re: remove xterm query on login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2006 07:13 PM
02-05-2006 07:13 PM
Re: remove xterm query on login
You asked " Could you tell me how to reload a .profile, or at least what should I look for?"
# . /.profile
or
$ . $HOME/.profile
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2006 07:26 PM
02-05-2006 07:26 PM
Re: remove xterm query on login
I ment how to do this in a single command using sudo, for example running the profile-script for user "admin" and running any command, that requires the .profile to be run before executing this command. :(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2006 07:52 PM
02-05-2006 07:52 PM
Re: remove xterm query on login
You can use # su -
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2006 07:59 PM
02-05-2006 07:59 PM
Re: remove xterm query on login
From Perl I have to take sudo, but then occurs the problem with the environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2006 08:20 PM
02-05-2006 08:20 PM
Re: remove xterm query on login
su - $user -c $command $options
_______________________________________