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

Re: bash profile how?



Once upon a time Bob Proulx said...
> Michael B Allen wrote:
> 
> > Well the exec -l $SHELL -c "$STARTUP" solution fixes that
> 
> Agreed.
> 
> > provided /bin/sh exec accepts the option like bash.
> 
> That was the problem with /bin/sh.  /bin/sh is not required to accept
> args like /bin/bash.  In which case the script interpreter must simply
> be #!/bin/bash.  Using 'exec -l' plus using #!/bin/bash works.  At
> least I can't refute it after thinking about it for the day.

If you mean to put the #!/bin/bash in
/etc/X11/Xsession.d/99xfree86-common_start, it wont work because the
files in /etc/X11/Xsession.d are not executed, but sourced instead. The
#!/bin/bash is then just going to be treated as a comment.

You'd need to have /etc/X11/Xsession run under bash instead of /bin/sh,
or have that script execute the Xsession.d files instead of source them.

Furthermore, is it guaranteed that an X display manager (xdm, kdm, gdm
or some future dm) will set the SHELL environment variable? Is this
documented as a requirement for a display manager?




Reply to: