Skip to content

feat: detect Flatpak terminals - #229

Draft
ericmacedo wants to merge 2 commits into
exequtic:mainfrom
ericmacedo:feature/flatpak-terminal-detection
Draft

feat: detect Flatpak terminals#229
ericmacedo wants to merge 2 commits into
exequtic:mainfrom
ericmacedo:feature/flatpak-terminal-detection

Conversation

@ericmacedo

Copy link
Copy Markdown

Summary

Apdatifier currently discovers terminal applications only with command -v. Flatpak terminals do not install host executables, so supported applications such as Flatpak Yakuake are absent from the terminal selector even though their session D-Bus interface is available.

This feature adds Flatpak-aware terminal support alongside native discovery:

  • Scans installed Flatpak application desktop entries for supported terminal commands.
  • Adds only Flatpak terminals that allow the org.freedesktop.Flatpak host-command bridge, preventing unusable sandboxed entries from appearing.
  • Presents detected entries as command (Flatpak) and preserves their application ID and command in the selected value.
  • Launches regular Flatpak terminals through flatpak run and executes Apdatifier maintenance commands on the host with flatpak-spawn --host.
  • Starts Flatpak Yakuake when necessary, continues to use its existing D-Bus integration, and executes the maintenance command through the same host bridge.
  • Forces TERM=xterm-256color for bridge commands so tput and clear work when Apdatifier is launched by Plasma without a usable terminal environment.
  • Documents that supported terminals may be installed natively or through Flatpak.

Validation

  • bash -n package/contents/tools/sh/terminal
  • node --check package/contents/tools/tools.js
  • Live discovery against the installed Flatpak Yakuake returned flatpak://org.kde.yakuake/yakuake.
  • Verified flatpak-spawn --host is available in the Yakuake Flatpak.
  • Verified the bridge can run tput cols and clear with TERM=xterm-256color.

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