- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- setting DISPLAY programmatically
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
Discussions
Discussions
Forums
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
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-14-2001 06:13 AM
тАО02-14-2001 06:13 AM
setting DISPLAY programmatically
I want to set automatically the environment variable DISPLAY (Client/Server) to the correct ip address or client name of the client. This should be work, if I change the user with su or change the server with rlogin.
Thanks
Marco
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2001 06:19 AM
тАО02-14-2001 06:19 AM
Re: setting DISPLAY programmatically
I'm using a few aliases based on 'xon' which open a new window with the correct DISPLAY variable, as well as the system name in the title. I use these instead of rlogin.
example:
alias newton='xon newton /usr/bin/X11/dtterm -name newton -ls'
Best regards,
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2001 06:32 AM
тАО02-14-2001 06:32 AM
Re: setting DISPLAY programmatically
I use ssh for remote login.
Before that I used xrsh (see attachment).
Thomas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2001 06:52 AM
тАО02-14-2001 06:52 AM
Re: setting DISPLAY programmatically
have a look at this thread
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x9dc579bffde7d4118fef0090279cd0f9,00.html
Bill Hassel has a great solution.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2001 07:39 AM
тАО02-14-2001 07:39 AM
Re: setting DISPLAY programmatically
you could put the following in your .profile:
if [ `who -a am i | grep -c dhcp` -eq '1' ]
then
export DISPLAY=`who -a am i | awk '{print $NF}'`:0.0
echo $DISPLAY >~/.homedisplay
else
export DISPLAY=`cat ~/.homedisplay`
fi
My "home display" is a PC with a dhcp-something hostname. If you have a "fixed" home machine - replace
dhcp with it's hostname.
rlogins will now have DISPLAY's pointing back to your home.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-14-2001 09:22 AM
тАО02-14-2001 09:22 AM
Re: setting DISPLAY programmatically
One way around this is to insert the DISPLAY information within the TERM variable before you pass it and then parse it back out on the other end. I've attached a file that contains the essential script elements to do this on both sides.