From c68da85c12ba3f8f32a17ce488c33a10b4a379d5 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Thu, 26 Feb 2026 23:55:45 -0600 Subject: [PATCH] =?UTF-8?q?store:=20Fix:=20KDE=20caches=20$SHELL=20at=20lo?= =?UTF-8?q?gin=20=E2=80=94=20Konsole=20still=20uses=20old=20shell=20after?= =?UTF-8?q?=20chsh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...n-konsole-still-uses-old-shell-a-6b1ef7.md | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 graph/fixes/fix-kde-caches-shell-at-login-konsole-still-uses-old-shell-a-6b1ef7.md diff --git a/graph/fixes/fix-kde-caches-shell-at-login-konsole-still-uses-old-shell-a-6b1ef7.md b/graph/fixes/fix-kde-caches-shell-at-login-konsole-still-uses-old-shell-a-6b1ef7.md new file mode 100644 index 00000000000..3d767bebaa8 --- /dev/null +++ b/graph/fixes/fix-kde-caches-shell-at-login-konsole-still-uses-old-shell-a-6b1ef7.md @@ -0,0 +1,38 @@ +--- +id: 6b1ef7c1-547f-4a79-aad7-23a720378c03 +type: fix +title: "Fix: KDE caches $SHELL at login — Konsole still uses old shell after chsh" +tags: [kde, konsole, fish, shell, workstation, dotfiles, chsh] +importance: 0.55 +confidence: 0.8 +created: "2026-02-27T05:55:45.065939+00:00" +updated: "2026-02-27T05:55:45.065939+00:00" +--- + +# Fix: KDE caches $SHELL at login — Konsole still uses old shell after chsh + +## Problem +After running `chsh` to change the login shell from zsh to fish, `/etc/passwd` updates immediately but KDE's `$SHELL` environment variable remains stale. KDE caches the login environment at session start, so new terminals opened in Konsole still launch the old shell because Konsole's fallback profile uses `$SHELL`. + +## Root Cause +KDE reads `$SHELL` from the environment at session startup (PAM/login), not dynamically from `/etc/passwd`. `chsh` only updates `/etc/passwd` — it does not send a signal to a running session. + +## Workaround (applied to Cal's workstation) +Add an explicit `Command` line to the Konsole default profile so it does not fall back to `$SHELL`: + +**File:** `~/.local/share/konsole/Profile 1.profile` + +```ini +[General] +Command=/usr/bin/fish +``` + +This bypasses the stale `$SHELL` entirely and launches fish directly. + +## Long-term fix +Log out and back in to KDE. After re-login, `$SHELL` will reflect the new value from `/etc/passwd` and the explicit `Command=` override can be removed if desired. + +## Notes +- Applies to any shell change via `chsh` on KDE Plasma (Konsole, KDE apps) +- Other terminal emulators may behave differently +- Cal's workstation is on Nobara/Fedora with KDE Plasma