0

I ran a fresh install of garuda dragonised,it comes with a fish shell by default. I had no experience with this so asked the installer to add zsh -which it did along with config files.

Upon booting into the system I was still running fish but zsh appeared to be installed and have config in place so I tried chsh and a reboot on my login account.

Upon logging back in echo "$SHELL" will return /usr/bin/zsh but the active shell is very clearly still fish

To be honest I kinda gave up and decided to roll with fish yesterday but I would like to try to understand what might have happened...

I was very clear not to get confused between my own account and sudo - in fact I set both to zsh and rebooted again for good measure with no change to the actual shell presented (still fish) for either but with both reporting /usr/zsh or /usr/bin/zsh

if i try to run source ~/.zshrc then I get errors about assignment using = in fish, I should use SET HISTFILE instead

UPDATE: changed title to reflect new understanding, I have also removed zsh, all config and re-installed

  • I can run zsh manually and it seems to work fine
  • i am launching the shell from konsole via the gui

I am now thinking the call to launch konsole is probably binding a particular shell - any tips where to look would be appreciated

SwiftD
  • 151
  • 7
  • what does which /bin/sh return – belkarx Mar 24 '22 at 16:02
  • 2
    Related: https://unix.stackexchange.com/questions/522907/shell-environment-variable-still-points-to-zsh-after-using-bash?noredirect=1&lq=1 – fuzzydrawrings Mar 24 '22 at 16:06
  • @belkarx ẁhich /bin/sh returns /bin/sh – SwiftD Mar 24 '22 at 16:30
  • @fuzzydrawings thanks, I'll have a read – SwiftD Mar 24 '22 at 16:31
  • @fuzzydrawings - im still reading that link but the accepted answer seems not applicable- if this was just an incorrect $SHELL variable then the zshrc would have parsed properly wouldn't it? or am i misunderstanding something – SwiftD Mar 24 '22 at 16:38
  • 1
    How did you use chsh? If you used it with sudo, you've changed root's login shell, not yours. Do you have a .zshrc, .zprofile or .zshenv file in your home directory? If so, does it say to start the fish shell? Can you start the zsh shell by typing zsh? – Kusalananda Mar 24 '22 at 16:38
  • @they no, I changed both for good measure - I saw another question where that was the issue so was very careful – SwiftD Mar 24 '22 at 16:40
  • What does getent passwd yourusername print? – Kusalananda Mar 24 '22 at 16:42
  • @they yesterday I had .zshrc, and a .zhistory (that wasnt getting populated generally but had some entries from where i had explicitly launched zsh at some point) and maybe something else in my home, they were all set up by garuda. Since then I haveI deleted all those files and removed zsh completely. I have resinstalled and switched again to test. I now have the same situation with just a .zshrc file copied from /etc/skel. the output of getent passwd is: dan:x:1000:1000:dan:/home/dan:/usr/bin/zsh but i am still clearly in fish and i get same fish error parsing .zshrc – SwiftD Mar 24 '22 at 17:22
  • @StéphaneChazelas It is definitely not just an issue with the SHELL variable being incorrect because my fish configuration is working great whilst everything tells me I am using zsh - I am 100% using fish when I dont expect to be (honestly fish is great and I probably will stick with it I just want to know what is happening) – SwiftD Mar 24 '22 at 17:27
  • @they yes I seem to be able to start a zsh explicitly its just giving me fish by default and telling me its using zsh – SwiftD Mar 24 '22 at 17:29
  • something must be switch the shell to fish after it has been set to zsh (and not updating the SHELL variable when it does)... but i dont know what – SwiftD Mar 24 '22 at 17:36
  • $SHELL is the variable that determines your prefered shell. Applications such as xterm or vi that start or may start a shell for you will use that. That's all there is to that variable. It is set by login or other login managers to your login shell as defined in the passwd database. If fish is started in whatever terminal you're using, you need to determine how. In what context are we here. Is that in a terminal emulator, is that over ssh? – Stéphane Chazelas Mar 24 '22 at 17:39
  • @StéphaneChazelas im just updating the question to summarise - but I am launching the shell using the Konsole terminal and was just wondering if that is where the issue is, perhaps konsole is launching with a reference to the fish shell... that would make sense if konsole is ignoring my shell settings and leaving the $SHELL var as it is – SwiftD Mar 24 '22 at 17:48
  • What's the value of the SHELL environment variable that konsole itself returned on startup? What's the output (from a zsh shell) of grep -z '^SHELL=' /proc/${^$(pidof konsole)}/environ | tr '\0' '\n'? – Stéphane Chazelas Mar 24 '22 at 18:00
  • How was konsole started? What's the output of ps -wo args -C konsole? – Stéphane Chazelas Mar 24 '22 at 18:01
  • @StéphaneChazelas thanks for help - you were correct, i found a setting through the gui to bind a shell for konsole – SwiftD Mar 24 '22 at 18:16

2 Answers2

1

Thank you all for your help in working through this.

It turned out to be a setting binding the shell to the Konsole terminal. There is a command line flag to pass this in when launching.

For the garuda KDE based desktop you can access this setting under settings->configure konsole-> edit profile from the konsole gui menus`

SwiftD
  • 151
  • 7
0

Right clicking in the fish terminal then under configure profile under command changing it to /usr/bin/zsh solve my problem. It was stuck with /usr/bin/fish