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

Bug#250765: kdm: never spawns a login shell; thus ~/.bash_profile is never read



See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=250765 for the
full BTS discussion.

martin f krafft wrote:
> On all KDE systems I administer, ~/.bash_profile is never read.

This has gotten a lot of discussion lately on debian-user.  Look at
all of the postings about this!  And these are not all of them, just
those found after a brief search.

  http://lists.debian.org/debian-x/2003/03/msg00255.html
  http://lists.debian.org/debian-user/2003/09/msg02518.html
  http://lists.debian.org/debian-user/2004/03/msg17308.html
  http://lists.debian.org/debian-user/2004/05/msg03884.html - Which
    started this bug!
  http://lists.debian.org/debian-user/2004/06/msg01093.html
  http://lists.debian.org/debian-user/2004/06/msg00669.html
  http://lists.debian.org/debian-user/2004/06/msg01990.html
  http://lists.debian.org/debian-user/2004/06/msg02270.html

I list those many out just to show that many people are having
problems.

In http://lists.debian.org/debian-user/2004/06/msg04016.html Mike
Allen suggests:

> Another method that uses the user's default shell is to change:
> 
>  /etc/X11/Xsession.d/99xfree86-common_start
> 
> to read:
> 
>   exec -l $SHELL -c "$STARTUP"

Clever.  I like it.  But I point out in the next note that 'exec -l'
is a bash'ism and that #!/bin/bash would be needed for Xsession.  But
otherwise I can't find anything seriously wrong with this solution.
It nicely solves the problem of specifying the shell by not specifying
the shell.  I would normally eschew non-posix shell solutions like
this but can't see a reasonable substitute.

The only downside that I can see is that if someone already has a
~/.xsession with '#!/bin/bash --login;exec x-session-manager' then the
environment scripts are read twice when the user logs in with [gkx]dm.
But that hardly seems like an overwhelming disadvantage.

In http://lists.debian.org/debian-user/2004/06/msg02361.html Mike
further points out that Red Hat uses just that technique.  That is,
the technique of doing the following pseudo-code.

  #!/bin/bash
  exec -l $SHELL -c "$STARTUP"

I think a solution has been found by Red Hat.  I think Debian should
implement the same technique.  It promotes compatibility between the
distros.  It resolves a long running xdm login problem for newbies.

Comments?

Bob

-- 
Bob Proulx <bob@proulx.com>
http://www.proulx.com/~bob/
CP-ASEL-IA-Tailwheel-Glider

Attachment: pgpBn6fbNsKw3.pgp
Description: PGP signature


Reply to: