Closed PaulSchulz closed 4 years ago
I have a feeling that behavior is because it is running as a confined snap. Probably a security reason that snap disallows reading files from other snap's directories. I'll take a look and see what can be done. Thanks for taking the time to submit an issue!
I'm looking at this today and trying to figure out a way to fix this.
There are multiple issues here.
/tmp
/tmp
For the short term, if you have Go installed, you can do the following:
sudo snap remove mdview
go get github.com/mapitman/mdview
Restart your terminal before trying to use it. I'm still going to try to figure out how to make it work as a snap when your default browser is also a snap.
There will be a new snap release shortly, 1.4.0. I can't do anything about the prompt to allow writing the file. That is a security "feature" of snaps. But I was able to make it now work with a snapped browser, like Chromium.
Thank you for this software. mdview 1.3.0 from Mark Pitman (markpitman) installed
On Ubuntu 20.04, running 'mdview README.md', creates a temporary file in $HOME/snap/mdview/common For some reason: 1) A popup asks whether mdview should be allowed to create this file. This is a little annoying but OK. 2) chromium-browser refuses to open the generated html file.
I would prefer the temporary files went into /tmp (system temp, which is what the documentation appears to suggest), or allow this to be set when called. (eg. with a -t option)
The workaround at this stage is to use the same '-o' output option for all the md file I wish to format.