--- xrsh-5.92.orig/xrsh.sh +++ xrsh-5.92/xrsh.sh @@ -20,7 +20,8 @@ # # xrsh: start an X11 client on another host # -# Usage: xrsh [-help] [-version ] [-l username] [-auth authtype] [-screen #] [-pass envlist] \ +# Usage: xrsh [-help] [-version ] [-l username] [-e rshprog] \ +# [-auth authtype] [-screen #] [-pass envlist] \ # [-debug] [-debug2] hostname [X-command [arguments...]] # # Example usage: xrsh expo.lcs.mit.edu xterm @@ -37,6 +38,7 @@ # executed by the script (very verbose) # The -l switch allows you to use a different login name on the # remote host. -l and its argument are passed directly to rsh. +# Using -e you can set another rsh program to use, e.g. ssh. # The -help switch prints out the usage message. # The -screen switch allows you to start a client on a different screen. # If no X command is given, it defaults to xterm. This means that @@ -70,6 +72,9 @@ # because it will expand to ~ on the local host, but try to put the # errors in that file on the remote host.) # +# The environment variable XRSH_RSH sets the rsh program to use to access +# the remote site. Default is remsh or rsh. +# # # COMMON PROBLEMS: # * Make sure your PATH environment variable on the remote host is @@ -122,7 +127,7 @@ rshoptions="" passenvs= # environment variables to pass along xhostvar= # used by auth type xhost-xterminal -usage="usage: $progname [-help] [-version] [-l username] [-auth authtype] [-screen #] [-debug] [-debug2] host [cmd [args ...]]" +usage="usage: $progname [-help] [-version] [-l username] [-e rshprog] [-auth authtype] [-screen #] [-debug] [-debug2] host [cmd [args ...]]" if [ -z "$DISPLAY" ]; then echo "$progname: "'$DISPLAY must be set' 1>&2 ; @@ -156,6 +161,9 @@ -l) shift; rshoptions="-l $1"; foundarg=yes; shift; ;; + -e) + shift; XRSH_RSH="$1"; foundarg=yes; shift; + ;; -auth) shift; XRSH_AUTH_TYPE=$1; foundarg=yes; shift; ;; @@ -213,11 +221,11 @@ oldIFS=$IFS IFS=: set $DISPLAY +IFS=$oldIFS case "$#" in 1) displayhost=$localhost;; *) displayhost=$1;; esac -IFS=$oldIFS case "$displayhost" in "unix"|"local"|"") @@ -233,11 +241,15 @@ command="$command $xcmdargs" fi +if [ "$XRSH_RSH" ]; then + rsh="$XRSH_RSH" # Some System V hosts have rsh as "restricted shell" and ucb rsh is remsh -if [ -r /usr/bin/remsh ]; then - rsh=remsh -elif [ -f /usr/bin/rcmd ]; then # SCO Unix uses "rcmd" instead of rsh - rsh=rcmd +elif [ -x /usr/bin/ssh ]; then + rsh=/usr/bin/ssh +elif [ -x /usr/bin/remsh ]; then + rsh=/usr/bin/remsh +elif [ -x /usr/bin/rcmd ]; then # SCO Unix uses "rcmd" instead of rsh + rsh=/usr/bin/rcmd else rsh=rsh fi @@ -250,6 +262,7 @@ oldIFS=$IFS IFS=: set $DISPLAY +IFS=$oldIFS if [ $# = 2 ]; then shift fi @@ -285,7 +298,6 @@ newdisplay="${displayhost}:$@" ;; esac -IFS=$oldIFS # process env variables to pass early so that we can send them # in the xauth commands as well as the actual X client rsh command. --- xrsh-5.92.orig/xrlogin.sh +++ xrsh-5.92/xrlogin.sh @@ -18,13 +18,12 @@ # Written by Stephen Gildea # and Jim Dempsey # -# Usage: xrlogin [-l username] [-telnet] [emulator options] hostname +# Usage: xrlogin [-l username] [-rlogin|-telnet] [emulator options] hostname # Set some defaults. progname=`basename $0` -usage="usage: $progname [-l logname] [-telnet] [emulator options] host" -netprog="rlogin" -netprogopts="-8" +usage="usage: $progname [-l logname] [-rlogin|-telnet] [emulator options] host" +netprog="ssh" termprog=xterm termprogopts= telnet= @@ -34,6 +33,9 @@ # process arguments while [ "$*" != "" ]; do case "$1" in + -rlogin) + rlogin=t; + ;; -telnet) telnet=t; ;; @@ -64,6 +66,10 @@ netprog=telnet; netprogopts= ; fi +if [ "$rlogin" ]; then + netprog=rlogin + netprogopts="-8" +fi if [ "$user" ]; then netprogopts="$netprogopts -l $user" fi --- xrsh-5.92.orig/xrsh.man +++ xrsh-5.92/xrsh.man @@ -20,6 +20,9 @@ .B \-l .I username ] [ +.B \-e +.I rshprog +] [ .B \-auth .I authtype ] [ @@ -44,7 +47,7 @@ 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 \fIxterm\fP. Xrsh automatically -selects \fIrsh\fP(1), \fIremsh\fP(1) or \fIrcmd\fP(1) to execute remote commands, depending +selects \fIssh\fP(1), \fIrsh\fP(1), \fIremsh\fP(1) or \fIrcmd\fP(1) to execute remote commands, depending on what is available the O/S environment. .PP Xrsh automatically handles authentication so that the remote client @@ -139,6 +142,10 @@ .IP "\fB-l username\fP" Use the -l switch to specify a different user name to use for logging in via rsh on the remote host. +.IP "\fB-e rshprog\fP" +The -e switch can be used to set a different remote shell program, e.g. +ssh. The default is remsh or rsh, depending on your system. This flag +overrides $XRSH_RSH. .IP "\fB-pass envlist\fP" Envlist is a quote delimited string naming an arbitrary set of environment variables to pass on to the shell environment on the @@ -162,6 +169,8 @@ This environment variable can be used to specify the default type of authorization or access control. The values it can be set to are the same as the values for the argument -auth. +.IP "\fBXRSH_RSH\fP" +This variable can redefine the remote shell program to use, e.g. ssh. .IP "\fBXRSH_RSH_ERRORS\fP" If the environment variable XRSH_RSH_ERRORS is set to the name of a file, any rsh errors will appear in that file on the remote host. --- xrsh-5.92.orig/xrlogin.man +++ xrsh-5.92/xrlogin.man @@ -9,13 +9,15 @@ .\" without express or implied warranty. .TH XRLOGIN 1 "Release 6" "X Version 11" .SH NAME -xrlogin \- start an xterm that uses rlogin or telnet to connect to a remote host +xrlogin \- start an xterm that uses ssh (or optionally rlogin or +telnet) to connect to a remote host .SH SYNOPSIS .B xrlogin -[-l username] [-telnet] [xterm options] remote-host +[-l username] [-rlogin|-telnet] [xterm options] remote-host .SH DESCRIPTION .I Xrlogin -opens an xterm window and runs rlogin or telnet to login to a remote host. +opens an xterm window and runs ssh, rlogin or telnet to login to a +remote host. .PP Xrlogin automatically passes the -name argument to xterm with a value of @@ -42,12 +44,14 @@ .IP "\fB-l username\fP" When not using -telnet, use username as the id to login to the remote host. -.IP "\fB-telnet\fP" -Use the -telnet protocol to open the connection instead of rlogin. In +.IP "\fB-rlogin\fP" +Use the rlogin protocol to open the connection. In general rlogin is preferred because it can be configured to not prompt the user for a password. Rlogin also automatically propagates window size change signals (SIGWINCH) to the remote host so that applications -running there will learn of a new window size. Use of telnet +running there will learn of a new window size. +.IP "\fB-telnet\fP" +Use the -telnet protocol to open the connection. Use of telnet provided mostly for hosts that don't support rlogin. .SH COMMON PROBLEMS Make sure that the local host is specified in the .rhosts file on the --- xrsh-5.92.orig/debian/control +++ xrsh-5.92/debian/control @@ -0,0 +1,19 @@ +Source: xrsh +Section: x11 +Priority: optional +Maintainer: Harald Dunkel +Build-Depends: debhelper (>= 4.0.0) +Standards-Version: 3.6.2 + +Package: xrsh +Architecture: all +Depends: rsh-client, net-tools, xbase-clients, xterm +Description: remote execution of XWindow programs + Xrsh is designed to allow you to start an X client on a remote machine + with the window displayed on the current server's $DISPLAY. It has + many options that give you the ability to propagate environment + variables (including DISPLAY) to the remote system and works with + various types of X server access control including xauth and xhost. + Xrlogin opens a local xterm window and runs rlogin (or optionally telnet) to + connect to a remote machine. + --- xrsh-5.92.orig/debian/rules +++ xrsh-5.92/debian/rules @@ -0,0 +1,47 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +PROGRAMS = xrsh xrlogin +BINDIR=/usr/bin + +%: %.sh + dh_testdir + cp -p $< $@ + chmod +x $@ + +build: $(PROGRAMS) + +clean: + dh_testdir + dh_testroot + rm -f $(PROGRAMS) + rm -f *~ + dh_clean + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs COPYRIGHT FUTURE-WORK README + dh_install -pxrsh xrsh $(BINDIR) + dh_installman -pxrsh xrsh.man + dh_install -pxrsh xrlogin $(BINDIR) + dh_installman -pxrsh xrlogin.man + +# Build architecture-dependent files here. +binary-arch: build install +# We have nothing to do by default. + +binary: binary-indep binary-arch + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +.PHONY: build clean binary-indep binary-arch binary install --- xrsh-5.92.orig/debian/changelog +++ xrsh-5.92/debian/changelog @@ -0,0 +1,58 @@ +xrsh (5.92-8) unstable; urgency=low + + * fix lintian problem + + -- Harald Dunkel Sat, 18 Feb 2006 10:59:10 +0100 + +xrsh (5.92-7) unstable; urgency=low + + * fix setting $DISPLAY for new bash 3.1 + * merge xrsh and xrlogin into one package again (on request of + my AM) + + -- Harald Dunkel Sat, 18 Feb 2006 10:33:27 +0100 + +xrsh (5.92-6) unstable; urgency=low + + * clean up debian/rules + + -- Harald Dunkel Mon, 25 Jul 2005 19:53:38 +0200 + +xrsh (5.92-5) unstable; urgency=low + + * can set remote shell program for xrsh to ssh using either -e or + $XRSH_RSH + * split into 2 packages (xrsh and xrlogin). Each provides its full + functionality without the other. The only common thing they have is + the common upstream version. + * make ssh the default for xrsh and xrlogin + * add net-tools to the dependency list for xrsh (/usr/bin/arp) + + -- Harald Dunkel Sun, 14 Jul 2005 19:29:11 +0200 + +xrsh (5.92-4) unstable; urgency=low + + * fix a broken Depends: line in control, as reported by + Frederic Boiteux (Closes: #302306) + + -- Harald Dunkel Wed, 31 Mar 2005 23:00:22 +0200 + +xrsh (5.92-3) unstable; urgency=low + + * Fix dependency in control + * Close ITP (Closes: #281222) + + -- Harald Dunkel Sat, 27 Nov 2004 14:04:37 +0100 + +xrsh (5.92-2) unstable; urgency=low + + * some minor fixes + + -- Harald Dunkel Fri, 26 Nov 2004 16:22:40 +0100 + +xrsh (5.92-1) unstable; urgency=low + + * Initial Release. + + -- Harald Dunkel Sun, 14 Nov 2004 15:06:21 +0100 + --- xrsh-5.92.orig/debian/compat +++ xrsh-5.92/debian/compat @@ -0,0 +1 @@ +4 --- xrsh-5.92.orig/debian/copyright +++ xrsh-5.92/debian/copyright @@ -0,0 +1,19 @@ +This package was debianized by Harald Dunkel on +Sun, 14 Nov 2004 15:06:21 +0100. + +It was downloaded from http://jjd.com/ + +Copyright: 1991,1994 by James J. Dempsey + +Upstream Author: James J. Dempsey + +License: + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, James J. Dempsey makes no representations about the +suitability of this software for any purpose. It is provided "as is" +without express or implied warranty. +