You are not logged in.

#1 2009-12-01 06:38:46

Metallion
Member
Registered: 2009-09-28
Posts: 12

~/.bash_profile is not sourced on login

As the title says my ~/.bash_profile doesn't seem to get sourced when I log into my system. I have the following code in it.

. $HOME/.bashrc
export OPERAPLUGINWRAPPER_PRIORITY=0
alias go=gnome-open
alias upgrade="yaourt -Su --aur"
alias rename=/usr/bin/perlbin/vendor/rename

None of these 3 aliases work until I type ". ~/.bash_profile".  Does anyone know the cause of this?

I don't use anything like GDM. I just boot into a CLI which I log into and then start X from there. Could it be that .bash_profile is only sourced on that shell and therefore not on terminal emulators that I run inside X? If so then should I just add my aliases to ~/.bashrc instead or is there a better solution?

I'm also wondering if the Opera variable really has any effect here. Will the variable be set globally when in .bash_profile or do I need to run Opera from a specific shell for it?

Thanks in advance smile

Offline

#2 2009-12-01 07:18:16

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: ~/.bash_profile is not sourced on login

Try removing the export and aliases from .bash_profile and add them to .bashrc.  I think you are correct and .bash_profile will only be soured at a login whereas .bashrc will be sourced whenever you open a shell.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2009-12-01 09:09:21

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: ~/.bash_profile is not sourced on login

Just to make the bash startup mechanisms clear you may search "man bash" for "startup file" or look up chapter 6.2 "Bash Startup Files" in "info bash".


To know or not to know ...
... the questions remain forever.

Offline

Board footer

Powered by FluxBB