Skip to content

Fix desktop entry, --version flag, and install UX#174

Closed
satoru8 wants to merge 1 commit into
Lexonight1:mainfrom
satoru8:install-fixes
Closed

Fix desktop entry, --version flag, and install UX#174
satoru8 wants to merge 1 commit into
Lexonight1:mainfrom
satoru8:install-fixes

Conversation

@satoru8

@satoru8 satoru8 commented Jun 4, 2026

Copy link
Copy Markdown
  • Fix .desktop filename (trcc.desktop → trcc-linux.desktop)
  • Add _install_desktop_entry() in LinuxPlatform for pip installs
  • Fix trcc system setup dry-run: remove --yes so udev rules apply
  • Fix stale udev warning in RunSetup by re-checking after setup
  • Add --version / -v flag to CLI
  • Add update path: skip redundant setup on re-run, always refresh pip + .desktop
  • Add RPM/DEB/Arch package conflict detection and removal
  • Fix root PYTHONPATH for editable installs
  • Fix false PATH warning: check real user's PATH via login shell
  • Restructure install.sh success output with DE-specific refresh commands
  • Added pip --quiet to install/update

- Fix .desktop filename (trcc.desktop → trcc-linux.desktop)
- Add _install_desktop_entry() in LinuxPlatform for pip installs
- Fix trcc system setup dry-run: remove --yes so udev rules apply
- Fix stale udev warning in RunSetup by re-checking after setup
- Add --version / -v flag to CLI
- Add update path: skip redundant setup on re-run, always refresh pip + .desktop
- Add RPM/DEB/Arch package conflict detection and removal
- Fix root PYTHONPATH for editable installs
- Fix false PATH warning: check real user's PATH via login shell
- Restructure install.sh success output with DE-specific refresh commands
- Added pip --quiet to install/update
Lexonight1 added a commit that referenced this pull request Jun 16, 2026
…over)

install.sh ran `trcc setup --yes`, but the cutover renamed that command to
`trcc system setup` — so every source install hard-failed the setup step with
"No such command 'setup'" and shipped WITHOUT udev rules / modprobe quirks.
Likely behind a run of "device not detected / permission denied" reports.

Renaming alone isn't enough: `trcc system setup` run as the real user re-execs
its privileged udev step as root via `python -c`, and that root process can't
import the user-local ~/.local trcc (ModuleNotFoundError → no rules). So run
setup AS ROOT (install.sh already is) with the user's site-packages on
PYTHONPATH, which skips the failing re-exec and lets root import trcc.

Verified before/after in a throwaway Fedora container: main → no udev rule;
this fix → /etc/udev/rules.d/99-trcc-lcd.rules + /etc/modprobe.d/trcc-lcd.conf
written, install completes clean. (Diagnosis surfaced by #174 — thanks @satoru8.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Lexonight1

Copy link
Copy Markdown
Owner

Thank you for this — and especially for catching the install bug. You were right that the installer was broken: it called trcc setup --yes, but the cutover renamed that to trcc system setup, so the setup step was hard-failing and udev rules were never written on source installs. That's almost certainly behind a number of "device not detected / permission denied" reports — a genuinely important find.

I verified it before/after in a clean container and landed the core fix directly (0ba5ac91): run trcc system setup as root with the user's site-packages on PYTHONPATH, so the privileged udev step can import trcc — that's the piece that actually makes the rules get written (a plain rename still failed on the root re-exec). Your diagnosis pointed straight at it.

I didn't merge the PR wholesale — a couple of the other parts need adjusting against current main: the --version flag aliases -v, which is already the CLI's --verbose flag, and the .desktop is better installed from the packaged asset (via importlib.resources) than a repo-root copy. But the install fix was the important one and it's in now. If you'd like to PR the --version flag on its own (as --version only, no -v) or the package-conflict detection, I'd gladly take those.

Closing since the critical fix is landed — thank you again, this genuinely helped. 🙏


If this project helps you, consider buying me a beer 🍺 or Ko-fi

@Lexonight1 Lexonight1 closed this Jun 16, 2026
@satoru8

satoru8 commented Jun 16, 2026

Copy link
Copy Markdown
Author

Happy to help. I figured by the time this merged with recent commits and other PRs it wouldn't get taken fully. Mainly was pointing out the key issues and a couple possible improvements. Glad to see this in main now! When I have some free time Ill see about the other parts.

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.

2 participants