tags:

views:

382

answers:

3

I put the following to my .zshrc

if [[ $STY = '' ]] then screen -xR; fi

I get Bash when I start terminal now, although I have /bin/zsh at Terminal > Settings in Mac.

Which variable do I need to change to make Zsh my login shell in Screen?

+2  A: 
  • Open your System Preferences.
  • Click on Accounts.
  • Click on the lock icon that says "Click the lock to make changes".
  • Control-click or right click on your account name in the list of accounts on the left.
  • Choose the Advanced Options... menu item.
  • Change your login shell to /bin/zsh.
  • Close and reopen any shells in Terminal.app.
Brian Campbell
@Brian: Thank you! You solved the problem.
Masi
+3  A: 

A fast way to change your shell, for example to Zsh, is to run the following code

chsh -s /bin/zsh
Masi
A: 
SHELL=/bin/zsh screen

should work, i. e. set the environment variabe $SHELL

mihi
@mihi: It seems that the difference with your command to chsh -command is that your command makes the shell temporarily zsh, while chsh makes it as long as you run another chsh -command.
Masi
yeah, right. The difference is what happens to your normal login shell. There are cases where some remote tools that log you in via ssh require a bash or ksh shell, so you cannot globally change your shell. You can still open a screen with zsh's in it (in fact, you can also open a shell with for example Midnight Commanders in it) with this method.
mihi