Xdg-open a file within the snap

I apologize if this has been answered elsewhere, but is there a way a snap should call xdg-open to open a file within the snap? I can get xdg-open to open the path from the perspective of the snap (i.e. /snap/autopsy/x1/autopsy/docs/index.html). I think that should work fine on systems where the snap fs resides at the same path like ubuntu, but I think the path resides at a different path on other systems like fedora (i.e. /var/lib/snapd/snap/autopsy...).

have you tried using the SNAP environment variable?

Hi @sergiusens , sorry for the delay in response and thank you once again. When I initially installed snapd on fedora, I didn’t create this symlink from the instructions: sudo ln -s /var/lib/snapd/snap /snap because I wasn’t worried about classic snaps. It didn’t occur to me until I reread the instructions that I would need that in this instance. I will make a note. Thanks!

1 Like