Skip to content

terminal-helper: fails with Konsole on KDE Plasma and ignores $TERMINAL #96

Open

Description

@VictorBravo9er

Problem Description

When alacritty is uninstalled on KDE Plasma installations of CachyOS, running kernel actions (installing, updating, or removing kernels) from cachyos-kernel-manager fails.

Root Cause

  1. Konsole delegation and premature script deletion:
    In src/terminal-helper, Konsole is defined as:

    ["konsole"]="konsole -e $cmd"

    In KDE Plasma, Konsole defaults to delegating to an existing process or backgrounding unless invoked with --nofork (or --separate). Without a TTY and without --nofork, the launcher returns immediately to terminal-helper, which promptly executes rm "$file". By the time Konsole and pkexec actually attempt to execute the temporary script, the file no longer exists (bash: /tmp/tmp.XXXXXX: No such file or directory).

  2. $TERMINAL is ignored:
    Even though the invariants comment specifies that $TERMINAL should come first, terminal="" is hardcoded, preventing users from overriding their preferred terminal via environment variables.

Prior Art & Solution

This was recently investigated, confirmed, and addressed upstream in CachyOS/CachyOS-Welcome#289, where konsole --nofork -e $cmd was added alongside $TERMINAL detection and robust process synchronization.

I will open a PR applying these fixes to src/terminal-helper.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions