[comp.windows.open-look] Xnews, XDM, and misc. things

jc@raven.bu.edu (James Cameron) (03/28/91)

System:  Running SunOS 4.1.1 with OpenWindows 2.0 on Sparc 2's and Sun4/xxx

I have implemented the xdm/xnews combination that was posted a short
time ago, and I have a few questions:

	1.  When running xnews Xserver, it is possible to use other
	    window managers besides OLWM?  The problem is that the
	    server doesn't seem to be getting reset.

	2.  Xnews is *apparently* timing out after a while. This occurs
	    somewhere in the neighborhood of one to two hours.  What
	    happens is that upon log out, a clear_colormap is executed
	    and then xnews restarts itself.  


Here is how I implemented it:
[...Note: this is from memory as well as the previous file.  I am not
      	  sure if this is *exactly* correct.]

% mkdir /usr/openwin/lib/xdm
% cd !$
% cp /usr/lib/X11/xdm * .
% emacs Xservers         

   REPLACE the server with xnews.  Original and final follow respectively:

unix:0.0 local /usr/local/X11/bin/Xsun -dev /dev/cgtwo0 -ar1 300 -ar2 15 :0

unix:0.0 local /usr/openwin/bin/xnews -dev /dev/cgtwo0 :0

% emacs xdm-config

  Need to change the directories to the new paths

  M-x replace-string RET /usr/lib/X11/xdm/ RET /usr/openwin/lib/xdm

% cp /usr/local/X11/bin/openwin ./xdm-start

% emacs xdm-start

  Need to change the last few lines to load up correctly:

$OPENWINHOME/bin/xinit -- ${SERVER-$OPENWINHOME/bin/xnews} $DISPLAY $PASSTHRU $AUTH
rm -f $AUTHFNAME
exit 0

TO....

/usr/local/X11/bin/xdm -config /usr/openwin/lib/xdm/xdm-config -daemon

Now, these were the directions to ....

