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. – U. Windl Dec 01 '22 at 14:56"$@"mean? When I try it in the terminal, it returns nothing. – sundar_ima Dec 01 '22 at 16:10echo "$@"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. – U. Windl Dec 02 '22 at 07:38echo "$@"is well-defined. – U. Windl Dec 12 '22 at 07:15zshis found? Maybe see https://mywiki.wooledge.org/BashPitfalls – U. Windl Dec 12 '22 at 07:19