How to get access to USB-storage from the application installed as Snap?











up vote
3
down vote

favorite
1












I have Ubuntu 18.04 LTS installed.



I inserted USB-flash to my laptop. It was automounted to /media/username/DISKLABEL and opened in Nautilus. I can read and write objects to it.



How can I access it from the application, which is installed as Snap?



I tried snaps of the following applications such as gedit, arduino-mhall119, organize-my-files. All them show me errors if I navigate to /media folder:



trying to access /media



trying to access /media



Output of active Snap interfaces is below:



$ snap interfaces  | grep -v ".*-$"
Slot Plug
:browser-support organize-my-files
:core-support core:core-support-plug
:cups-control gedit
:desktop gedit,organize-my-files
:desktop-legacy gedit,organize-my-files
:gsettings gedit,organize-my-files
:home arduino-mhall119,gedit,organize-my-files
:network arduino-mhall119,gedit,organize-my-files,pulsemixer
:opengl organize-my-files
:pulseaudio organize-my-files,pulsemixer
:unity7 arduino-mhall119,gedit,organize-my-files
:wayland gedit
:x11 arduino-mhall119,organize-my-files,pulsemixer
gnome-3-26-1604:gnome-3-26-1604 gedit
gtk-common-themes:gtk3-themes gedit
gtk-common-themes:icon-themes gedit
gtk-common-themes:sound-themes gedit
- arduino-mhall119:serial-port
- gedit:avahi-observe
- gedit:mount-observe


Updates:




  • connecting mount-observe to Gedit with snap connect gedit:mount-observe does not help.

  • it seems that we need special Snap with support of removable-media interface.










