Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In ~/.profile I have this:

. "$HOME/projects/devenv.sh"

In $HOME/projects/devenv.sh I have:

BASEDIR=$(dirname $0)
export APILIB_CONFIG="$BASEDIR/apilib.conf"

When I open a Konsole session I get:

vic@vic ~/projects/ $ env|sort

So APILIB_CONFIG environment variable value inside ~/.profile is correct, but when inside ZSH, it's has wrong path.

How can this happen?

share|improve this question
Is ~/.profile sourced in zsh? –  Gunnar Hjalmarsson Apr 21 '14 at 12:08
Not explicitly. I am using oh-my-zsh, and as /home/vic/projects/apilib.conf is printed when I a open a terminal, it's clear that .profile is sourced. –  warvariuc Apr 21 '14 at 12:23
Well, I suspect that you may have more luck with some other config file. Run man zsh and check out which files are mentioned there. –  Gunnar Hjalmarsson Apr 21 '14 at 13:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.