Skip to content

fix(snap): use snap-owned XDG directories#1972

Merged
pimlock merged 3 commits into
mainfrom
codex/fix-snap-xdg-dirs
Jun 25, 2026
Merged

fix(snap): use snap-owned XDG directories#1972
pimlock merged 3 commits into
mainfrom
codex/fix-snap-xdg-dirs

Conversation

@pimlock

@pimlock pimlock commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fix the Ubuntu Snap release canary failure where the snapped openshell CLI tried to write gateway metadata under the host ~/.config/openshell and hit snap confinement. The snap now points user-facing OpenShell commands at persistent snap-owned XDG directories under $SNAP_USER_COMMON.

This follows the Snap data-location pattern for app-owned per-user data: snapd exposes $SNAP_USER_COMMON as user data shared across revisions, and snapcraft.yaml supports app-level runtime environment variables for directing commands to those locations. See:

Related Issue

No existing issue found. Investigated failing Release Canary run: https://github.com/NVIDIA/OpenShell/actions/runs/27986564035

Changes

  • Set XDG_CONFIG_HOME, XDG_DATA_HOME, and XDG_STATE_HOME for the openshell and term snap apps.
  • Update Snap installation docs to remove stale --classic examples and document the snap-owned CLI storage location.

Testing

  • uv run --frozen pytest python/openshell/release_formula_test.py -q
  • mise run pre-commit passes
  • mise exec -- markdownlint-cli2 docs/about/installation.mdx --no-globs
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (not applicable)

Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
@pimlock

pimlock commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator Author

@zyga @drew This canary has been failing for a while now with the same error: https://github.com/NVIDIA/OpenShell/actions/workflows/release-canary.yml

I'm not sure if fixing this was waiting on something, but couldn't find anything in flight, so got the most straightforward fix in here. Happy to close if there is anything else coming.

Comment thread python/openshell/release_formula_test.py Outdated
@pimlock pimlock requested a review from elezar June 23, 2026 15:09
elezar
elezar previously approved these changes Jun 23, 2026
@krishicks

Copy link
Copy Markdown
Collaborator

In #1995 I had some docs updates that might be worth incorporating into this change; let me know!

@zyga zyga left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good. We may want to look at the gateway as well, but it doesn't have to be done here as it would affect migration.

Signed-off-by: Piotr Mlocek <pmlocek@nvidia.com>
@github-actions

Copy link
Copy Markdown

@pimlock pimlock merged commit e4d7d41 into main Jun 25, 2026
32 checks passed
@pimlock pimlock deleted the codex/fix-snap-xdg-dirs branch June 25, 2026 18:46
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.

4 participants