home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / windows / openloo / 3699 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  3.2 KB

  1. Path: sparky!uunet!wupost!gumby!destroyer!sol.ctr.columbia.edu!emory!athena.cs.uga.edu!weinri
  2. From: weinri@athena.cs.uga.edu (Kevin Weinrich)
  3. Newsgroups: comp.windows.open-look
  4. Subject: SUMMARY: Remote client works in X11, not NeWS - auth problem?
  5. Message-ID: <1992Sep2.194539.1035@athena.cs.uga.edu>
  6. Date: 2 Sep 92 19:45:39 GMT
  7. Organization: University of Georgia, Athens
  8. Lines: 78
  9.  
  10. Thanks to Micky Choudhary <Mayank.Choudhary@Eng.Sun.COM>,
  11. I have cobbled together some scripts for OpenWindows (thus, I
  12. don't run "openwin") which let me run remote clients using OW *without*
  13. having to use the -noauth option.  There's probably a simpler/better way to do
  14. this, but this *WORKS*, so I'm satisfied.
  15.  
  16. The first start-up script is run just once to set up a .Xauthority file that
  17. works.  The diff following the script shows how I start up OW from then on.
  18.  
  19. Finally, the script ("auth.remote") at the end is what I use to pass
  20. the token/cookie to the remote machine.  This only has to be done once,
  21. I assume as long as you don't change your local .Xauthority file (which
  22. is why I only use mkcookie in the first of the two start-up scripts.
  23.  
  24. Oh, yeah, remember to start your remote clients with -display localhostname:0,
  25. where localhostname is the name of the machine you wish to display on.
  26.  
  27. -Kevin Weinrich    weinri@athena.cs.uga.edu
  28. (text follows)
  29.  
  30. -------------------------- script #1 ------------------------------
  31. #! /bin/sh
  32. # @(#)openwin 23.25 90/06/19
  33.  
  34. # environment variables that this shell script sets/changes:
  35. export DISPLAY FONTPATH FRAMEBUFFER HELPPATH LD_LIBRARY_PATH
  36. export MANPATH NEWSSERVER OPENWINHOME PATH XAPPLRESDIR
  37.  
  38. # default DISPLAY is :0
  39. DISPLAY=":0"
  40.  
  41. # default FRAMEBUFFER is /dev/fb if not in the environment.
  42. FRAMEBUFFER=${FRAMEBUFFER-"/dev/fb"}
  43.  
  44. # Derive the $NEWSSERVER variable from the digit in $DISPLAY
  45. newsport=`expr "$DISPLAY" : '.*:\([0-9][0-9]*\)' + 2000`
  46. NEWSSERVER=`$OPENWINHOME/bin/newsserverstr $newsport`
  47.  
  48. # add $OPENWIN/mumble to several related environment variables.
  49. FONTPATH=$OPENWINHOME/lib/fonts:/usr/lib/X11/fonts
  50. HELPPATH=$OPENWINHOME/lib/help
  51.  
  52.  
  53. XAPPLRESDIR=$OPENWINHOME/lib/X11/app-defaults
  54.  
  55. # confirm framebuffer configuration
  56.     $OPENWINHOME/bin/xn_ck_fbs
  57.  
  58. # start up xinit and thus the server.
  59. AUTHFILENAME=$HOME/.xnews.`uname -n`$DISPLAY
  60. $OPENWINHOME/lib/mkcookie $AUTHFILENAME -auth magic-cookie
  61. ##
  62. ## mkcookie will create 2 files $AUTHFILENAME and $HOME/.Xauthority
  63. ##
  64. $OPENWINHOME/bin/xinit -- $OPENWINHOME/bin/xnews $DISPLAY -auth $AUTHFILENAME
  65.  
  66. exit 0
  67. -------------------------- diff for script #2 ----------------------
  68. 29,34c29,30
  69. < AUTHFILENAME=$HOME/.xnews.`uname -n`$DISPLAY
  70. < $OPENWINHOME/lib/mkcookie $AUTHFILENAME -auth magic-cookie
  71. < ##
  72. < ## mkcookie will create 2 files $AUTHFILENAME and $HOME/.Xauthority
  73. < ##
  74. < $OPENWINHOME/bin/xinit -- $OPENWINHOME/bin/xnews $DISPLAY -auth $AUTHFILENAME
  75. ---
  76. > #
  77. > $OPENWINHOME/bin/xinit -- $OPENWINHOME/bin/xnews $DISPLAY -auth $HOME/.Xauthority
  78.  
  79. ---------------------------- auth.remote script -------------------
  80. # KBW 920902
  81. case $# in
  82. 0) echo "Syntax: auth.remote machine_name";
  83.    echo "  where machine_name is tha name of the machine";
  84.    echo "  you wish to give permission to display on your";
  85.    echo "  local machine.";;
  86. esac
  87. xauth extract - `hostname`:0 | rsh $1 xauth merge -
  88.