[daip] DISPLAY trouble
Eric Greisen
egreisen at nrao.edu
Wed Jun 9 12:56:34 EDT 2004
Charles Padgett writes:
> My name is Alex Padgett, I am a graduate student at the University of
> Maryland, Baltimore County. We recently upgraded several of our machines
> from Redhat 9 to Fedora Core 1. Since the upgrade (our AIPS installation
> is on a network disk), we are getting errors about not being able to open
> the display. AIPS seems to be setting the display name to <hostname>:0 .
> Now I am not sure if this is a problem with the way AIPS tries to figure
> out where to open the display, or if it is a problem with our X11
> configuration. I believe that all of our configuration files from our
> previous Redhat 9 distributions were properly restored, but I could be
> missing something. My main question is this - is there a way to force the
> display to be ":0.0", instead of <hostname>:0, because even if I try to
> run something as simple as an xterm using DISPLAY=<hostname>:0 it will
> fail. Any help would be greatly appreciated.
>
See
http://ww.aoc.nrao.edu/aips/aipsmgr/index.html
The problem is really with your systems that do not install a
loopback. The notation <host>:0 is perfectly correct but without a
built in loopback it fails. Your system does not think it is part of
the internet which often occurs when your are not connected but seems
also to arise when you are.
Because this seems to be a general failure in system installation I
have changed START_TVSERVERS in 31DEC04 to the text below. This needs
to be in your $AIPS_ROOT and you must replace the line that says
AIPS_ROOT=/DEFINE_ME
with a correct definition (see your current file).
#!/bin/sh
#-----------------------------------------------------------------------
#; Copyright (C) 1995, 1997-1998, 2002-2004
#; Associated Universities, Inc. Washington DC, USA.
#;
#; This program is free software; you can redistribute it and/or
#; modify it under the terms of the GNU General Public License as
#; published by the Free Software Foundation; either version 2 of
#; the License, or (at your option) any later version.
#;
#; This program is distributed in the hope that it will be useful,
#; but WITHOUT ANY WARRANTY; without even the implied warranty of
#; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#; GNU General Public License for more details.
#;
#; You should have received a copy of the GNU General Public
#; License along with this program; if not, write to the Free
#; Software Foundation, Inc., 675 Massachusetts Ave, Cambridge,
#; MA 02139, USA.
#;
#; Correspondence concerning AIPS should be addressed as follows:
#; Internet email: aipsmail at nrao.edu.
#; Postal address: AIPS Project Office
#; National Radio Astronomy Observatory
#; 520 Edgemont Road
#; Charlottesville, VA 22903-2475 USA
#-----------------------------------------------------------------------
# Usage: START_TVSERVERS TVOPT [VERSION] [UNIX|INET]
#-----------------------------------------------------------------------
# START_TVSERVERS starts the AIPS server processes on a workstation. It
# takes care of defining the essential AIPS logicals (including TVDEV,
# etc) via HOSTS.SH, TVDEVS.SH, and AIPSPATH.SH. There may be site or
# host specific overrides in AIPSASSN.SH, so it is called too.
#
# This script will either be called via a remote shell or locally.
#
# On Sun4 systems, it may be necessary to edit the first part of this
# file if OpenWindows is not in use or in a nonstandard place. For
# generic X11 installations, just set LD_LIBRARY_PATH to the appropriate
# X11 library area.
#
# This file must have mode +x - done by install.pl usually.
#-----------------------------------------------------------------------
# Set the AIPS root directory.
AIPS_ROOT=/DEFINE_ME
# Who am I? DON'T CHANGE!!!
. $AIPS_ROOT/HOSTS.SH
[ "$ARCH" = "" ] && echo "START_TVSERVERS: ARCH not defined" && exit 1
# Change these if needed
case $ARCH in
S[OU]L|SUN*)
if [ "$OPENWINHOME" = "" ] ; then
for i in /usr/Openwin /usr/openwin /usr/openwin3 ; do
[ -d $i ] && OPENWINHOME=$i
done
export OPENWINHOME
if [ "$OPENWINHOME" = "" ] ; then
echo "START_TVSERVERS: Help! Can't find OPENWINHOME"
fi
fi
# This may cause problems; if so,
# just comment the whole thing out
if [ "$LD_LIBRARY_PATH" = "" ] ; then
LD_LIBRARY_PATH=$OPENWINHOME/lib:/usr/lib
export LD_LIBRARY_PATH
fi
;;
esac
#
# --------------- do not change anything below this line ---------------
#
export AIPS_ROOT
# Shortcuts for output text.
ei4 () {
echo "START_TVSERVERS: $*"
}
# Posix: echo behaves differently
# Following trick from Martin
# Shepherd (mcs at astro.caltech.edu)
# and Will Deich.
ni4 () {
if [ "`echo -n YES`" = "YES" ] ; then
echo -n "START_TVSERVERS: $*"
else
echo "START_TVSERVERS: $*\c"
fi
}
spc() {
echo " "
}
if [ ! -d $AIPS_ROOT ] ; then
ei4 "AIPS_ROOT is not a directory; cannot start TV servers."
exit 2
fi
# Arg 1 is TVDISP:TVHOST
TVOPT=$1
if [ "$TVOPT" = "" ] ; then
ei4 "TVOPT not defined, cannot start anything"
exit 2
fi
# Arg 2 is version or socket type;
# if version, arg 3 is Socket type
ARG2=`echo $2 | tr '[a-z]' '[A-Z]'`
SOCKTYPE=INET
case $ARG2 in
OLD|NEW|TST) VERSION=$ARG2; export VERSION;;
INET|UNIX) SOCKTYPE=$ARG2;;
*) VERSION="";;
esac
ARG3=`echo $3 | tr '[a-z]' '[A-Z]'`
case $ARG3 in
INET|UNIX) SOCKTYPE=$ARG3;;
esac
# Set the PATH, SYSUNIX, etc.
# This is sensitive to VERSION.
. $AIPS_ROOT/AIPSPATH.SH
# and THEN define TV variables,
# but only if needed.
if [ "$AIPSTVS" = "" ] ; then
if [ -f $AIPS_ROOT/TVDEVS.SH ] ; then
. $AIPS_ROOT/TVDEVS.SH
else
. $SYSUNIX/TVDEVS.SH
fi
fi
# Get local overrides if any
. $AIPS_ROOT/AIPSASSN.SH
# Use XAS by default.
if [ "$TVALT" = "TVALT00" ] ; then
TVALT=TVALT03; export TVALT
fi
# Start the TV servers.
case $TVALT in
TVALT01) ei4 "Sunview server has been deprecated"
# SSSERVERS
;;
*)
# X11 of some sort, start XAS.
if [ "$DISPLAY" = "" ] ; then
DISPLAY="${TVDISP}:0"
export DISPLAY
elif [ "$TVDISP" = "$TVHOST" ] ; then
if [ $SOCKTYPE = INET ] ; then
DISPLAY="${TVDISP}:0"
export DISPLAY
fi
fi
if [ "$TVDISP" = "$TVHOST" ] ; then
hhh=`echo $HOST | tr '[A-Z]' '[a-z]'`
if [ "$hhh" = "$TVDISP" ] ; then
DISPLAY=":0"
export DISPLAY
fi
fi
if [ $SOCKTYPE = INET ] ; then
XASERVERS
else
UNIXSERVERS
fi
;;
esac
# End of START_TVSERVERS
More information about the Daip
mailing list