- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Automatic DISPLAY setting
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
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
10-28-2002 05:22 AM
10-28-2002 05:22 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2002 05:30 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2002 05:33 AM
10-28-2002 05:33 AM
Re: Automatic DISPLAY setting
# Be sure that VUE does not invoke tty commands
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
Regards,
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2002 05:33 AM
10-28-2002 05:33 AM
Re: Automatic DISPLAY setting
if you're the only one using the root account you could very well set up something using the output of a "who -u"
If you a using rlogin I could also send you a script that takes care of setting the DISPLAY.
Regards
Bernhard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2002 05:49 AM
10-28-2002 05:49 AM
Re: Automatic DISPLAY setting
who -um | awk '{print $NF}'
Example,
export DISPLAY=`who -um | awk '{print $NF}':0.0`