- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Trouble with the DISPLAY variable
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
тАО03-12-2001 02:20 AM
тАО03-12-2001 02:20 AM
I have a problem with the DISPLAY variable when I try to start an application on another server.
Server A is the one I am logged in to. Server B is the one holding the application I want to start. How do I set the DISPLAY variable to point to my screen without typing my screens name in. I.e. I want the DISPLAY to be set dynamicaly depending on whatever server/X-window terminal I'm using. This should be done in a script/ several scripts.
(the -display flag isn't availible for the application, sadly).
Regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2001 02:32 AM
тАО03-12-2001 02:32 AM
Re: Trouble with the DISPLAY variable
You can use this piece of (sh) script (in your profiles for instance):
--snip--
DISPLAY_HOST=$(who -muR | awk '{print $NF}')
DISPLAY_HOST=${DISPLAY_HOST%%:0.0}
DISPLAY=$DISPLAY_HOST:0.0
export DISPLAY
--snip--
But this will work only from one server to another one. If you are on server A, and logs onto server B, then DISPLAY will be set to A:0.0. But if you are logging onto server C from server B, then DISPLAY will be set to B:0.0 !
I hope this helps !
Best regards.
Fred.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2001 02:46 AM
тАО03-12-2001 02:46 AM
Re: Trouble with the DISPLAY variable
Hey, there's another discussion on this
relating to a problem with root user opening
display. Pay attention and make sure the .profile is sourced by dt on dtlogin!
Well that's the hunch!!
Later,
Bill
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2001 03:40 AM
тАО03-12-2001 03:40 AM
Re: Trouble with the DISPLAY variable
Is there any way to make the DISPLAY variable point to server A when logging into B and then C? That would be very useful. =)
Bill:
Which forum and what is the title/subject of that discussion?
/regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2001 04:28 AM
тАО03-12-2001 04:28 AM
SolutionI think that the only way to do that is to encode the DISPLAY information into the TERM variable: have a look at the following thread:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x4f7d37f45ef7d4118fef0090279cd0f9,00.html
And more precisely to the last post, from Tim Malnati. There is a script attached that should help you.
Wishing you luck.
Best regards.
Fred.