Skip to content

feat: add Linux/Fedora terminal support with Wayland detection#19

Open
morwol wants to merge 1 commit intoDatafyingTech:masterfrom
morwol:feat/linux-fedora-support
Open

feat: add Linux/Fedora terminal support with Wayland detection#19
morwol wants to merge 1 commit intoDatafyingTech:masterfrom
morwol:feat/linux-fedora-support

Conversation

@morwol
Copy link
Copy Markdown

@morwol morwol commented Mar 17, 2026

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, and xterm — in that order. x-terminal-emulator is a Debian/Ubuntu alternatives-system mechanism that does not exist on Fedora, and xterm is not installed by default.

This means the "Deploy Team" button does nothing on Fedora out of the box.

Solution

src-tauri/src/lib.rs

  • Extracted a new find_terminal_emulator() helper (Linux-only, #[cfg(target_os = "linux")]) that probes installed terminals in order of preference:
    x-terminal-emulatorgnome-terminalkonsolexfce4-terminalalacrittykittytilixxtermurxvt
  • Added Wayland detection: if WAYLAND_DISPLAY is set and DISPLAY is not (pure Wayland, no XWayland), X11-only terminals (xterm, urxvt) are skipped automatically
  • Correct argument separator per terminal: -- for gnome-terminal, konsole, kitty; -e for everything else
  • Clear error message if no terminal is found, listing recommended options

README.md

  • Added a Fedora/DNF prerequisites block with all required dnf install commands
  • Added cronie setup instructions (needed for cron scheduling)
  • Added a Wayland compatibility note
  • Updated the platform compatibility table to distinguish Debian/Ubuntu from Fedora/RPM

Testing

Tested on Fedora 43, GNOME, Wayland + XWayland:

  • pnpm tauri dev — app launches, terminal spawning works via gnome-terminal
  • pnpm tauri build — produces .rpm (7.9 MB) and .deb successfully

Notes

  • No changes to Windows or macOS code paths
  • No new dependencies added
  • The x-terminal-emulator entry is kept first so Debian/Ubuntu behavior is unchanged

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

1 participant