Skip to content

feat: Add support for steamos without needing to break readonly mode - #46

Merged
hikaps merged 3 commits into
hikaps:developfrom
waterfoul:steamos
Jul 30, 2026
Merged

feat: Add support for steamos without needing to break readonly mode#46
hikaps merged 3 commits into
hikaps:developfrom
waterfoul:steamos

Conversation

@waterfoul

Copy link
Copy Markdown

#37

@hikaps

hikaps commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Really clean sysext setup — One thing before it lands: the sysext also stages the couchplay GUI binary + the .desktop/icon/metainfo, but package-helper.sh only bundles libs for the helper, not the GUI. Since the GUI goes through the Flatpak, mind making the sysext helper-only (drop the cp build/bin/couchplay line + the desktop/icon/metainfo copies)

@waterfoul

Copy link
Copy Markdown
Author

I'm hoping we can use the non flatpak binary long term. It makes the playstation and steam controller support work much better since the ui (where that logic lives) can access the raw devices without flatpak getting in the way. If we use the local binary then we would want it included in this package since it's the best way to add it to the correct places

@waterfoul

Copy link
Copy Markdown
Author

I might poke about trying to get all of that logic into the service, would fix that concern

@waterfoul

Copy link
Copy Markdown
Author

Let's put a pin in this mr for now, I'll do some tinkering

@hikaps

hikaps commented Jul 10, 2026

Copy link
Copy Markdown
Owner

The reason I was planning to keep the GUI Flatpak-only: shipping one native binary that matches every distro's Qt6/KF6 runtime is the real headache (the copy-relocation failures on Arch/SteamOS, etc.). The Flatpak bundles its own Qt/KDE runtime so it runs identically everywhere, and the plan is to route all privileged or Flatpak-gated operations — device access, user/process management, anything needing root or raw hardware — through the root helper service. The GUI stays thin, unprivileged, and sandboxed.

@waterfoul

Copy link
Copy Markdown
Author

Makes sense, I'll do some more poking around on this, Possibly get it to install the flatpak automatically

@waterfoul

Copy link
Copy Markdown
Author

Updated to remove the gui pieces from the images and install the flatpak

@hikaps hikaps left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sysext layout is correct: usr/... tree, extension-release.couchplay.steamos with ID=_any (filename matches the couchplay.steamos extension name), mksquashfs -noappend -all-root. The couchplay.flatpak asset is supplied to both beta and tag releases by flatpak.yml, so install_sysext's three-asset lookup is satisfied. OS detection + --sysext/--tarball overrides + REAL_USER=${SUDO_USER:-deck} look right. Requesting changes for the two inline items.

Cross-PR (with #53): both PRs add a SteamOS update script — update-nonroot.sh (here) vs update-sysext.sh (#53) — divergent. Let's keep one (leaning #53's update-sysext.sh for the faster loop, Flatpak-source rebuild folded in as a flag). install.sh merges cleanly. Happy to land this first, then #53 rebases + we dedup.

Comment thread scripts/install.sh Outdated

# Configure controller hidraw udev rules
print_info "Configuring udev rules..."
echo 'KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ce6", MODE="0666", TAG+="uaccess", TAG+="seat"' | tee /etc/udev/rules.d/99-couchplay-hidraw.rules

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

World-readable hidraw rule — MODE="0666" for idVendor=054c idProduct=0ce6 makes raw controller HID readable by any local process (real input-sniffing surface on multi-user/multi-seat), persists across reboots, and is unnecessary: the helper reads hidraw as root and bypasses DAC. Also misses the Steam Controller VID (28de) that #53's exit-chord reads. Drop the 0666 (or use a restrictive group ACL via the polkit-gated ownership flow).

Comment thread scripts/update-nonroot.sh Outdated
local manifest_copy="${TEMP_DIR}/io.github.hikaps.couchplay.json"
cp io.github.hikaps.couchplay.json "$manifest_copy"
# Replace the git source block with a local directory source block
sed -i 's|"type": "git"|"type": "dir"|' "$manifest_copy"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The git→dir Flatpak manifest rewrite is four literal sed substitutions on JSON. Any change to the source-block formatting (key order, spacing, extra keys — including this PR's own manifest edit) yields invalid JSON or a duplicate path key, failing flatpak-builder opaquely. Editing the manifest as JSON (jq/python) or shipping a dedicated local-build fragment would be more robust.

…ewrite

- install.sh: remove MODE="0666" from the DualSense udev rule (helper reads
  hidraw as root; world-readable is unnecessary). uaccess/seat tags retained.
- update-nonroot.sh: replace the 4 sed substitutions (which converted ALL git
  sources incl. polkit/polkit-qt to type:dir) with a jq rewrite that targets
  only the couchplay source by URL. Add jq to the dependency check.
@hikaps
hikaps merged commit 8ccf338 into hikaps:develop Jul 30, 2026
1 check passed
hikaps added a commit that referenced this pull request Jul 30, 2026
…path)

flatpak-builder rejects bare --filesystem=xdg-run (requires xdg-run/<name>),
failing the build at finish-args validation since #46. The GUI's runtime-dir
needs are its own sandbox XDG_RUNTIME_DIR (auto-accessible) and the sysext
auto-install uses --talk-name=org.freedesktop.Flatpak (D-Bus), so the entry
was both invalid and unnecessary.
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