[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



also sprach Bob Proulx <bob@proulx.com> [2004.06.01.0305 +0200]:
> The ksh needs -l to be told it is a login shell.  That works for
> bash and zsh too so looks promising.  But csh won't take -l unless
> it is the only option present.

So the obvious solution is to for kdm to cause the monitor to
explode in the face of the csh user, and to have

http://www.gregor.com/dgregor/csh_whynot.html

be imprinted on the gravestone. ;^>

> thought.  The first user who put '. /etc/bash_completion' into
> their $HOME/.profile (read by bash at login) broke things because
> that is not /bin/sh shell syntax in there.  So just noting one
> type of failure mechanism.

you mean 'source /etc/bash_completion'? I think '. /etc...' is
/bin/sh. source is bashism. At least that's what lintian says...

> The real answer would have to be that the program name starts with a
> '-' like login shells expect.  Of course we can do that[1],
>
>   #!/usr/bin/perl
>   my $SHELL = $ENV{'SHELL'};
>   my $SHELL_BASENAME = $SHELL;
>   $SHELL_BASENAME =~ s@.*/@@;
>   exec {$SHELL} "-$SHELL_BASENAME";

Yes, but perl isn't on every system...

I'd be glad if you could push your excellent thoughts upstream.

-- 
Please do not CC me when replying to lists; I read them!
 
 .''`.     martin f. krafft <madduck@debian.org>
: :'  :    proud Debian developer, admin, and user
`. `'`
  `-  Debian - when you have better things to do than fixing a system
 
Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!

Attachment: signature.asc
Description: Digital signature


Reply to: