store: Fix: KDE caches $SHELL at login — Konsole still uses old shell after chsh

This commit is contained in:
Cal Corum 2026-02-26 23:55:45 -06:00
parent cd99df9dfe
commit c68da85c12

View File

@ -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