|>Now, if you have been following this closely, you would now expect this to
|>work. Unfortunatly, it doesn't. This is because xnews has dynamic linking,
|>which only uses trusted paths instead of LD_LIBRARY_PATH when running as
|>root as a security feature. The problem is that /usr/openwin/lib is not
|>trusted under SunOS 4.1.1 (what I'm running). So, you have to do as follows:
|>
|>cd /usr/openwin/lib
|>foreach i (libXextent*)
|>ln -s /usr/openwin/lib/$i /usr/local/lib/$i
|>end

Now, I believe that I first moved each of the files in the /usr/local/lib
as follows:

% cd /usr/local/lib
% foreach file (LibXextent*)
? cp $file $file-old
? rm $file
? ln -s /usr/openwin/lib/$file $f
? end

% cd /usr/openwin/lib/xdm
% ps guax | grep xsun
% ps gaux | grep xdm
% kill -9 PID1 PID2
  (PID1 and PID2 are the the two pids of the processes above)
% xdm-start



I quickly saw that the old fonts in xdm-config would not work with
xnews.  So, here is my xdm-config and Xresources files...

# xdm-config for raven.bu.edu
DisplayManager.servers:      /usr/openwin/lib/xdm/Xservers
DisplayManager.errorLogFile: /usr/openwin/lib/xdm/errors
#DisplayManager.errorLogFile: /dev/null
DisplayManager*resources:    /usr/openwin/lib/xdm/Xresources
DisplayManager*xrdb:	     /usr/X11/bin/xrdb
DisplayManager*startup:	     /usr/openwin/lib/xdm/Xstartup
DisplayManager*reset:        /usr/openwin/lib/xdm/Xreset
DisplayManager*session:      /usr/openwin/lib/xdm/Xsession
DisplayManager*pingInterval: 1
DisplayManager*pingTimeout: 1
DisplayManager*authorize: false
DisplayManager.pidFile:      /usr/openwin/lib/xdm/xdm-pid
DisplayManager*userPath:     ":/bin:/usr/bin:/usr/local/X11/bin:/usr/local/bin:/etc:/usr/ucb"
DisplayManager*systemPath:   ":/bin:/etc:/usr/bin:/usr/local/X11/bin:/usr/local/bin:/usr/ucb"
DisplayManager*failsafeClient:	/home/local/X11/bin/xterm

#  Xresources file for raven.bu.edu
xlogin*fail: Oppps, please try again...
xlogin*greeting: Signal Processing and Interpretation Lab
xlogin*unsecureGreeting: SPIlab: Unsecured Login
xlogin*namePrompt: login :
xlogin*borderWidth: 3

xterm*Font:	9x15
xterm*geometry:	+300+200


#ifdef COLOR
xlogin*greetColor: #f63
xlogin*failColor: red
xlogin*Foreground: black
xlogin*Background: #fdc
#else
xlogin*Foreground: black
xlogin*Background: white
#endif

!
! $Id: Xlogin.ad,v 1.1 90/07/09 15:44:52 stumpf Exp Locker: stumpf $
!

Xlogin*loginInfo*font:	-adobe-times-medium-r-normal--*-180-*-*-p-*-iso8859-1
Xlogin*motdLabel*font:	-b&h-lucida-bold-i-normal-sans--*-140-*-*-p-*-iso8859-1
Xlogin*motdFont:	-misc-fixed-medium-r-normal--*-120-*-*-c-*-iso8859-1
Xlogin*showMOTD:	IfChanged
Xlogin*Accelerators:	#override\n\
	<Btn1Down>:	set() notify()	\n\
	<Btn2Down>:	set() notify()	\n\
	<Btn3Down>:	set() notify()	\n\
	<Key>0x20:	set() notify()	\n\
	<Key>Return:	set() notify()	\n\
	<Key>F1:	set() notify()
Xlogin*Command*Translations:	#override\n\
	<Btn1Down>:	set() notify()	\n\
	<Btn2Down>:	set() notify()	\n\
	<Btn3Down>:	set() notify()	\n\
	<Key>0x20:	set() notify()	\n\
	<Key>Return:	set() notify()	\n\
	<Key>F1:	set() notify()
!
! NOTE: this ifdef has no meaning unless this file is loaded
!       with xrdb!
!
#ifdef COLOR
Xlogin*loginInfo*foreground:	DeepPink
Xlogin*motdLabel*foreground:	red
Xlogin*motd.background:		white
Xlogin*motd*Foreground:		maroon
Xlogin*Command*background:	lightcyan
Xlogin.Form.Background:		LemonChiffon
Xlogin*Label.Background:	LemonChiffon
#endif


!
! $Id: Xlogin.ad,v 1.1 90/07/09 15:44:52 stumpf Exp Locker: stumpf $
!

Xlogin*loginInfo*font:	-adobe-times-medium-r-normal--*-180-*-*-p-*-iso8859-1
Xlogin*motdLabel*font:	-b&h-lucida-bold-i-normal-sans--*-140-*-*-p-*-iso8859-1
Xlogin*motdFont:	-misc-fixed-medium-r-normal--*-120-*-*-c-*-iso8859-1
Xlogin*showMOTD:	IfChanged
Xlogin*Accelerators:	#override\n\
	<Btn1Down>:	set() notify()	\n\
	<Btn2Down>:	set() notify()	\n\
	<Btn3Down>:	set() notify()	\n\
	<Key>0x20:	set() notify()	\n\
	<Key>Return:	set() notify()	\n\
	<Key>F1:	set() notify()
Xlogin*Command*Translations:	#override\n\
	<Btn1Down>:	set() notify()	\n\
	<Btn2Down>:	set() notify()	\n\
	<Btn3Down>:	set() notify()	\n\
	<Key>0x20:	set() notify()	\n\
	<Key>Return:	set() notify()	\n\
	<Key>F1:	set() notify()
!
! NOTE: this ifdef has no meaning unless this file is loaded
!       with xrdb!
!
#ifdef COLOR
Xlogin*loginInfo*foreground:	DeepPink
Xlogin*motdLabel*foreground:	red
Xlogin*motd.background:		white
Xlogin*motd*Foreground:		maroon
Xlogin*Command*background:	lightcyan
Xlogin.Form.Background:		LemonChiffon
Xlogin*Label.Background:	LemonChiffon
#endif



Any comments/replies/death-threats would be nice.

JC


--
James Cameron  -  jc@raven.bu.edu        |  "But to risk we must, for the 
Signal Processing and Interpretation Lab |  greatest hazard in life is to risk
ECS Engineering Dept.                    |  nothing.  For the man or woman who
	Boston University, Boston MA     |  risks nothing, has nothing, does
	Work: 617 353-2879               |  nothing, is nothing."
Information Technology                   |
	Boston University, Boston MA     |  (Quote from the eulogy for the late
	work: 617 353-2780 ext. 338      |   Christa McAuliffe.)