- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Remote Display location
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
05-31-2002 05:50 AM
05-31-2002 05:50 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2002 05:58 AM
05-31-2002 05:58 AM
Re: Remote Display location
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2002 05:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2002 05:59 AM
05-31-2002 05:59 AM
Re: Remote Display location
export DISPLAY=`who am i -R | cut -f2 -d'(' | cut -f1 -d')'|cut -f1 -d':'`:0.0
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2002 06:03 AM
05-31-2002 06:03 AM
Re: Remote Display location
# who am i -a
jim ttyp2 May 24 07:05 . 17773 121.101.162.27
# who am i -a | awk '{print $8}'
121.101.162.27
would be that IP address you're loking for..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2002 06:15 AM
05-31-2002 06:15 AM
Re: Remote Display location
Here's what I use:
set +u
if [ "$DISPLAY" ]
then
:
else
term=`tty | cut -c6-`
export DISPLAY=`who -u | grep "$term " | awk '{print $1}'`":0.0"
fi
set -u
The reason for "set +u" is explained in:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xab497b8d1de3d5118ff40090279cd0f9,00.html
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2002 06:26 AM
05-31-2002 06:26 AM
Re: Remote Display location
who am i -T is an excellent one , also you may try grep on the user name using who ,
who -T | grep user name | awk '{print $9}'
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2002 06:30 AM
05-31-2002 06:30 AM
Re: Remote Display location
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2002 07:06 AM
05-31-2002 07:06 AM
Re: Remote Display location
"who am i -T" looks real good!
Looking back I see my reply doesn't make much sense without some explanation. I wrote it like I did to address an issue with rlogin windows from a CDE sesson.
I use this for a small number of people that use Hummingbird Exceed from their PC. They start their CDE session on one server then open rlogin windows to other servers. Then they often su to other accounts. In the rlogin sessions, "who am i -T" will show the CDE server as where they are logged in from. Setting DISPLAY to that server won't work for displaying on their PC.
To get around that, I ASSUME the user will always log in from his own PC. I add the login name as an alias in /etc/hosts for his PC. That way I can pick off the loginname and set DISPLAY to it.
Also, I check to see if DISPLAY is already set in case the user has manually set it.
"who am i -T" (or "-u") is much more simple than getting the tty and grepping who -u output. I'll definitely start using that.
Darrell