From aa48247f1a92cec5d85293a463bd01ff92ef325a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=8D=9A=E4=BB=81=28Buo-ren=2C=20Lin=29?= Date: Mon, 3 Sep 2018 16:45:08 +0800 Subject: [PATCH] Assert removable-media interface in the snap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows access to the files under `/media/*` and `/run/media/*`, as the connection is not automatic connect instructions is also added to the snap's description. Refer-to: Interfaces - doc - snapcraft.io Signed-off-by: ๆž—ๅšไป(Buo-ren, Lin) --- snap/snapcraft.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 5ed8a2760f..e89d5e2052 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -6,6 +6,11 @@ description: | languages "out of the box". It can be trained to recognize other languages. Tesseract supports various output formats: plain-text, hocr(html), pdf. + If you want to access the files under /media/* or /run/media/* you'll have + to connect the snap to the `core` snap's `removable-media` interface: + + $ sudo snap connect tesseract:removable-media + grade: stable # must be 'stable' to release into candidate/stable channels confinement: strict @@ -15,7 +20,9 @@ apps: env TESSDATA_PREFIX=$SNAP_USER_COMMON tesseract - plugs: [home] + plugs: + - home + - removable-media parts: tesseract: