[comp.windows.x] xdm => bug

harkcom@potato.pa.Yokogawa.CO.JP (Alton Harkcom) (08/16/90)

   It may just be something that was overlooked or was thought to be
unneccesary ( => insect). Or it may just be a mistake ( => bug).

   I recently started using xdm. At first I thought "no problem, I can
put up with the changes". Now I see that it is more than a minor change.
xdm doesn't read the 'login' file when it logs in a user. This makes for
some nasty complaints from the users.

   I have put most of the stuff from my login file into the xsession
file and the rest into cshrc file. But then there arises a problem of
using bourne shells or kourne shells or whatever-you-call-them shells.
There is also the problem of users who want things to be left the way
they are "because thats the way they are".

   Anybody got a solution or should I just trash xdm and take the flak.
--
--
  $@2#2OEE5!3t<02q<R(J PA$@#15;#22](J
  TEL 0422-52-5748  FAX 0422-55-1728
  E-mail harkcom@pa.yokogawa.co.jp

keith@EXPO.LCS.MIT.EDU (Keith Packard) (08/16/90)

>    I recently started using xdm. At first I thought "no problem, I can
> put up with the changes". Now I see that it is more than a minor change.
> xdm doesn't read the 'login' file when it logs in a user. This makes for
> some nasty complaints from the users.

You can get xdm to read the .login/.profile file by:

	a) invoking xterm -ls as the user session.  xterm -ls creates
	   a login shell process which should read the file.

	b) including code in Xsession which checks the shell of the
	   user, and invokes a separate session program which reads the
	   file

Xsession:

#!/bin/sh

case $SHELL in
/bin/sh)
	exec Xsession-sh
	;;
/bin/csh)
	exec Xsession-csh
	;;
esac
exec xterm -ls

Xsession-sh:

#!/bin/sh
. $HOME/.profile

<insert rest of session here>

Xsession-csh:
#!/bin/csh
source ~/.login

<insert rest of session here>

tale@turing.cs.rpi.edu (David C Lawrence) (08/17/90)

In  <9008160412.AA18389@xenon.lcs.mit.edu> keith@EXPO.LCS.MIT.EDU (Keith Packard) writes:

           a) invoking xterm -ls as the user session.  xterm -ls creates
              a login shell process which should read the file.

It has been my experience here that the main problem people would have
with xdm as opposed to their own startx is that they didn't have their
environment variables set up -- I feel victim to it myself when things
I started up from twm didn't have PRINTER, EMACSLOADPATH, MANPATH or
even just PATH right, the last causing some programmes I had in my
menus to not even be found.  Just having an initial xterm client read
it doesn't help a window manager started from the session
initialisation.

           b) including code in Xsession which checks the shell of the
              user, and invokes a separate session program which reads the
              file

I don't think I would do this to them; this would probably necessitate
changes in many of their login files.  Many people I know set up login
scripts that are very login(1), tty oriented.  Of course they could
change them so they weren't, but as long as they are doing that why
not just have them break out their special stuff another way?  All I
did was move my environment variables to a .env file which I source
from my .Xsession and .bash_profile.
--
   (setq mail '("tale@cs.rpi.edu" "tale@ai.mit.edu" "tale@rpitsmts.bitnet"))

paul@ixi.uucp (Paul Davey) (08/20/90)

I have another way of making my window manager run with a customised
environment,

~/.xsession

#!/bin/sh
HOST="@`hostname`"
xrdb $HOME/.Xdefaults
XLOGIN=1
export XLOGIN
exec xterm -ls -geometry  80x24+0-0  -T "LOGIN$HOST" -n "LOGIN$HOST"


and at the end of ~/.login

if ( $?XLOGIN ) then
	unsetenv XLOGIN
	# set a local csh variable for my critical shell
	set ignoreeof
	(setenv LEVEL 0 ; uwm >& /tmp/uwmlog$$ & \
	echo ; xhost + & \
	xterm -ls -geometry  80x45+0+0  -T $ME@$THISHOST -n $ME@$THISHOST & \
	xclock -g 100x100-0+0 & \
	xbiff -g 100x50-0+100 & \
	xmodmap $HOME/.Xmodmap & \
	xset fp /usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/100dpi/,/usr/lib/X11/fonts/75dpi/ & )
endif


It's not perfect but it works for me.
	paul

harkcom@potato.pa.Yokogawa.CO.JP (Alton Harkcom) (08/30/90)

In article <PAUL.90Aug20161818@cheshire.ixi.uucp>
   paul@ixi.uucp (Paul Davey) writes:

 =}I have another way of making my window manager run with a customised
 =}environment,
 =}
[xdm stuff deleted]

   But you are still entering through an xterm with the -ls option. That
is something that almost nobody does here. Without using ax xterm, it is
impossible to use you .login file as if you were logging in.

   Note to Consortium:

	No matter what you call it, xdm handles a person logging in
	yet makes it impossible to use the .login file. Any situation
	which allows the reading of .login doesn't allow for checking
	envar's or using stty and such. If xdm wants to act like a
	login shell make it act like a login shell instead of only
	doing half the job. If you don't want it to act like a login
	shell then don't let it log users in.
--
--
  $@2#2OEE5!3t<02q<R(J PA$@#15;#2(J$@2](J
  TEL 0422-52-5748  FAX 0422-55-1728
  E-mail harkcom@pa.yokogawa.co.jp