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.

I've started using zsh for my login shell.

I've create an a ~/.zprofile, but in order for it to be put into effect, I have to manually source it.

How can I have my settings load automatically?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Commands from ~/.zprofile are only read if the shell is a login shell. Did you set zsh as your default shell using cshsh or just in the preferences of the terminal emulator? If the former, logging out and back in should do the trick (although, the file will be only read when you actually perform the login, not when you start a new shell), or you have to tell your terminal emulator to execute the shell as a login shell. If you are using gnome-terminal, go to Edit->Profile Preferences, select the Title and command tab and check the Run command as a login shell box.

share|improve this answer
    
Indeed I did use cssh to set my login shell.Editing gnome-terminals preferences as per your suggestion seemed to do the trick. –  bobdobbs Jun 13 '12 at 23:57
    
Now, suppose I develop something like gnome-terminal. What do I have to do in order to run zsh as a login shell? Is it enough to just set its argv[0] to -, or are there more steps? –  ulidtko May 2 at 17:12
1  
@ulidtko zsh --help will tell you that it is zsh --login. Same goes for bash, ash, sh, csh, tcsh, fish... –  Michael Wild May 9 at 20:46

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.