- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Automatically set 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
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
тАО09-01-2004 02:51 AM
тАО09-01-2004 02:51 AM
Automatically set DISPLAY Variable ?
With ssh i know how it works:
ssh -X user@host
Do anyone know how it works with rlogin ?
Rene
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2004 02:55 AM
тАО09-01-2004 02:55 AM
Re: Automatically set DISPLAY Variable ?
You can add this to your .profile: -
export DISPLAY=`who -ma | awk '{print $8}'`:0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2004 02:55 AM
тАО09-01-2004 02:55 AM
Re: Automatically set DISPLAY Variable ?
We avoid the problem entirely by using remsh:
remsh
b -sl 500 &
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2004 03:01 AM
тАО09-01-2004 03:01 AM
Re: Automatically set DISPLAY Variable ?
export DISPLAY=`who -um | awk '{print $NF}'`:0
echo "DISPLAY is set for $DISPLAY"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2004 08:15 PM
тАО09-01-2004 08:15 PM
Re: Automatically set DISPLAY Variable ?
hostname: pc14-c803
When i log on an other server machine via the unix server the host name of the server is set to the display variable an not the variable from the windows machine !
How can i set a display variable on a remote machine like the display variable on the local machine ?
Regards,
Rene
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2004 08:34 PM
тАО09-01-2004 08:34 PM
Re: Automatically set DISPLAY Variable ?
Edit your .profile and add the following line:
export DISPLAY=$(/etc/ping $(who -muR | awk '{print $NF}') -n 1 | grep icmp | aw
k '{print $4}')0.0
MB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2004 08:50 PM
тАО09-01-2004 08:50 PM
Re: Automatically set DISPLAY Variable ?
-R is used to print hostname
When ever your IP-Address get's resolved then only hostname will be in the who -am output
Example:
-- /etc/hosts --
ip-address test.test.com test
---------------
If you login as ,
telent test
login/passwd
check the who -am output now,
it will be as test.test.com not with ip-address.
Display value will get problem when using xterm there.
So try to change as,
IP=$(getip `who -am | awk '{ print $8 }'`)
DISPLAY=$(echo $IP:0)
export $DISPLAY
on .profile file.
Regards
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2004 09:12 PM
тАО09-01-2004 09:12 PM
Re: Automatically set DISPLAY Variable ?
Thats's why the ping command is involved.
MB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2004 09:26 PM
тАО09-01-2004 09:26 PM
Re: Automatically set DISPLAY Variable ?
When you lo in you were asked typing in Display Variable ! What system script is that ?
Regards,
re
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-01-2004 09:50 PM
тАО09-01-2004 09:50 PM
Re: Automatically set DISPLAY Variable ?
The discussion between me / marcel are based who command. We are getting IP-Address over from there. when ever it's IP-Address resolved then only hostname will come.
Problem is, if we set DISPLAY with hostname then x-windows won't run. It will make problem. So that we can use getip or ping to get ip-address
Remote shell testing.
machine1 --> machine2
I hope r* command setting for rhosts file are made.
check as,
machine 1# remsh machine2 hostname
machine2
So r* is working fine.
Test:
#!/usr/bin/ksh
# remote.ksh
# $1 - hostname
# $2 - user
if [[ $# -ne 2 ]]
then
echo "Usage: remote.ksh
exit 1
fi
# Display variable
IP=$(getip `who -am | awk '{ print $8 }'`)
DISPLAY=$(echo $IP:0)
export $DISPLAY
# Remote x11 testing
remsh $1 -l $2 -n "/usr/dt/bin/hpterm -display $DISPLAY"
-------------------------
It will start xwindows now.
You can start it parrelel as
remsh $1 -l $2 -n "/usr/dt/bin/hpterm -display $DISPLAY" &
remsh $1 -l $2 -n "/usr/dt/bin/hpterm -display $DISPLAY" &
Regards
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-02-2004 02:57 AM
тАО09-02-2004 02:57 AM
Re: Automatically set DISPLAY Variable ?
On the remote server that you connect to you want to make sure you have done `xhost +` and the response from the remote server would be
"access control disabled, clients can connect from any host"
This function works from Exceed or any other X emulation application. The access control must be disabled to have X11 traffic forwarded