Re: [dev] [PATCH] Check for presence of SHELL environment variable

From: <k0ga_AT_shike2.com>
Date: Mon, 3 Nov 2014 11:33:17 +0100

>> HOME must hold the value of the user's home directory, if this
>> value is not the value of /etc/passwd then you have an error
>> in your configuration. The same can be said about SHELL. You
>> can change your shell selection using chsh.
>
> I don't agree with your interpretation of the POSIX verbiage, but
> regardless, in my experience, the vast majority of applications check
> for $HOME before checking a user's passwd entry and the same applies
> with shells. Going with the principal of least surprise, this patch
> makes perfect sense. Even if you ignore that. I think SHELL could be a
> considered a special case -- a user may not have control of their system
> shell, and their only option for overriding it is updating SHELL after
> logging in.

The problem here is that POSIX doesn't say anything about terminal
emulators, and they don't fit correctly in the system definition. The
correct behaviour of a terminal emulator should be execute a login
program, but it is painful to force the user to write the user/password
all the times, so almost all terminal emulators duplicate the work
of login, but without asking. This is the reason they dulicate some
of the work of login. You can set the value of SHELL in your
profile if you cannot modify the value of /etc/passwd, but it means
you are going to execute two shells (the first from your /etc/passwd
and the second from your .profile).

I would like to listen the opinion of other suckless developers about
this point. What do you think guys?

Regards,
Received on Mon Nov 03 2014 - 11:33:17 CET

This archive was generated by hypermail 2.3.0 : Mon Nov 03 2014 - 11:36:12 CET