Skip to content

Offer only installed terminals in the terminal preference - #226

Open
kacperpaczos wants to merge 1 commit into
Dvlv:masterfrom
kacperpaczos:fix/terminal-pref-installed-only
Open

Offer only installed terminals in the terminal preference#226
kacperpaczos wants to merge 1 commit into
Dvlv:masterfrom
kacperpaczos:fix/terminal-pref-installed-only

Conversation

@kacperpaczos

Copy link
Copy Markdown
Contributor

Closes #225

The terminal preference offered every supported terminal, installed or not, and picking an absent one was silently replaced at spawn time by the first supported terminal on the machine — "GNOME Console" selected, Konsole opens. The popup now lists only terminals that are actually present (a binary on PATH, or an installed flatpak), so the selection shown is the terminal that will really run; if none are installed it shows the existing "no supported terminal" message instead of an empty dropdown.

utils::get_installed_terminals does the filtering with the same PATH/flatpak checks get_terminal_and_separator_arg already applies, so the two agree by construction. The spawn-time fallback is untouched — it still guards against a terminal being removed after it was chosen.

the dropdown now lists only installed terminals — Konsole, Kitty, Alacritty on this machine

Verified on a machine with Konsole, Kitty and Alacritty installed and default-terminal set to "GNOME Console": before, the popup showed GNOME Console selected while Konsole opened; after, the popup shows Konsole (what actually runs) and offers only those three.

The preference listed every supported terminal, so a user could pick
one that is not on the machine; the actions that open a terminal then
quietly fell back to the first supported one they found, and the
preference looked broken - "GNOME Console" selected, Konsole opens. The
popup now lists only terminals that are installed (on PATH or as a
flatpak), so what is shown is what will run; with none installed it
shows the existing "no supported terminal" message instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminal preference can select a terminal that is not installed, so another one opens

1 participant