I've been playing around with the fish shell for a few days and I like it. In order to start fish in a terminal via a quicklauncher or menu, I'm using a script like this:1


export SHELL=/bin/fish
exec konsole  # <- KDE's terminal emulator

If I run this script from the command-line, it does what's expected: starts a konsole whose shell is fish.

But run from a KDE launcher, $SHELL has been reset and I get /bin/bash. What's more, if I replace konsole with Terminal (from XFCE), it doesn't work even from the command-line; the terminal starts up with $SHELL reset. So it appears that:

  • XFCE's Terminal will reset $SHELL no matter what.
  • KDE's konsole will not reset $SHELL when started from the command-line.
  • KDE will reset $SHELL when an application is started via a launcher.

If I change the default shell in /etc/passwd, every works. That's fine, except there are a few users (I use more than one) I would prefer not to do this with, but I still want to quicklaunch a terminal to use fish.

Note that there are no profile, etc. files anywhere on the system that set SHELL. There's just the default in /etc/passwd. Also, this is not just an issue under KDE (it also happens via fvwm). I've grepped through the KDE and XFCE conf directories too.

I realize this is probably just life, but I'm wondering if there isn't something I've missed here, or if anyone knows more specifically why this would happen.

1. In fact that's an SSCCE -- the reason this is irritating is I like to start a terminal with two tabs open running mc, meaning the work-around is more than just typing fish. This is also why I can't use a -e type switch to the terminal command; that's what's starting mc, which uses a subshell based on $SHELL.

  • Why not use whatever mechanism the terminal emulator provides to run commands? Also, how are you setting SHELL in the launcher?
    – muru
    Dec 31, 2014 at 17:00
  • @muru I am using such a mechanism (konsole via --tabs-from-file and Terminal via -e); but what it starts is actually mc, which uses a subshell based on $SHELL. But the SSCCE is the same. I suppose I could use this to start a shell script so it is set the other way around. SHELL by the script the launcher laucher calls. I have never noticed that it fiddles with the environment in any other way.
    – goldilocks
    Dec 31, 2014 at 17:55
  • 1
    ^ Sorry, that should read "$SHELL is set by the script the launcher calls".
    – goldilocks
    Dec 31, 2014 at 18:01

1 Answer 1


For KDE look in path $KDEDIR/share/apps/konsole for file shell this post is similar to your question http://www.kde-forum.org/artikel/5064/configuring-and-customizing-konsole.html

  • You kinda got me with that, since I grepped through that directory -R -i shell but did not check filenames... However, although there's a bash.profile in there, I don't see anything that specifically sets the shell (and as mentioned, changing it in /etc/passwd works).
    – goldilocks
    Dec 31, 2014 at 18:34
  • You could try adding /bin/fish to $KDEDIR/share/apps/konsole/bash.profile Dec 31, 2014 at 18:36
  • So, what bash.profile turned out to be is the config file for one of my konsole profiles, named "bash" -- I added this for the user with /bin/fish as home shell so a konsole can be started with bash (konsole --profile bash) instead. Not sure if I can do that in conjunction with the mc one...actually I've already found satisfactory work arounds for everything. What I'm curious about is finding out why this is an issue for two separate DE entities.
    – goldilocks
    Dec 31, 2014 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.