This file is indexed.

/usr/bin/remotegv is in geomview 1.9.4-3.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
#! /bin/sh

# Invoke geomview possibly remotely.
# For use within Maple, install this remotegv script somewhere in users'
# search paths (e.g. in /usr/local/bin).
# This script attempts to guess which machine to invoke geomview on by
# examining the DISPLAY environment variable.  If DISPLAY isn't set or
# if geomview should run on a different machine, use the -h host option.
#
# The script also assumes that geomview should display on the machine where
# it is invoked, so for that copy of geomview, it sets DISPLAY to ":0".
# If the display should appear elsewhere (on an X terminal, say),
# use the -display option.
#
# We use "rsh" (remote shell) to pass data to the other computer, so 
# the remote computer must allow this -- either with an entry in
# /etc/hosts.equiv, or in a .rhosts file in the user's home directory
# on the machine where geomview will run.  The account name on the other
# machine is assumed to be the same as on this machine; if different,
# use the -l username or -h username@othermachine options.
#
# In case permissions are not set up correctly, the symptom
# is liable to be a "Permission denied." message followed by the
# immediate termination of the Maple process -- so if you're using it for
# the first time, check it out before doing much else in your Maple session!
# Sorry, but MapleV3 is just not very good at connecting to other programs.
#
# Note that togeomview and geomview MUST BE IN THE USER'S DEFAULT SEARCH PATH
# on the remote machine.
#
# To use this script within Maple, you'd say:
#    readlib(gvplot);
# then
#    gvcommand := `remotegv`;
# or e.g.
#    gvcommand := `remotegv -h othermachine -display myxterm:0`;
# or, if the account on the other machine is different from yours,
#    gvcommand := `remotegv -l otheraccount`;
# or
#    gvcommand := `remotegv -h otheraccount@othermachine`;
# Following any remotegv options, you can add the command to be invoked as
# geomview, possibly including options, as in:
#    gvcommand := `remotegv -l person /u/person/bin/gv -wpos 300x200`;
#
# Then use gvplot() as usual.
#
# Normally, error messages reporting problems on the other machine (for
# example, being unable to run geomview) are suppressed; this is unfortunately
# necessary, or you'd never get another Maple prompt until quitting from
# geomview.  There's a test mode to aid in tracing problems; use it as in
#    gvcommand := `remotegv -test -h othermachine`;
# i.e. add "-test" to whatever other options you'd give to remotegv.
# 
# Option summary:
# -l user  or  -l user@host
# -h host  or  -h user@host
# -display host:number		(set display on remote end)
# -test
# also accepts togeomview's options (-g, -M[c][g][p][s]).

# Invokes rsh to specified machine, invokes togeomview there by default.
#
# By default, we assume DISPLAY points to the machine where we'd like to be;
#   -h {host-portion-of-DISPLAY} -display :0
# Incorporates settings from "$RGVOPTS" environment variable.

set -- $RGVOPTS "$@"
set -x
RGVSH=${RGVSH:-rsh}

while
  case "$1" in
  -l)
	case "$2" in
	*@*) user="`expr match "$2" '\([^@]*\)'`"
	     host="`expr match "$2" '.*@\(.*\)'`" ;;
	*) user="$2" ;;
	esac
	shift 2 ;;

  -h)   case "$2" in
	*@*) user="`expr match "$2" '\([^@]*\)'`"
	     host="`expr match "$2" '.*@\(.*\)'`" ;;
	*) host="$2" ;;
	esac
	shift 2 ;;

  -test) testopt=-test; shift ;;
  -display) rdisplay="$2"; shift 2 ;;
  -M*) togvopts="$togvopts $1";
	 inpipe="$2"
	 shift 2 ;;
  -g)  gopt=-g; shift ;;
  "") test ;;
  *) togvargs="$togvargs $1"; shift ;;
  esac
do :
done

# Apply defaults

if [ -z "$host" ]; then
  host="`expr match "$DISPLAY" '\([^:]*\)'`"
fi

if [ -z "$rdisplay" ]; then
  rdisplay=":0.0"
fi

case "$inpipe" in
  /*) ;;
  ?*) inpipe=/tmp/geomview/$inpipe ;;
esac

user=${user+"-l $user"}
cmd="${host+$RGVSH $host $user}"

if [ -n "$host" ]; then
  redirect=">/dev/null 2>&1"
  if [ -n "$testopt" ]; then
    echo "Testing setup to $host.  If geomview or togeomview can't be started
there, you should see messages explaining why.  Unfortunately this command
may not finish on its own -- you may need to interrupt (perhaps with control-C)
after seeing the results, before you get another Maple prompt." >&2
    redirect=""
  fi
  if [ -n "$inpipe" ]; then
    $RGVSH $host $user sh -c "\"DISPLAY=$rdisplay togeomview $gopt ${togvopts} $inpipe $togvargs $redirect\"" <$inpipe
  else
    $RGVSH $host $user sh -c "\"DISPLAY=$rdisplay togeomview $gopt ${togvopts} $togvargs $redirect\""
  fi
else
  case "$1" in
    ""|-*) DISPLAY=$rdisplay geomview ${togvopts} $togvargs ;;
    *) DISPLAY=$rdisplay ${togvopts} $togvargs;;
  esac
fi