- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: exporting DISPLAY variable on rlogin
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
тАО05-23-2003 03:01 AM
тАО05-23-2003 03:01 AM
When remote logging into another HP box, I have to manually export the DISPLAY variable to run SAM.
A section of the .profile is as follows :-
exportPS1="${LOGNAME}@$(hostname)"'[${PWD##*/}] '
Where=`who am i -Rm | awk '{print $NF}' | sed -e "s/^(//" -e "s/)$//" | grep -v $(hostname)`
if [ "${Where}" ] ; then
export DISPLAY="${Where}:0"
fi
When using rlogin the DISPLAY variable Where is not exported.
Can anyone reason why ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2003 03:03 AM
тАО05-23-2003 03:03 AM
Re: exporting DISPLAY variable on rlogin
I use this one,
if [ ! "$VUE" ]; then
# -- Do trick to set the display in case of remote login
HOST=`who am i -R |awk '{print $NF}' | sed "s/(\(.*\))/\1/"`
if [ "$HOST" != "" ] && [ "$HOST" != ":0" ] && [ "$HOST" != ":0.0" ];
then
if [ "$HOST" = `who am i -R |awk '{print $NF}' | sed "s/(\(.*\))/\1/"` ]
then
HOST=$HOST:0.0
fi
echo " +--<<"
echo " | Remote login detected, setting DISPLAY to $HOST"
echo " +-->>"
DISPLAY=$HOST
export DISPLAY
fi
Hope it helps,
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2003 03:09 AM
тАО05-23-2003 03:09 AM
Solutionremsh $1 -n /usr/bin/X11/hpterm -display $DISPLAY -ls -title $1 -n $1 -sb -sl 500 &
The available hostnames become mini scripts that call this script with their own hostname as an argument. So, if you want to "rlogin server1", you would just enter "server1" and a hpterm (or dtterm) window pops up with the display already set.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-23-2003 03:57 AM
тАО05-23-2003 03:57 AM
Re: exporting DISPLAY variable on rlogin
me=$(who -mT | awk '{print $9}')
export DISPLAY=$me:0.0
or
ip=$(last -R | grep `whoami` | grep in$ | sed -n '1p' | awk '{print $3}')
export DISPLAY=$ip:0.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-24-2003 10:21 AM
тАО05-24-2003 10:21 AM
Re: exporting DISPLAY variable on rlogin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2003 12:54 AM
тАО05-28-2003 12:54 AM
Re: exporting DISPLAY variable on rlogin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2003 01:31 AM
тАО05-28-2003 01:31 AM
Re: exporting DISPLAY variable on rlogin
# Set prompt
export PS1=$(whoami)"@"$(hostname)" "\$PWD" "$(echo "\n# ")
# Set DISPLAY :
export DISPLAY=$(who am i -R | cut -d"(" -f 2|cut -d")" -f1):0.0
echo "My display is $DISPLAY"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-28-2003 02:35 AM
тАО05-28-2003 02:35 AM
Re: exporting DISPLAY variable on rlogin
/usr/contrib/bin/X11/xon
to set your display automatically.
Roland