Unable to have Zsh as a login shell at Screen's startup
-
03-07-2019 - |
Question
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?
Solution
A fast way to change your shell, for example to Zsh, is to run the following code
chsh -s /bin/zsh
OTHER TIPS
- 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.
If environment and other things aren't working, then you can simply give it as an argument to screen: screen -xR zsh
and screen will run zsh instead of something else (bash).
SHELL=/bin/zsh screen
should work, i. e. set the environment variabe $SHELL
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow