Repository navigation
Conversation
Use the desktop plug instead of the transitional unity7 plug. Both let xdg-open reach snapd's launcher service (checked in snapd's interface definitions), and desktop is the interface unity7 duplicates that access from. snapd points HOME at the snap's private data directory, which is why the snap forced HOME to /home/$USER. Read SNAP_REAL_HOME for ~/mdview-temp instead, and drop the override. It falls back to HOME outside that case. Move to base core24, which needs platforms in place of architectures. Closes #72
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishes the snap items in #72. Draft: the snap is not built or tested.
snapcraftis not available where I wrote this.Changes
plugs: [home, desktop]replaces[home, unity7]. In snapd's interface definitions, bothdesktopandunity7allow/usr/bin/xdg-openand theio.snapcraft.LauncherOpenURL/OpenFileD-Bus calls. Theunity7comment says this is duplicated fromdesktop.desktopis auto-connected. mdview opens the browser throughxdg-open(viapkg/browser).environment: HOME: /home/$USER. snapd remapsHOMEto the snap's private data directory, which is why the override existed.getTempDirnow readsSNAP_REAL_HOME(snapd 2.46+, falls back toHOME), so~/mdview-tempis still in the real home.base: core24, withplatforms:(amd64, arm64, armhf) in place ofarchitectures:.craftctlwas already in use.main_test.goandCLAUDE.md.Test before merging
just snapon a machine withsnapcraft(core24 build).sudo snap install --dangerous mdview_*.snapsnap connections mdviewshowsdesktopconnected.mdview README.mdopens the default browser, and the file is in~/mdview-temp./tmp.If step 4 fails with a denial, check
journalctl -xe | grep DENIED. Addingnetworkandnetwork-bindis the first thing to try; a forum report from 2018 saw anxdg-openfailure withdesktopthat those plugs fixed.Closes #72