|
NAMExrsh - start an X program on a remote machineSYNOPSISxrsh [ -help ] [ -version ] [ -l username ] [ -auth authtype ] [ -screen screen-# ] [ -pass envlist ] [ -debug ] [ -debug2 ] remote-host [ X-command [ arguments ... ] ]DESCRIPTIONXrsh runs the given X command on a remote host. It sets up the environment for that command such that it will display its windows on the current server's screen by propagating the $DISPLAY environment variable. If not specified, the default client is xterm. Xrsh automatically selects rsh(1), remsh(1) or rcmd(1) to execute remote commands, depending on what is available the O/S environment.Xrsh automatically handles authentication so that the remote client will be allowed to open windows on the server. It does this in several different ways depending on the value of the $XRSH_AUTH_TYPE environment variable or the -auth argument. By default, xrsh will use xhost to enable the remote client to open a server connection. It can also be told to use xauth to merge local keys into a remote authorization file. Or it can pass the $XAUTHORITY environment variable to the remote host in order to share a common NFS mounted authority file. It can also be directed to do nothing in the case where no explicit authorization is necessary. Users who just want a remote terminal window might look at xrsh's sister command, xrlogin(1). Xrlogin uses a locally running xterm to open an rlogin connection to a remote host. The decision on whether to use "xrsh host xterm" or "xrlogin host" should be based on several factors. If X is unavailable on the remote host or the local terminal emulator has better features, use xrlogin. In general, the author recommends using xrsh over xrlogin in most situations. If the command to execute on the remote host is an xterm, xrsh automatically passes the -name argument to xterm with a value of "xterm-hostname" where hostname is the name of the remote host. This allows the user to specify resources in their server's resource manager which are specific to xterms from a given host. For example, this feature can be used to make all xterm windows from a given remote host be the same color or use a specific font or start up in a specific place on the screen. Xrlogin passes the same string so they are compatible in this regard. This feature can be overridden by specifying your own -name argument on the xterm command line. If the command to execute on the remote host is an xterm, xrsh specifies that the default title for the new xterm will be "xterm@hostname" where hostname is the name of the remote host. This can also be overridden by specifying your own -title argument on the xterm command line. Xrsh is very careful not to leave any extra processes on either the local or remote machine waiting around for the client to exit. In some remote environments (particularly some Sys V implementations of csh and rsh), this is impossible and xrsh should be run as a background command. OPTIONSNote that xrsh options precede the given X command and its arguments.
ENVIRONMENTThe environment variables XRSH_AUTH_TYPE and XRSH_ENVS_TO_PASS which can be used to set switch defaults are overridden if the equivalent switch is specified as well.
COMMON PROBLEMSMake sure your PATH environment variable on the remote host is set in your .cshrc or .bashrc so that rsh programs have access to it. (/bin/sh and /bin/ksh users have a hard time time here since their shells don't execute any init files under rsh. You can use the XRSH_ENVS_TO_PASS environment variable to pass the PATH environment variable to the remote host. Optionally, you can type a full path to xrsh in that case. (E.g. xrsh remote-host /usr/bin/X11/xterm))Make sure your PATH environment variable on the remote host includes the directory containing the X programs. This is often /usr/bin/X11 or /usr/local/bin/X11. Make sure you have rsh configured to work on the remote host. You can test this by typing: rsh remote-host echo '$PATH' This will prove that rsh works and show you the PATH that will be used on the remote host. If you get "Permission denied." you probably need to update your ~/.rhosts file on the remote host. See rlogin(1). EXAMPLES
BUGSIf the values of the environment variables specified in -pass or $XRSH_ENVS_TO_PASS contain quote characters, xrsh will have difficulty.If the remote host can't resolve the hostname of the server host (through /etc/hosts, DNS or NIS), the remote client will not be able to open a connection to the server. System V users may need to make the first line of the script begin with colon (:). If you think you have found a bug, the first thing you should do is to check on ftp.x.org in the contrib directory using anonymous FTP to see if there is a new version of xrsh there that already fixes the bug. If not, send email to "jjd@jjd.com" and be sure to have the token xrsh somewhere in the Subject: line. Be sure to report the operating system type and version at both ends of the xrsh connection and a description of the command you are using and what authentication mode you are using. SEE ALSOxrlogin(1), rsh(1), xhost(1), xauth(1)AUTHORJames J. Dempsey <jjd@jjd.com> with help and suggestions from many people including gildea@intouchsys.com, dm@bbn.com, dgreen@cs.ucla.edu and rosen@cns.bu.edu, <eero@whitechapel.media.mit.edu>, and <martin@whitechapel.media.mit.edu>.
Visit the GSP FreeBSD Man Page Interface. |