HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Control xterm timeout connecting to remote display...
Operating System - HP-UX
1835527
Members
3226
Online
110078
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
07-25-2001 12:39 AM
07-25-2001 12:39 AM
Control xterm timeout connecting to remote display?
Is there any way of controlling the time it takes for an xterm/hpterm to timeout, or stop trying to open on a remote machine if it can't contact an X server on the remote machine?
Timeout seems to be 10 seconds :
$ date ; xterm ; date
Wed Jul 25 09:40:03 BST 2001
Error: Can't open display: 10.1.1.1:0.0
Error: Couldn't find per display information
Wed Jul 25 09:40:13 BST 2001
Note: when I try this on other O/S the timeout seems to be quicker, like more in the region of 5 seconds.
Any ideas?
TIA,
Barry
Timeout seems to be 10 seconds :
$ date ; xterm ; date
Wed Jul 25 09:40:03 BST 2001
Error: Can't open display: 10.1.1.1:0.0
Error: Couldn't find per display information
Wed Jul 25 09:40:13 BST 2001
Note: when I try this on other O/S the timeout seems to be quicker, like more in the region of 5 seconds.
Any ideas?
TIA,
Barry
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2001 01:11 AM
07-25-2001 01:11 AM
Re: Control xterm timeout connecting to remote display?
here's some timeouts that may help but I'm dubious if they will help .... see man dtlogin & /usr/dt/config/Xconfig .... is nfs involved ->default = 5 secs , normally standard openTimeout = 30 secs ..... I guess you could try dropping this value ? nb you will need to restart the Xserver for the changes to take effect.
good luck
good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2001 01:53 AM
07-25-2001 01:53 AM
Re: Control xterm timeout connecting to remote display?
Hi Barry, I just found this script function that'll check if a connection is X capable.
I'll leave you to figure it out.. but it uses xhost to find out if it's a display or not.
I couldn't find your original question so I'm posting here.
function Xcapable
{
typeset R disp
# we want to know if we are running on a X capable system or not
# we try to run the 'xhost" command which fails if not capable
xhost >/dev/null 2>&1
R=$?
if [ $R != 0 ]; then
# check if DISPLAY is set to an empty string by piping error
# output to grep
xhost 2>&1 | /bin/grep "xhost: unable to open display \\\"\\\"" > /dev/null
R=$?
if [ $R = 0 ]; then
# if grep succeeded, then DISPLAY is empty
# ... then try to set it to a suitable value.
disp=$(GetDisplayName);
ttlTrace COM_E_LL_INFOFLOW1 "$0 : DISPLAY was empty. Now set to $disp"
export DISPLAY="$disp"
# check again xhost with the new DISPLAY value
xhost >/dev/null 2>&1
R=$?
fi
fi
ttlTrace COM_E_LL_INFOFLOW1 "$0 returns $R"
# get the return value from the "xhosts" command (0 if successful)
return $R
}
Another one you were interested in was getting the display name to set to:
function GetDisplayName
{
typeset dis displayName
# the command "/bin/who am i -R" returns something like
# "subbin pty/ttys2 Sep 22 10:53 (hptnoops.grenoble.hp.com)"#
# where the () enclosed part at the end is the name of the station
# supporting the display.
# awk filter removes parentheses.
dis=`/bin/who am i -R | /usr/bin/awk '{gsub("[()]","",$6); printf "%s",$6}'`
ttlTrace COM_E_LL_INFOFLOW2 "$0 : display value found = $dis"
case "$dis" in
*:[0-9].[0-9]) displayName=${dis};;
*:[0-9]) displayName=${dis} ;;
*) displayName=${dis}:0 ;;
esac
ttlTrace COM_E_LL_INFOFLOW1 "$0 returns $displayName"
#
# ----------------------------------
echo $displayName # This is the "returned value"
# ----------------------------------
return 0
}
Later,
Bill
I'll leave you to figure it out.. but it uses xhost to find out if it's a display or not.
I couldn't find your original question so I'm posting here.
function Xcapable
{
typeset R disp
# we want to know if we are running on a X capable system or not
# we try to run the 'xhost" command which fails if not capable
xhost >/dev/null 2>&1
R=$?
if [ $R != 0 ]; then
# check if DISPLAY is set to an empty string by piping error
# output to grep
xhost 2>&1 | /bin/grep "xhost: unable to open display \\\"\\\"" > /dev/null
R=$?
if [ $R = 0 ]; then
# if grep succeeded, then DISPLAY is empty
# ... then try to set it to a suitable value.
disp=$(GetDisplayName);
ttlTrace COM_E_LL_INFOFLOW1 "$0 : DISPLAY was empty. Now set to $disp"
export DISPLAY="$disp"
# check again xhost with the new DISPLAY value
xhost >/dev/null 2>&1
R=$?
fi
fi
ttlTrace COM_E_LL_INFOFLOW1 "$0 returns $R"
# get the return value from the "xhosts" command (0 if successful)
return $R
}
Another one you were interested in was getting the display name to set to:
function GetDisplayName
{
typeset dis displayName
# the command "/bin/who am i -R" returns something like
# "subbin pty/ttys2 Sep 22 10:53 (hptnoops.grenoble.hp.com)"#
# where the () enclosed part at the end is the name of the station
# supporting the display.
# awk filter removes parentheses.
dis=`/bin/who am i -R | /usr/bin/awk '{gsub("[()]","",$6); printf "%s",$6}'`
ttlTrace COM_E_LL_INFOFLOW2 "$0 : display value found = $dis"
case "$dis" in
*:[0-9].[0-9]) displayName=${dis};;
*:[0-9]) displayName=${dis} ;;
*) displayName=${dis}:0 ;;
esac
ttlTrace COM_E_LL_INFOFLOW1 "$0 returns $displayName"
#
# ----------------------------------
echo $displayName # This is the "returned value"
# ----------------------------------
return 0
}
Later,
Bill
It works for me (tm)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2001 02:53 AM
07-25-2001 02:53 AM
Re: Control xterm timeout connecting to remote display?
Alex/Bill,
As always, thanks for the swift replies...
Not really concerned with whether I can check if the display is X or not anymore, cos I can do that a couple of ways like your nice xhost method (eg: xset -q, xrdb -symbols etc... will fail if not Xwindow). Its more the time it takes for it to decide if its X or not.
So lets say I usually run an X emulator on my PC and I try to kick off an xterm on my hp box with my DISPLAY set to my PC IP. That all works fine and the xterm is displayed instantly on the PC. However, if I don't run the X emulator and then try to kick off the xterm with my DISPLAY set to my PC IP then the xterm will try to connect to the X server on my PC but will fail after 10 secs with a :
Error: Can't open display: 50.120.4.167:0.0
Error: Couldn't find per display information
But I want it to fail instantly!
As always, thanks for the swift replies...
Not really concerned with whether I can check if the display is X or not anymore, cos I can do that a couple of ways like your nice xhost method (eg: xset -q, xrdb -symbols etc... will fail if not Xwindow). Its more the time it takes for it to decide if its X or not.
So lets say I usually run an X emulator on my PC and I try to kick off an xterm on my hp box with my DISPLAY set to my PC IP. That all works fine and the xterm is displayed instantly on the PC. However, if I don't run the X emulator and then try to kick off the xterm with my DISPLAY set to my PC IP then the xterm will try to connect to the X server on my PC but will fail after 10 secs with a :
Error: Can't open display: 50.120.4.167:0.0
Error: Couldn't find per display information
But I want it to fail instantly!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP