From 3a58456517e7c108ee301d3479b6d2e55d0ed80b Mon Sep 17 00:00:00 2001 From: Kevin Nakamura Date: Sun, 6 Jul 2025 21:04:40 +0900 Subject: [PATCH] Try unix terminals in roughly most specific to least specific. --- qt/launcher/src/platform/unix.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/qt/launcher/src/platform/unix.rs b/qt/launcher/src/platform/unix.rs index 0df33838f..2e55f2b69 100644 --- a/qt/launcher/src/platform/unix.rs +++ b/qt/launcher/src/platform/unix.rs @@ -9,17 +9,23 @@ use anyhow::Result; pub fn relaunch_in_terminal() -> Result<()> { let current_exe = std::env::current_exe().context("Failed to get current executable path")?; - // Try terminals in order of preference + // Try terminals in roughly most specific to least specific. + // First, try commonly used terminals for riced systems. + // Second, try the minimalist/compatibility terminals. + // Finally, try terminals usually installed by default. let terminals = [ - ("x-terminal-emulator", vec!["-e"]), - ("gnome-terminal", vec!["--"]), - ("konsole", vec!["-e"]), - ("xfce4-terminal", vec!["-e"]), + // commonly used for riced systems ("alacritty", vec!["-e"]), ("kitty", vec![]), + // minimalistic terminals for constrained systems ("foot", vec![]), ("urxvt", vec!["-e"]), ("xterm", vec!["-e"]), + ("x-terminal-emulator", vec!["-e"]), + // default installs for the most common distros + ("xfce4-terminal", vec!["-e"]), + ("gnome-terminal", vec!["--"]), + ("konsole", vec!["-e"]), ]; for (terminal_cmd, args) in &terminals {