#!/bin/sh
#*****************************************************************************
# E.S.O. - VLT project
#
# "@(#) $Id: xrlogin,v 1.152 1998/09/25 15:16:38 vltsccm Exp $" 
#
# xrlogin
#
# who        when        what
# ---------  ----------  ----------------------------------------------------
# pforstma   04/11/1994  created (from gchiozzi 19/08/94 ported to HP from IBM)
#
#****************************************************************************
#   NAME
#   xrlogin - open a login xterm on a remote host
#
#   SYNOPSIS
#   xrlogin [host] [user]
#
#   DESCRIPTION
#
#   FILES
#
#   ENVIRONMENT
#
#   RETURN VALUES
#
#   CAUTIONS
#
#   EXAMPLES
#
#   SEE ALSO   
#
#   BUGS     
#
#   Relies on the HP-UX only command rexec.
#   Not integratable in vuewmrc because it prompts for the user.
#------------------------------------------------------------------------------


# Tests if the desired host has been given as a parameter
# otherwise prompts for it.
if [ $# -eq 1 ]
then
     RHOST="$1"
else
     echo remote host:\\c
     read RHOST
fi

# Tests if the desired user has been given as a parameter
# otherwise prompts for it.
if [ $# -eq 2 ]
then
     RUSER="$2"
else
     echo remote user:\\c
     read RUSER
fi

# Remote X-windows access
echo  "Login xterm for $RUSER on $RHOST (display: $DISPLAY)"
rexec $RHOST -l $RUSER -n xterm -title $RHOST -display $DISPLAY -ls





