Skip to content

Terminal and Atom cannot be opened when strict confinement is enabled #95

Closed

Description

@zypA13510

Description

  1. "Open in terminal" does not detect git installation, and gives an error when selecting "open without git"
    image
    image

  2. "Open in Atom" becomes "open in external editor" and gives an error when clicked:
    image

  3. This is also evident in File -> Options -> Advanced:
    image

Version

  • GitHub Desktop: 1.5.0-linux5 (from snapcraft edge channel)
  • Operating system: Ubuntu 18.04.1 LTS

Steps to Reproduce

  1. Install from command line: snap install --edge github-desktop
  2. Fix AppArmor policy error accessing password manager #59 : sudo snap connect github-desktop:password-manager-service
  3. Launch Github Desktop from GNOME
  4. Try "open in terminal" and "open in external editor"

Expected Behavior

Open git project folder in terminal / Open git project folder in Atom

Actual Behavior

See description above.

Activity

  1. zypA13510 commented on Nov 21, 2018

    @zypA13510
    Author

    Using 1.5.0-linux3 snap package installed with --classic --dangerous switch does not have this issue.

  2. shiftkey commented on Nov 21, 2018

    @shiftkey
    Owner

    @zypA13510 this suggests to me that there's some permission missing that we need to request - does anything from this list stand out to you about launching processes?

  3. shiftkey commented on Nov 22, 2018

    @shiftkey
    Owner

    "Open in terminal" does not detect git installation, and gives an error when selecting "open without git"

    This check is running which git to see if git is available on your PATH. What's interesting about this is I was able to run which which to find itself, but git would error:

    I see that process.env.PATH (that should be inherited when you run which) does contain /usr/bin, which is where it should be:

    And when you try to continue on we try to use the default shell, which uses the same technique, we can't find any, which is this message appears:

    And lastly, we do the same checks for the editor integration on Linux, so if we fix that we'll be able to support this completely. I'm just puzzled whether some sort of isolation is to blame here for hiding the details from the app.

  4. added
    installers/snap
    on Nov 22, 2018
  5. changed the title [-]Terminal and Atom cannot be opened from Snap package (strict confinement)[/-] [+]Terminal and Atom cannot be opened when strict confinement is enabled[/+] on Nov 22, 2018
  6. zypA13510 commented on Nov 24, 2018

    @zypA13510
    Author

    FYI, I have built a version with all known interfaces enabled (except content and dbus, both of which requires another snap to provide a slot), and connected them to slots the snap core provides. This issue still exists, so does #98.

    After a bit of Googling, I've also come across a question that could be related to this issue: /usr/bin/fold got permission denied but /usr/bin/fmt is working fine? The consensus seems to be that we shouldn't rely on /usr/bin but ship it with the snap if the app requires the binary.

    I also wondered why Atom snap doesn't have such issue. Turns out that it isn't using strict confinement: snapcrafters/atom/master/snap/snapcraft.yaml#L10. Maybe we need to solve this by switching desktop back to classic confinement?

    Btw, I'm no expert on snap, so I may be wrong.

  7. zypA13510 commented on Dec 5, 2018

    @zypA13510
    Author

    VSCode is also using classic confinement: Microsoft/vscode/master/resources/linux/snap/snapcraft.yaml#L10

    @shiftkey may I open a PR to switch it back to classic confinement?

  8. shiftkey commented on Apr 7, 2019

    @shiftkey
    Owner

    With the help of the Snapcraft team, I've now been able to publicize the app again on the Snapcraft store now the enclosures are migrated. It is recommended to install the beta channel currently if you are working from a fresh install.

    For existing installs the edge channel will remain using the strict enclosure for the moment, and refreshing to the latest version there will ask you to install the beta channel, which is using the classic enclosure and requires a manual upgrade:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buginstallers/snapunclear

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions