feat: add Linux/Fedora terminal support with Wayland detection#19
Open
morwol wants to merge 1 commit intoDatafyingTech:masterfrom
Open
feat: add Linux/Fedora terminal support with Wayland detection#19morwol wants to merge 1 commit intoDatafyingTech:masterfrom
morwol wants to merge 1 commit intoDatafyingTech:masterfrom
Conversation
Fixes terminal spawning on Fedora and other RPM-based distributions where
`x-terminal-emulator` (a Debian/Ubuntu mechanism) does not exist.
Changes:
- Replace hardcoded terminal list in `open_terminal` with a new
`find_terminal_emulator()` helper that probes installed terminals in
order of preference: x-terminal-emulator → gnome-terminal → konsole →
xfce4-terminal → alacritty → kitty → tilix → xterm → urxvt
- Add Wayland awareness: under a pure Wayland session (WAYLAND_DISPLAY
set, DISPLAY unset) X11-only terminals (xterm, urxvt) are skipped to
avoid launch failures when XWayland is not running
- Use correct argument separator per terminal ("--" for gnome-terminal,
konsole, kitty; "-e" for everything else)
- Update README with Fedora/DNF build dependencies, cronie setup, and
a Wayland compatibility note
Tested on Fedora 43 with GNOME (Wayland + XWayland), producing a working
.rpm and .AppImage via `pnpm tauri build`.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
On Fedora (and other RPM-based distributions), launching a terminal from ATM fails silently. The previous code only tried
x-terminal-emulator,gnome-terminal, andxterm— in that order.x-terminal-emulatoris a Debian/Ubuntu alternatives-system mechanism that does not exist on Fedora, andxtermis not installed by default.This means the "Deploy Team" button does nothing on Fedora out of the box.
Solution
src-tauri/src/lib.rsfind_terminal_emulator()helper (Linux-only,#[cfg(target_os = "linux")]) that probes installed terminals in order of preference:x-terminal-emulator→gnome-terminal→konsole→xfce4-terminal→alacritty→kitty→tilix→xterm→urxvtWAYLAND_DISPLAYis set andDISPLAYis not (pure Wayland, no XWayland), X11-only terminals (xterm,urxvt) are skipped automatically--forgnome-terminal,konsole,kitty;-efor everything elseREADME.mddnf installcommandscroniesetup instructions (needed for cron scheduling)Testing
Tested on Fedora 43, GNOME, Wayland + XWayland:
pnpm tauri dev— app launches, terminal spawning works viagnome-terminalpnpm tauri build— produces.rpm(7.9 MB) and.debsuccessfullyNotes
x-terminal-emulatorentry is kept first so Debian/Ubuntu behavior is unchanged