[Bio-linux-dev] login shells, profiles, etc

Tim Booth tbooth at ceh.ac.uk
Mon Feb 4 13:23:33 EST 2013


Hi Tony,

This is all true, but nevertheless the BLAST environment does get set
for ZSH users because we hook all the ZSH startup scripts
off /etc/zsh/zshrc not off /etc/zsh/zprofile, so it's only BASH users
who will have the problem you described for the case of the BLASTDB
environment variable on Bio-Linux.

Of course, what I'd really like to do is kill off any mention
of /home/db entirely, as shared files belong in /var or /usr/share
depending on how often they change.  Maybe I'll manage to do that this
year.

Cheers,

TIM

On Mon, 2013-02-04 at 17:24 +0000, Tony Travis wrote:
> On 04/02/13 14:28, Tim Booth wrote:
> > Hi Tony,
> >
> >> One other thing to note is that you need to set the Gnome Terminal to
> >> run as a login shell to source the correct files from /etc/profile.d and
> >> ~/.profile. The Gnome Terminal does not run as a login shell by default,
> >> because it is a sub-shell that only sources ~/.bashrc, and it doesn't
> >> inherit a shell login environment that a command-line sub-shell would.
> >> This is a known problem with Gnome Terminal "bash" sessions.
> >>
> >>> Gnome Terminal / Edit / Profile Preferences / Title and Command / Command [x] Run command as a login shell
> >
> > I didn't know about this, but it won't affect most Bio-Linux users who
> > will be in ZSH rather than BASH.
> 
> Hi, Tim.
> 
> I've just checked and found that exactly the same problem exists for 
> "zsh". On a command-line login shell, these startup files are sourced:
> 
>    /etc/zsh/zshenv
>    /etc/zsh/zprofile
>    /etc/zsh/zshrc
>    /etc/zsh/zlogin
> 
> Invoking an interactive sub-shell from the login shell only sources:
> 
>    /etc/zsh/zshenv
>    /etc/zsh/zshrc
> 
> Setting Gnome Terminal to run "zsh" as a login shell sources:
> 
>    /etc/zsh/zshenv
>    /etc/zsh/zprofile
>    /etc/zsh/zshrc
>    /etc/zsh/zlogin
> 
> By default Gnome Terminal runs "zsh" as an interactive shell and only 
> sources:
> 
>    /etc/zsh/zshenv
>    /etc/zsh/zshrc
> 
> HTH,
> 
>    Tony.
> _______________________________________________
> Bio-Linux mailing list
> Bio-Linux at nebclists.nerc.ac.uk
> http://nebclists.nerc.ac.uk/mailman/listinfo/bio-linux

-- 
Tim Booth <tbooth at ceh.ac.uk>
NERC Environmental Bioinformatics Centre 

Centre for Ecology and Hydrology
Maclean Bldg, Benson Lane
Crowmarsh Gifford
Wallingford, England
OX10 8BB 

http://nebc.nerc.ac.uk
+44 1491 69 2705



More information about the Bio-linux-devel mailing list