CachyOS / CachyOS/CachyOS-Welcome

cachyos-hello Gaming package installer fails because temporary script is deleted before execution

Open Beginner friendly
#287 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Fluent
Stars
48
Forks
87
PR merge metrics
No merged PRs in 30d

Description

## Description

When using CachyOS Hello's **"Install Gaming Packages"** option, the installation fails immediately with:

```
bash: /tmp/tmp.xxxxx: No such file or directory
```

The issue appears to be caused by `cachyos-hello` deleting the temporary script before `pkexec` executes it.

## Steps to reproduce

1. Open CachyOS Hello
2. Go to the Gaming section
3. Click "Install Gaming Packages"
4. Wait for the terminal window to open

## Expected behavior

The terminal should execute the generated temporary script and start installing the gaming packages, for example:

```
pacman -S cachyos-gaming-meta ...
```

## Actual behavior

The terminal immediately fails:

```
bash: /tmp/tmp.xxxxx: No such file or directory
```

## Additional investigation

I traced the execution with `strace` and found the following:

```
execve("/usr/bin/kgx",
["kgx", "--wait", "-e",
"pkexec",
"/usr/share/cachyos-hello/scripts/rootshell.sh",
"/tmp/tmp.0nsMoYjcEa"], ...)
```

Immediately afterwards:

```
execve("/usr/bin/rm",
["rm", "/tmp/tmp.0nsMoYjcEa"], ...)
```

The temporary script is removed right after launching `kgx`, before `pkexec`/`bash` has a chance to execute it.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the CachyOS Hello "Install Gaming Packages" entry point and inspect /usr/share/cachyos-hello/scripts/rootshell.sh, then reproduce the failure while tracing the kgx and pkexec launch. Ensure the temporary script remains available until the terminal has had a chance to execute it, and verify that the gaming package installation starts instead of reporting a missing /tmp file.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, linux
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.