I am trying to use zsh
as the default shell on a system where bash
as default shell. Since I don't have the root permission, I was trying to use bashrc
to switch over shell to zsh at the time of login. I took input from Making zsh default shell without root access and here is my bashrc
content relevant to zsh
:-
if [ -e $(which zsh) ]; then
export SHELL=$(which zsh)
exec $(which zsh) -l
fi
The issue I am encountering is when I boot/reboot the system, it comes up to the login screen but does not reach the Desktop even after providing the correct password. In fact, my system is already configured to directly login to the Desktop without a password.
I have done lot of search on various forums but no one has raised this issue.
My OS is Redhat 8.7 and Alma Linux 8.7 and in both cases, the issue appears the same. Desktop environment is GNOM.
echo "$@"
to the beginning of the script. Probably bash gets the floag for a login shell, but you don't pass it on to zsh."$@"
mean? When I try it in the terminal, it returns nothing.echo "$@"
and run it with a few parameters. When trying to replace the shell, I'm assuming you have some basic understanding how each shell works.echo "$@"
is well-defined.