home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!gumby!destroyer!sol.ctr.columbia.edu!emory!athena.cs.uga.edu!weinri
- From: weinri@athena.cs.uga.edu (Kevin Weinrich)
- Newsgroups: comp.windows.open-look
- Subject: SUMMARY: Remote client works in X11, not NeWS - auth problem?
- Message-ID: <1992Sep2.194539.1035@athena.cs.uga.edu>
- Date: 2 Sep 92 19:45:39 GMT
- Organization: University of Georgia, Athens
- Lines: 78
-
- Thanks to Micky Choudhary <Mayank.Choudhary@Eng.Sun.COM>,
- I have cobbled together some scripts for OpenWindows (thus, I
- don't run "openwin") which let me run remote clients using OW *without*
- having to use the -noauth option. There's probably a simpler/better way to do
- this, but this *WORKS*, so I'm satisfied.
-
- The first start-up script is run just once to set up a .Xauthority file that
- works. The diff following the script shows how I start up OW from then on.
-
- Finally, the script ("auth.remote") at the end is what I use to pass
- the token/cookie to the remote machine. This only has to be done once,
- I assume as long as you don't change your local .Xauthority file (which
- is why I only use mkcookie in the first of the two start-up scripts.
-
- Oh, yeah, remember to start your remote clients with -display localhostname:0,
- where localhostname is the name of the machine you wish to display on.
-
- -Kevin Weinrich weinri@athena.cs.uga.edu
- (text follows)
-
- -------------------------- script #1 ------------------------------
- #! /bin/sh
- # @(#)openwin 23.25 90/06/19
-
- # environment variables that this shell script sets/changes:
- export DISPLAY FONTPATH FRAMEBUFFER HELPPATH LD_LIBRARY_PATH
- export MANPATH NEWSSERVER OPENWINHOME PATH XAPPLRESDIR
-
- # default DISPLAY is :0
- DISPLAY=":0"
-
- # default FRAMEBUFFER is /dev/fb if not in the environment.
- FRAMEBUFFER=${FRAMEBUFFER-"/dev/fb"}
-
- # Derive the $NEWSSERVER variable from the digit in $DISPLAY
- newsport=`expr "$DISPLAY" : '.*:\([0-9][0-9]*\)' + 2000`
- NEWSSERVER=`$OPENWINHOME/bin/newsserverstr $newsport`
-
- # add $OPENWIN/mumble to several related environment variables.
- FONTPATH=$OPENWINHOME/lib/fonts:/usr/lib/X11/fonts
- HELPPATH=$OPENWINHOME/lib/help
-
-
- XAPPLRESDIR=$OPENWINHOME/lib/X11/app-defaults
-
- # confirm framebuffer configuration
- $OPENWINHOME/bin/xn_ck_fbs
-
- # start up xinit and thus the server.
- AUTHFILENAME=$HOME/.xnews.`uname -n`$DISPLAY
- $OPENWINHOME/lib/mkcookie $AUTHFILENAME -auth magic-cookie
- ##
- ## mkcookie will create 2 files $AUTHFILENAME and $HOME/.Xauthority
- ##
- $OPENWINHOME/bin/xinit -- $OPENWINHOME/bin/xnews $DISPLAY -auth $AUTHFILENAME
-
- exit 0
- -------------------------- diff for script #2 ----------------------
- 29,34c29,30
- < AUTHFILENAME=$HOME/.xnews.`uname -n`$DISPLAY
- < $OPENWINHOME/lib/mkcookie $AUTHFILENAME -auth magic-cookie
- < ##
- < ## mkcookie will create 2 files $AUTHFILENAME and $HOME/.Xauthority
- < ##
- < $OPENWINHOME/bin/xinit -- $OPENWINHOME/bin/xnews $DISPLAY -auth $AUTHFILENAME
- ---
- > #
- > $OPENWINHOME/bin/xinit -- $OPENWINHOME/bin/xnews $DISPLAY -auth $HOME/.Xauthority
-
- ---------------------------- auth.remote script -------------------
- # KBW 920902
- case $# in
- 0) echo "Syntax: auth.remote machine_name";
- echo " where machine_name is tha name of the machine";
- echo " you wish to give permission to display on your";
- echo " local machine.";;
- esac
- xauth extract - `hostname`:0 | rsh $1 xauth merge -
-