drawio-desktop icon indicating copy to clipboard operation
drawio-desktop copied to clipboard

drawio snap cannot access removable media

Open karimmd opened this issue 5 years ago • 12 comments

I have tried to plugin the removable media through snap connect option but it was not working.

karimmd avatar Aug 09 '20 19:08 karimmd

Hi,

What exact steps did you perform? What desktop app version are you using (can be seen under Help)?

Regards,

mararad avatar Aug 10 '20 11:08 mararad

The permission to removable-media is not present in draw.io which would not allow users if they want to modify or store files in other than /home/user directory.

For example, please look at the snap permission of vlc

image

Compare to drawio, its missing, therefore, we can not access any files from USB pendrive or harddrive because drawio snap app does not have access to /media

image

You can have a look on the official snapcraft page

https://snapcraft.io/docs/removable-media-interface

https://askubuntu.com/questions/1034030/how-to-get-access-to-usb-storage-from-the-application-installed-as-snap

karimmd avatar Aug 12 '20 22:08 karimmd

@karimmd Should we do anything from our side to fix this, or there will be a release to add the permissions?.

KhaledOmara avatar Sep 28 '20 09:09 KhaledOmara

@karimmd Should we do anything from our side to fix this, or there will be a release to add the permissions?.

I have switched to deb package of draw.io

karimmd avatar Sep 29 '20 17:09 karimmd

I've installed drawio with the --devmode option and I now have access to removable-media

sudo snap install drawio --devmode

pboissonneault avatar Nov 06 '20 13:11 pboissonneault

I've installed drawio with the --devmode option and I now have access to removable-media

sudo snap install drawio --devmode

Let me try that. Thanks for your feedback.

karimmd avatar Nov 19 '20 11:11 karimmd

Another workaround is to create a symlink in your home directory to the data you need to access.

pboissonneault avatar Nov 19 '20 15:11 pboissonneault

Another workaround is to create a symlink in your home directory to the data you need to access.

Did you try this? I ask because I have the same issue. ~/Downloads -> /media/LinExt/Downloads/ symlinked on my laptop. And it is impossible to start draw.io, even for the first time.

I've installed drawio with the --devmode option and I now have access to removable-media

It sounds too straight design. devmode turn off any Snap restriction. Allow access to removable media != allow full access.

Looks like Removable-media interface could be added by developers, as mentioned there https://snapcraft.io/docs/snapcraft-interfaces

ASLanin avatar Dec 07 '20 15:12 ASLanin

is there any update on this?

daandres avatar May 19 '21 07:05 daandres

Using Snap Try I've changed the snap.yaml to add removable-media and it works as expected. But doing this every time there is a new release is cumbersome.

After digging around, I've found, probably, it is only need to add

"snap": {
  "plugs": [
    "default",
    "removable-media"
  ]
}

to electron-builder-snap.json in order to electron build the snap with removable-media interface enabled, as other projects already do it.

I hope this information helps fast forward the fix of this issue.

flippipe avatar Dec 22 '21 22:12 flippipe

I've installed drawio with the --devmode option and I now have access to removable-media

sudo snap install drawio --devmode

It worked for me! Thank you

chrispito avatar May 06 '22 03:05 chrispito

Running snap connect drawio:removable-media solved the problem for me.

MaurizioCasciano avatar Jun 13 '22 08:06 MaurizioCasciano

We've added the suggested build config. I don't see any other suggestions in the thread, so I will close with the workaround being to run snap connect drawio:removable-media if you can't get it working another way.

davidjgraph avatar Sep 29 '23 16:09 davidjgraph