[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: kdm and use of /etc/profile



Henning Moll wrote:

> It has been discussed a few days before how to setup kdm to use a
> login shell:
>
> in /etc/kde3/kdm/Xsession change the first line from:
> #!/bin/sh 
> to
> #!/bin/bash --login
>
> ok.
>
> i wonder if this should be the default (it seems to be default for
> xdm/gdm) as some packages need /etc/profile sourced.

Hmm. Isn't the real issue that the user expects that his login script
will be sourced at login time? "/bin/bash --login" is fine if your login
shell is in fact bash, but what if it's zsh, ksh, tcsh...? There really
ought to be a better solution for this.

Currently, /etc/kde3/kdm/Xsession (on my system) contains (ignoring a
few comment lines) only the following:

#!/bin/sh
. /etc/X11/Xsession

How about the substituting the following:

#!/bin/sh
myshell=`grep "^$USER:" /etc/passwd | cut -d : -f 7`
exec $myshell -l -c /etc/X11/Xsession

Maybe there's a simpler way of determining the user's login shell? That
grep-and-cut is the way I generally do it.

Craig

Attachment: pgp1JQg1RmB8g.pgp
Description: PGP signature


Reply to: