This is a summary of solutions and alternatives to running the "on" command
on a SPARC LX running Solaris 2.1.
Original Problem:
-----------------
The "on" command does not execute if spawned from a shell script or an
Openwindow menu "exec" call. When going between Solaris 2.1 machines, "on"
does not work at all.
Suggested alternatives (in order of popularity):
-----------------------------------------------
- rsh
- xrsh
- rcmd
- rexec
- rxterm
- RTFM
rsh was by far the most popular suggestion. As such, I have included two
responses which provided the most insight into using rsh.
Responses:
----------
randy@aslan.nlm.nih.gov (Rand S. Huntzinger) provided some interesting
information on an undocumented "env" parameter that can be used with rsh. He
writes:
How about "rsh". It works fine under Solaris 2.x, has less overhead
than "on" and (at least with older versions of on) is more secure.
[This probably why "on" is usually disabled on a Sun system "as
distributed".] Rsh is quite well suited to firing up X11 jobs. The
big difference between rsh and on is that on attempts to setup the
"local environment" on the remote machine. Rsh does not attempt this.
So you have to make certain adjustments. The environment is not passed
(but you can use the "env" command to pass important environment
variables):
rsh remote_host env VAR=VALUE VAR=VALUE command arguments...
Also, rsh leaves you in your home directory on the remote machine (it
doesn't NFS mount your current directory and cd to it). You have to
allow for this as well.
Another interesting solution was provided by Mike Jipping
<jipping@cs.hope.edu>. Mike provided a script called xon, which is a robust
front end to rsh. He writes:
I use "xon": a shell script which I have included below. It works for me
:o)
But I have not used it on Solaris, so it may not work there. The syntax
xon host program
is all that's needed.
Good luck.
Mike Jipping
Hope College Department of Computer Science
jipping@cs.hope.edu (BITNET: JIPPING@HOPE)
"It was a marketing coup ... to rename SunOS 4.1.X to
Solaris 1.0. That way, Solaris 2.X could be called
an upgrade..."
-- Rob Kolstad, SUG '92
================= XON ===============================================
#! /bin/sh
#
# xon: start an X11 client on another host
#
# Runs the given command on another host with $DISPLAY set in the
environment
.
# Does an xhost to allow access to the other host.
# Xon is very careful not to leave any extra processes waiting
# around on either machine for the client to exit. In order
# to achieve this, csh is used on the remote host and all inputs
# and outputs are redirected to /dev/null.
# The -debug switch allows you to see errors, but doesn't worry about
# leaving extra processes around.
# If the given command starts with "xterm", it adds the arguments
# "-name xterm-$hostname"
# where $hostname is the name of the remote host. This allows
<<***** Continued Next Message *****>>
--- ~ VbReader 1.5 #12 ~ ERROR:COLDBEER.CAN not found! USER.SYS not loaded. -- Canada Remote Systems - Toronto, Ontario 416-629-7000/629-7044
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:45 CDT