From be7e46b3fe4dafd440bff04c7c27291c0d493b72 Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Thu, 1 Feb 2018 09:47:15 -0800 Subject: [PATCH] :memo: A word on strict --- docs/tutorial/snapcraft-guide.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/tutorial/snapcraft-guide.md b/docs/tutorial/snapcraft-guide.md index b9803237707b..31bcb43a32a5 100644 --- a/docs/tutorial/snapcraft-guide.md +++ b/docs/tutorial/snapcraft-guide.md @@ -161,6 +161,18 @@ to the app's binary: exec "$@" --executed-from="$(pwd)" --pid=$$ > /dev/null 2>&1 & ``` +Alternatively, if you're building your `snap` with `strict` confinement, you +can use the `desktop-launch` command: + +```yaml +apps: + myApp: + # Correct the TMPDIR path for Chromium Framework/Electron to ensure + # libappindicator has readable resources. + command: env TMPDIR=$XDG_RUNTIME_DIR PATH=/usr/local/bin:${PATH} ${SNAP}/bin/desktop-launch $SNAP/myApp/desktop + desktop: usr/share/applications/desktop.desktop +``` + [snapcraft.io]: https://snapcraft.io/ [snapcraft-store]: https://snapcraft.io/store/ [snapcraft-syntax]: https://docs.snapcraft.io/build-snaps/syntax