Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Aug 2000 07:50:45 +0400
From:      Igor Roboul <igor@raduga.dyndns.org>
To:        wanghx916@netscape.net
Cc:        FreeBSD questions <freebsd-questions@freebsd.org>
Subject:   Re: Export X-window to another X-server
Message-ID:  <20000831075045.C18025@linux.rainbow>
In-Reply-To: <29CB5198.5C3E2AD9.03595011@netscape.net>; from wanghx916@netscape.net on Wed, Aug 30, 2000 at 09:10:33PM -0400
References:  <29CB5198.5C3E2AD9.03595011@netscape.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii

On Wed, Aug 30, 2000 at 09:10:33PM -0400, wanghx916@netscape.net wrote:
> Dear sir,
> I did as you said but failed. My Sun wsk promopted me that 'can't find xon'. I don't know If I should rsh to the FreeBSD before I execute 'xon freebsd-host-name command'. I rsh to the FreeBSD and execute the command and failed again. Would you please give me more information about this, step to step is the best.
Ok, I did not know that SunOS does not provides "xon" command. 
Do this (this is NOT safest, but SIMPLEST way)
 1) On Sun "xhost +your-freebsd-host-name"
 2) Telnet to freebsd host
 3) On freebsd host do 
    "setenv DISPLAY your-sun-host:0" or "export DISPLAY=your-sun-host:0" 
    depending on your shell (first is for csh/tcsh second is for all other
 4) Launch your application.

PS.
I have attache "xon" script.

-- 
Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga"
http://www.brainbench.com/transcript.jsp?pid=304744

--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=xon

#!/bin/sh
# $XConsortium: xon.sh,v 1.10 94/12/09 22:53:55 gildea Exp $
# start up xterm (or any other X command) on the specified host
# Usage: xon host [arguments] [command]
#
# $XFree86: xc/programs/scripts/xon.sh,v 1.1.1.2.4.3 1999/12/11 17:43:23 hohndel Exp $
# 
case $# in
0)
	echo "Usage: $0 <hostname> [-user user] [-name window-name] [-debug]"
	echo "[-screen screen-number] [command ...]"
	exit 1
	;;
esac
target=$1
shift
label=$target
resource=xterm-$label
if [ -f /usr/bin/remsh ]; then
    rsh=/usr/bin/remsh
elif [ -f /usr/bin/rcmd ]; then
    rsh=/usr/bin/rcmd
else
    rsh=rsh
fi
rcmd="$rsh $target -n"
case $DISPLAY in
unix:*)
	DISPLAY=`echo $DISPLAY | sed 's/unix//'`
	;;
esac
case $DISPLAY in
:*)
	case `uname` in
	Linux*)
		fullname=`hostname -f`
		;;
	*)
		fullname=`hostname`
		;;
	esac
	hostname=`echo $fullname | sed 's/\..*$//'`
	if [ $hostname = $target ] || [ $fullname = $target ]; then
		DISPLAY=$DISPLAY
		rcmd="sh -c"
	else
		DISPLAY=$fullname$DISPLAY
	fi
	;;
esac
username=
sess_mangr=
xauth=
case x$XUSERFILESEARCHPATH in
x)
	xpath='HOME=${HOME-`pwd`} '
	;;
*)
	xpath='HOME=${HOME-`pwd`} XUSERFILESEARCHPATH=${XUSERFILESEARCHPATH-"'"$XUSERFILESEARCHPATH"'"} '
	;;
esac
redirect=" < /dev/null > /dev/null 2>&1 &"
command=
ls=-ls
continue=:
while $continue; do
	case $1 in
	-user)
		shift
		username="-l $1"
		label="$target $1"
		rcmd="$rsh $target $username -n"
		shift
		case x$XAUTHORITY in
		x)
			XAUTHORITY="$HOME/.Xauthority"
			;;
		esac
		case x$XUSERFILESEARCHPATH in
		x)
			;;
		*)
			xpath="XUSERFILESEARCHPATH=$XUSERFILESEARCHPATH "
			;;
		esac
		;;
	-access)
		shift
		xhost +$target
		;;
	-name)
		shift
		label="$1"
		resource="$1"
		shift
		;;
	-nols)
		shift
		ls=
		;;
	-debug)
		shift
		redirect=
		;;
	-screen)
		shift
		DISPLAY=`echo $DISPLAY | sed 's/:\\([0-9][0-9]*\\)\\.[0-9]/:\1/'`.$1
		shift
		;;
	*)
		continue=false
		;;
	esac
done
case x$XAUTHORITY in
x)
	;;
x*)
	xauth="XAUTHORITY=$XAUTHORITY "
	;;
esac
case x$SESSION_MANAGER in
x)
	;;
x*)
	sess_mangr="SESSION_MANAGER=$SESSION_MANAGER "
	;;
esac
vars='PATH=$PATH:/usr/X11R6/bin '"$xpath$xauth$sess_mangr"DISPLAY="$DISPLAY"
case $# in
0)
	$rcmd 'sh -c '"'$vars"' xterm '$ls' -name "'"$resource"'" -T "'"$label"'" -n "'"$label"'" '"$redirect'"
	;;
*)
	$rcmd 'sh -c '"'$vars"' '"$*$redirect'"
	;;
esac

--a8Wt8u1KmwUX3Y2C--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000831075045.C18025>