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

Re: $PATH and /etc/profile



Bob Proulx said:
>> 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"
>
> That is clever and I like it.  But unfortunately exec -l is a bash-ism
> and so that does not work if /bin/sh is not bash but a different POSIX
> compatible shell.  Users with ash installed as /bin/sh will fail.
> Because 'exec -l' is not specified by POSIX /bin/sh is not required to
> implement it.  So you can't in general make that change unless you
> have changed Xsession to use '#!/bin/bash'.  Then it works.  But many
> object to using nonstandard bash features like this.

Is that really feasable? Is there even a way to do it without actually
changing the /bin/sh link? Do you know of anyone that actually replaces
bash with another shell for /bin/sh on a debian system? I think in
practice that might prove to be a little daring. At least for a system
with X.

Mike



Reply to: