Skip to content

terminal-helper: honor $TERMINAL and harden terminal launching - #97

Open
VictorBravo9er wants to merge 1 commit into
CachyOS:developfrom
VictorBravo9er:fix/terminal-helper-konsole-handling
Open

VictorBravo9er wants to merge 1 commit into
CachyOS:developfrom
VictorBravo9er:fix/terminal-helper-konsole-handling

Conversation

@VictorBravo9er

Copy link
Copy Markdown

Summary

This PR ports the terminal-helper hardening improvements recently investigated and implemented in CachyOS/CachyOS-Welcome#289 to cachyos-kernel-manager.

Key Improvements:

  • Honor $TERMINAL: Checked first when set to a supported emulator in the terminal map, respecting user configuration before falling back to the default order.
  • Konsole support: Added --nofork to Konsole. Without a TTY and without --nofork, Konsole detaches to an existing daemon session, causing the caller to exit immediately.
  • Process handshake / script lifetime: Introduced a started / finished handshake in a temporary directory instead of prematurely deleting the command file immediately upon launcher return. This eliminates the race condition where pkexec / bash fails with No such file or directory.
  • Additional terminal fixes:
    • kitty: Added --wait-for-single-instance-window-close to prevent client process detachment.
    • lxterminal: Added --no-remote.
    • kgx: Fixed process signalling to avoid targeting arbitrary ancestor processes (such as the user systemd manager).
    • Normalizes exit codes to avoid treating child command statuses as launcher failures.

Fixes #87
Fixes #96

- Honor $TERMINAL when set to a supported emulator.
- Add --nofork to konsole to prevent detached launcher exit on KDE Plasma.
- Add --wait-for-single-instance-window-close for kitty and --no-remote for lxterminal.
- Synchronize execution with started/finished handshake in temp directory, eliminating premature script deletion.
- Fix kgx parent process signalling.

Fixes CachyOS#87, fixes CachyOS#96
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant