fix(launcher): drawer launches Terminal=true apps via xdg-terminal-exec#174
Open
ImIvanGil wants to merge 1 commit into
Open
fix(launcher): drawer launches Terminal=true apps via xdg-terminal-exec#174ImIvanGil wants to merge 1 commit into
ImIvanGil wants to merge 1 commit into
Conversation
The app drawer (SUPER) used Quickshell's DesktopEntry.execute() directly, which does not wrap commands of Terminal=true entries in a terminal emulator. As a result, TUI apps like btop, htop, nvim, ranger, lazygit, etc. silently failed to launch — clicking them did nothing visible because the binary ran without a TTY and crashed immediately. The dock (DockAppButton.qml) already used AppSearch.launchApp() for the same purpose, so the drawer was inconsistent with the rest of the shell. Two changes: 1. LauncherView.executeApp() now delegates to AppSearch.launchApp(), matching the dock and unifying app-launch behavior across modules. 2. AppSearch.launchApp() prepends `xdg-terminal-exec` when the entry's runInTerminal property is true. xdg-terminal-exec is the freedesktop default-terminal-spec wrapper and is the canonical way to launch TUI apps from a desktop launcher in 2025+. Users must install xdg-terminal-exec (AUR / packaged in some distros) and configure ~/.config/xdg-terminals.list with their preferred terminal (e.g. `kitty.desktop` or `alacritty.desktop`). Tested with: btop, htop, nvim, vim, ranger (all Terminal=true in their .desktop files). Before: silent failure. After: opens in configured terminal emulator. Refs: freedesktop.org default-terminal-spec
This was referenced May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The app drawer (
SUPERkeybind) silently fails to launch any.desktopentry that hasTerminal=true— e.g. btop, htop, nvim, ranger, lazygit, etc. Clicking these does literally nothing: no error, no flash, no terminal window. The behavior is hard to debug because the failure is invisible.Root cause
LauncherView.executeApp()(line 228) calls Quickshell'sDesktopEntry.execute()directly:Quickshell's
DesktopEntry.execute()(at least in older / illogical-impulse-quickshell-git 0.2.0) does not wrapTerminal=trueentries in a terminal emulator — it simply runs theExecline, which causes the TUI binary to crash immediately when stdin/stdout aren't a TTY.Meanwhile,
DockAppButton.qml:184already usesAppSearch.launchApp()for the same purpose, which handles process spawning correctly viabash -c "setsid ...". So the drawer was inconsistent with the dock.Fix
Two minimal changes:
LauncherView.qml—executeApp()now delegates toAppSearch.launchApp(app), matching the dock's behavior. Unifies app-launch logic across the shell.AppSearch.qml—launchApp()now prependsxdg-terminal-execto the command when the entry'srunInTerminalis true.xdg-terminal-execis the freedesktop default-terminal-spec wrapper — the canonical way to launch TUI apps from a desktop launcher.Requirements for users
After this fix, users need to have
xdg-terminal-execinstalled (AUR on Arch, packaged on most modern distros) and configured via~/.config/xdg-terminals.list:(or
alacritty.desktop,foot.desktop, etc.)Worth mentioning in the README under "Requirements" — happy to add that in a follow-up if requested.
Testing
Reproduced the bug with:
btop(Console-only, Terminal=true)htop(same)nvim(Terminal=true)ranger(Terminal=true)Before this patch: silent failure for all four.
After this patch: each one opens correctly in
kitty(the configured terminal viaxdg-terminals.list).GUI apps (Brave, Dolphin, etc.) continue to work unchanged —
runInTerminalis false, the wrap branch is skipped, behavior is identical to before.Diff stats
This is the first of a series of fixes I want to upstream from a longer debugging session on a CachyOS + Ambxst setup. Each subsequent fix will be its own PR to keep review focused. Happy to iterate based on feedback.