share|improve this question




























    up vote
    3
    down vote

    favorite
    1












    I have Ubuntu 18.04 LTS installed.



    I inserted USB-flash to my laptop. It was automounted to /media/username/DISKLABEL and opened in Nautilus. I can read and write objects to it.



    How can I access it from the application, which is installed as Snap?



    I tried snaps of the following applications such as gedit, arduino-mhall119, organize-my-files. All them show me errors if I navigate to /media folder:



    trying to access /media



    trying to access /media



    Output of active Snap interfaces is below:



    $ snap interfaces  | grep -v ".*-$"
    Slot Plug
    :browser-support organize-my-files
    :core-support core:core-support-plug
    :cups-control gedit
    :desktop gedit,organize-my-files
    :desktop-legacy gedit,organize-my-files
    :gsettings gedit,organize-my-files
    :home arduino-mhall119,gedit,organize-my-files
    :network arduino-mhall119,gedit,organize-my-files,pulsemixer
    :opengl organize-my-files
    :pulseaudio organize-my-files,pulsemixer
    :unity7 arduino-mhall119,gedit,organize-my-files
    :wayland gedit
    :x11 arduino-mhall119,organize-my-files,pulsemixer
    gnome-3-26-1604:gnome-3-26-1604 gedit
    gtk-common-themes:gtk3-themes gedit
    gtk-common-themes:icon-themes gedit
    gtk-common-themes:sound-themes gedit
    - arduino-mhall119:serial-port
    - gedit:avahi-observe
    - gedit:mount-observe


    Updates:




    • connecting mount-observe to Gedit with snap connect gedit:mount-observe does not help.

    • it seems that we need special Snap with support of removable-media interface.










    share|improve this question


























      up vote
      3
      down vote

      favorite
      1









      up vote
      3
      down vote

      favorite
      1






      1





      I have Ubuntu 18.04 LTS installed.



      I inserted USB-flash to my laptop. It was automounted to /media/username/DISKLABEL and opened in Nautilus. I can read and write objects to it.



      How can I access it from the application, which is installed as Snap?



      I tried snaps of the following applications such as gedit, arduino-mhall119, organize-my-files. All them show me errors if I navigate to /media folder:



      trying to access /media



      trying to access /media



      Output of active Snap interfaces is below:



      $ snap interfaces  | grep -v ".*-$"
      Slot Plug
      :browser-support organize-my-files
      :core-support core:core-support-plug
      :cups-control gedit
      :desktop gedit,organize-my-files
      :desktop-legacy gedit,organize-my-files
      :gsettings gedit,organize-my-files
      :home arduino-mhall119,gedit,organize-my-files
      :network arduino-mhall119,gedit,organize-my-files,pulsemixer
      :opengl organize-my-files
      :pulseaudio organize-my-files,pulsemixer
      :unity7 arduino-mhall119,gedit,organize-my-files
      :wayland gedit
      :x11 arduino-mhall119,organize-my-files,pulsemixer
      gnome-3-26-1604:gnome-3-26-1604 gedit
      gtk-common-themes:gtk3-themes gedit
      gtk-common-themes:icon-themes gedit
      gtk-common-themes:sound-themes gedit
      - arduino-mhall119:serial-port
      - gedit:avahi-observe
      - gedit:mount-observe


      Updates:




      • connecting mount-observe to Gedit with snap connect gedit:mount-observe does not help.

      • it seems that we need special Snap with support of removable-media interface.










      share|improve this question















      I have Ubuntu 18.04 LTS installed.



      I inserted USB-flash to my laptop. It was automounted to /media/username/DISKLABEL and opened in Nautilus. I can read and write objects to it.



      How can I access it from the application, which is installed as Snap?



      I tried snaps of the following applications such as gedit, arduino-mhall119, organize-my-files. All them show me errors if I navigate to /media folder:



      trying to access /media



      trying to access /media



      Output of active Snap interfaces is below:



      $ snap interfaces  | grep -v ".*-$"
      Slot Plug
      :browser-support organize-my-files
      :core-support core:core-support-plug
      :cups-control gedit
      :desktop gedit,organize-my-files
      :desktop-legacy gedit,organize-my-files
      :gsettings gedit,organize-my-files
      :home arduino-mhall119,gedit,organize-my-files
      :network arduino-mhall119,gedit,organize-my-files,pulsemixer
      :opengl organize-my-files
      :pulseaudio organize-my-files,pulsemixer
      :unity7 arduino-mhall119,gedit,organize-my-files
      :wayland gedit
      :x11 arduino-mhall119,organize-my-files,pulsemixer
      gnome-3-26-1604:gnome-3-26-1604 gedit
      gtk-common-themes:gtk3-themes gedit
      gtk-common-themes:icon-themes gedit
      gtk-common-themes:sound-themes gedit
      - arduino-mhall119:serial-port
      - gedit:avahi-observe
      - gedit:mount-observe


      Updates:




      • connecting mount-observe to Gedit with snap connect gedit:mount-observe does not help.

      • it seems that we need special Snap with support of removable-media interface.







      permissions usb-drive 18.04 snap usb-storage






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 9 at 13:51

























      asked May 9 at 12:57









      N0rbert

      20k54393




      20k54393






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          So we need special prepared Snap with support of removable-media interface/plugin.



          Below is a list of Snap with removable-media plug described in YAML-manifest :




          • vlc - VLC

          • firefox - Firefox

          • gimp - GIMP

          • mdl - Markdown lint tool

          • offlineimap - OfflineIMAP

          • magic-wormhole - Magic Worm Hole

          • mattermost-desktop - Mattermost

          • storjshare-gui - Storj

          • opentoonz - OpenToonz

          • opentoonz-morevna - OpenToonz - Morevna Edition

          • obs-studio - OBS Studio

          • steamforwindows - Steam for Windows under Wine


          One can find other Snaps released by SnapCrafters with the following GitHub search link.





          So if the application does not have auto-connect of removable-media we need to connect it manually with:



          snap connect some-snap-name:removable-media


          But not all applications have this plug/interface in YAML-manifest.





          It hard to find packages by supported plugs - so I created issue "Add ability for parametric Snap search with filters (plugs, such as removable-media and so on)" about snapcraft.io site.



          The bug about snap command named "snap should provide functionality to find packages with needed plug or connector" was filed to launchpad as bug 1776938.






          share|improve this answer























          • The correct command is: snap connect some-snap-name:removable-media
            – Zygmunt Krynicki
            May 25 at 15:06












          • @ZygmuntKrynicki of course. Thank you, I fixed this silly typo.
            – N0rbert
            May 25 at 15:10










          • The bug which is cited in the last two paragraphs is truly annoying, but a simple workaround for it if the snap package is already installed is snap interfaces some-snap-name
            – karel
            Jun 15 at 12:55












          • @karel, right. Thank you! I have this command already in question. The main problem is to determine plugs of non-installed Snap.
            – N0rbert
            Jun 15 at 12:56




















          up vote
          2
          down vote













          The interface which needs to be connected is removable-media.



          Can access files from removable media in /media and /run/media. This can be used to give an app access to mounted USB sticks and external hard drives on a desktop.



          The mount-observe interface only lets you view what is mounted, not access mounts:



          Can query system mount information. This is restricted because it gives privileged read access to mount arguments and should only be used with trusted apps.



          Neither of these two interfaces will auto-connect. From https://github.com/snapcore/snapd/wiki/Interfaces#removable-media






          share|improve this answer





















          • I don't know. It seems obs-studio does, but I only found it due to it mentioning the interface in the description of the app for how to access external storage. I don't know how to query the store for specific interfaces in snaps. If a specific snap doesn't support the interface, it will presumably need to be rebuilt to support it.
            – dobey
            May 9 at 13:58











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1034030%2fhow-to-get-access-to-usb-storage-from-the-application-installed-as-snap%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          4
          down vote



          accepted










          So we need special prepared Snap with support of removable-media interface/plugin.



          Below is a list of Snap with removable-media plug described in YAML-manifest :




          • vlc - VLC

          • firefox - Firefox

          • gimp - GIMP

          • mdl - Markdown lint tool

          • offlineimap - OfflineIMAP

          • magic-wormhole - Magic Worm Hole

          • mattermost-desktop - Mattermost

          • storjshare-gui - Storj

          • opentoonz - OpenToonz

          • opentoonz-morevna - OpenToonz - Morevna Edition

          • obs-studio - OBS Studio

          • steamforwindows - Steam for Windows under Wine


          One can find other Snaps released by SnapCrafters with the following GitHub search link.





          So if the application does not have auto-connect of removable-media we need to connect it manually with:



          snap connect some-snap-name:removable-media


          But not all applications have this plug/interface in YAML-manifest.





          It hard to find packages by supported plugs - so I created issue "Add ability for parametric Snap search with filters (plugs, such as removable-media and so on)" about snapcraft.io site.



          The bug about snap command named "snap should provide functionality to find packages with needed plug or connector" was filed to launchpad as bug 1776938.






          share|improve this answer























          • The correct command is: snap connect some-snap-name:removable-media
            – Zygmunt Krynicki
            May 25 at 15:06












          • @ZygmuntKrynicki of course. Thank you, I fixed this silly typo.
            – N0rbert
            May 25 at 15:10










          • The bug which is cited in the last two paragraphs is truly annoying, but a simple workaround for it if the snap package is already installed is snap interfaces some-snap-name
            – karel
            Jun 15 at 12:55












          • @karel, right. Thank you! I have this command already in question. The main problem is to determine plugs of non-installed Snap.
            – N0rbert
            Jun 15 at 12:56

















          up vote
          4
          down vote



          accepted










          So we need special prepared Snap with support of removable-media interface/plugin.



          Below is a list of Snap with removable-media plug described in YAML-manifest :




          • vlc - VLC

          • firefox - Firefox

          • gimp - GIMP

          • mdl - Markdown lint tool

          • offlineimap - OfflineIMAP

          • magic-wormhole - Magic Worm Hole

          • mattermost-desktop - Mattermost

          • storjshare-gui - Storj

          • opentoonz - OpenToonz

          • opentoonz-morevna - OpenToonz - Morevna Edition

          • obs-studio - OBS Studio

          • steamforwindows - Steam for Windows under Wine


          One can find other Snaps released by SnapCrafters with the following GitHub search link.





          So if the application does not have auto-connect of removable-media we need to connect it manually with:



          snap connect some-snap-name:removable-media


          But not all applications have this plug/interface in YAML-manifest.





          It hard to find packages by supported plugs - so I created issue "Add ability for parametric Snap search with filters (plugs, such as removable-media and so on)" about snapcraft.io site.



          The bug about snap command named "snap should provide functionality to find packages with needed plug or connector" was filed to launchpad as bug 1776938.






          share|improve this answer























          • The correct command is: snap connect some-snap-name:removable-media
            – Zygmunt Krynicki
            May 25 at 15:06












          • @ZygmuntKrynicki of course. Thank you, I fixed this silly typo.
            – N0rbert
            May 25 at 15:10










          • The bug which is cited in the last two paragraphs is truly annoying, but a simple workaround for it if the snap package is already installed is snap interfaces some-snap-name
            – karel
            Jun 15 at 12:55












          • @karel, right. Thank you! I have this command already in question. The main problem is to determine plugs of non-installed Snap.
            – N0rbert
            Jun 15 at 12:56















          up vote
          4
          down vote



          accepted







          up vote
          4
          down vote



          accepted






          So we need special prepared Snap with support of removable-media interface/plugin.



          Below is a list of Snap with removable-media plug described in YAML-manifest :




          • vlc - VLC

          • firefox - Firefox

          • gimp - GIMP

          • mdl - Markdown lint tool

          • offlineimap - OfflineIMAP

          • magic-wormhole - Magic Worm Hole

          • mattermost-desktop - Mattermost

          • storjshare-gui - Storj

          • opentoonz - OpenToonz

          • opentoonz-morevna - OpenToonz - Morevna Edition

          • obs-studio - OBS Studio

          • steamforwindows - Steam for Windows under Wine


          One can find other Snaps released by SnapCrafters with the following GitHub search link.





          So if the application does not have auto-connect of removable-media we need to connect it manually with:



          snap connect some-snap-name:removable-media


          But not all applications have this plug/interface in YAML-manifest.





          It hard to find packages by supported plugs - so I created issue "Add ability for parametric Snap search with filters (plugs, such as removable-media and so on)" about snapcraft.io site.



          The bug about snap command named "snap should provide functionality to find packages with needed plug or connector" was filed to launchpad as bug 1776938.






          share|improve this answer














          So we need special prepared Snap with support of removable-media interface/plugin.



          Below is a list of Snap with removable-media plug described in YAML-manifest :




          • vlc - VLC

          • firefox - Firefox

          • gimp - GIMP

          • mdl - Markdown lint tool

          • offlineimap - OfflineIMAP

          • magic-wormhole - Magic Worm Hole

          • mattermost-desktop - Mattermost

          • storjshare-gui - Storj

          • opentoonz - OpenToonz

          • opentoonz-morevna - OpenToonz - Morevna Edition

          • obs-studio - OBS Studio

          • steamforwindows - Steam for Windows under Wine


          One can find other Snaps released by SnapCrafters with the following GitHub search link.





          So if the application does not have auto-connect of removable-media we need to connect it manually with:



          snap connect some-snap-name:removable-media


          But not all applications have this plug/interface in YAML-manifest.





          It hard to find packages by supported plugs - so I created issue "Add ability for parametric Snap search with filters (plugs, such as removable-media and so on)" about snapcraft.io site.



          The bug about snap command named "snap should provide functionality to find packages with needed plug or connector" was filed to launchpad as bug 1776938.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jun 15 at 12:53

























          answered May 9 at 14:08









          N0rbert

          20k54393




          20k54393












          • The correct command is: snap connect some-snap-name:removable-media
            – Zygmunt Krynicki
            May 25 at 15:06












          • @ZygmuntKrynicki of course. Thank you, I fixed this silly typo.
            – N0rbert
            May 25 at 15:10










          • The bug which is cited in the last two paragraphs is truly annoying, but a simple workaround for it if the snap package is already installed is snap interfaces some-snap-name
            – karel
            Jun 15 at 12:55












          • @karel, right. Thank you! I have this command already in question. The main problem is to determine plugs of non-installed Snap.
            – N0rbert
            Jun 15 at 12:56




















          • The correct command is: snap connect some-snap-name:removable-media
            – Zygmunt Krynicki
            May 25 at 15:06












          • @ZygmuntKrynicki of course. Thank you, I fixed this silly typo.
            – N0rbert
            May 25 at 15:10










          • The bug which is cited in the last two paragraphs is truly annoying, but a simple workaround for it if the snap package is already installed is snap interfaces some-snap-name
            – karel
            Jun 15 at 12:55












          • @karel, right. Thank you! I have this command already in question. The main problem is to determine plugs of non-installed Snap.
            – N0rbert
            Jun 15 at 12:56


















          The correct command is: snap connect some-snap-name:removable-media
          – Zygmunt Krynicki
          May 25 at 15:06






          The correct command is: snap connect some-snap-name:removable-media
          – Zygmunt Krynicki
          May 25 at 15:06














          @ZygmuntKrynicki of course. Thank you, I fixed this silly typo.
          – N0rbert
          May 25 at 15:10




          @ZygmuntKrynicki of course. Thank you, I fixed this silly typo.
          – N0rbert
          May 25 at 15:10












          The bug which is cited in the last two paragraphs is truly annoying, but a simple workaround for it if the snap package is already installed is snap interfaces some-snap-name
          – karel
          Jun 15 at 12:55






          The bug which is cited in the last two paragraphs is truly annoying, but a simple workaround for it if the snap package is already installed is snap interfaces some-snap-name
          – karel
          Jun 15 at 12:55














          @karel, right. Thank you! I have this command already in question. The main problem is to determine plugs of non-installed Snap.
          – N0rbert
          Jun 15 at 12:56






          @karel, right. Thank you! I have this command already in question. The main problem is to determine plugs of non-installed Snap.
          – N0rbert
          Jun 15 at 12:56














          up vote
          2
          down vote













          The interface which needs to be connected is removable-media.



          Can access files from removable media in /media and /run/media. This can be used to give an app access to mounted USB sticks and external hard drives on a desktop.



          The mount-observe interface only lets you view what is mounted, not access mounts:



          Can query system mount information. This is restricted because it gives privileged read access to mount arguments and should only be used with trusted apps.



          Neither of these two interfaces will auto-connect. From https://github.com/snapcore/snapd/wiki/Interfaces#removable-media






          share|improve this answer





















          • I don't know. It seems obs-studio does, but I only found it due to it mentioning the interface in the description of the app for how to access external storage. I don't know how to query the store for specific interfaces in snaps. If a specific snap doesn't support the interface, it will presumably need to be rebuilt to support it.
            – dobey
            May 9 at 13:58















          up vote
          2
          down vote













          The interface which needs to be connected is removable-media.



          Can access files from removable media in /media and /run/media. This can be used to give an app access to mounted USB sticks and external hard drives on a desktop.



          The mount-observe interface only lets you view what is mounted, not access mounts:



          Can query system mount information. This is restricted because it gives privileged read access to mount arguments and should only be used with trusted apps.



          Neither of these two interfaces will auto-connect. From https://github.com/snapcore/snapd/wiki/Interfaces#removable-media






          share|improve this answer





















          • I don't know. It seems obs-studio does, but I only found it due to it mentioning the interface in the description of the app for how to access external storage. I don't know how to query the store for specific interfaces in snaps. If a specific snap doesn't support the interface, it will presumably need to be rebuilt to support it.
            – dobey
            May 9 at 13:58













          up vote
          2
          down vote










          up vote
          2
          down vote









          The interface which needs to be connected is removable-media.



          Can access files from removable media in /media and /run/media. This can be used to give an app access to mounted USB sticks and external hard drives on a desktop.



          The mount-observe interface only lets you view what is mounted, not access mounts:



          Can query system mount information. This is restricted because it gives privileged read access to mount arguments and should only be used with trusted apps.



          Neither of these two interfaces will auto-connect. From https://github.com/snapcore/snapd/wiki/Interfaces#removable-media






          share|improve this answer












          The interface which needs to be connected is removable-media.



          Can access files from removable media in /media and /run/media. This can be used to give an app access to mounted USB sticks and external hard drives on a desktop.



          The mount-observe interface only lets you view what is mounted, not access mounts:



          Can query system mount information. This is restricted because it gives privileged read access to mount arguments and should only be used with trusted apps.



          Neither of these two interfaces will auto-connect. From https://github.com/snapcore/snapd/wiki/Interfaces#removable-media







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 9 at 13:51









          dobey

          32.4k33585




          32.4k33585












          • I don't know. It seems obs-studio does, but I only found it due to it mentioning the interface in the description of the app for how to access external storage. I don't know how to query the store for specific interfaces in snaps. If a specific snap doesn't support the interface, it will presumably need to be rebuilt to support it.
            – dobey
            May 9 at 13:58


















          • I don't know. It seems obs-studio does, but I only found it due to it mentioning the interface in the description of the app for how to access external storage. I don't know how to query the store for specific interfaces in snaps. If a specific snap doesn't support the interface, it will presumably need to be rebuilt to support it.
            – dobey
            May 9 at 13:58
















          I don't know. It seems obs-studio does, but I only found it due to it mentioning the interface in the description of the app for how to access external storage. I don't know how to query the store for specific interfaces in snaps. If a specific snap doesn't support the interface, it will presumably need to be rebuilt to support it.
          – dobey
          May 9 at 13:58




          I don't know. It seems obs-studio does, but I only found it due to it mentioning the interface in the description of the app for how to access external storage. I don't know how to query the store for specific interfaces in snaps. If a specific snap doesn't support the interface, it will presumably need to be rebuilt to support it.
          – dobey
          May 9 at 13:58


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1034030%2fhow-to-get-access-to-usb-storage-from-the-application-installed-as-snap%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

          Mangá

          Eduardo VII do Reino Unido