flathub / com.github.fabiocolacio.marker

https://flathub.org/apps/details/com.github.fabiocolacio.marker
0 stars 7 forks source link

File system access #10

Closed fabiocolacio closed 6 years ago

fabiocolacio commented 6 years ago

As of right now, this program cannot work with files in the cli using the flatpak version, because it does not have access to the file system.

Everything works opening files with the GUI because of GtkFileChooserNative, but are there any workarounds like this for accessing the filesystem from the cli @TingPing?

Printing also doesn't seem to work in the flatpak version (I'm not sure if it is from the same cause though). See this issue for more info.

nedrichards commented 6 years ago

This is probably more of a question for https://github.com/flatpak/xdg-desktop-portal and friends or https://github.com/flatpak/flatpak

TingPing commented 6 years ago

The syntax for cli access is just.. awful but it works:

flatpak run --file-forwarding foo.bar.baz @@ /some/file/path @@

fabiocolacio commented 6 years ago

Thanks, the --file-forwarding flag works great.

Unfortunately, the biggest issue for Marker now seems to internal be within WebkitGtk. When loading an HTML file, relatively linked documents won't load properly (images, etc.).

Would it be wise to add --filesystem=home until this issue is fixed with WebKitGtk? I don't really see any other viable solution at the moment...

RoyiAvital commented 6 years ago

@fabiocolacio , Is there a way to export to PDF with the FlatPak version?

fabiocolacio commented 6 years ago

@RoyiAvital exporting does not currently work for the flatpak version as discussed in #201

RoyiAvital commented 6 years ago

@fabiocolacio , It won't work even with --filesystem=home? What a bummer :-).

Hopefully it will be fixed soon.

fabiocolacio commented 6 years ago

@RoyiAvital I misunderstood your question. It should work if I add --filesystem=home, but it does not currently work, because I have not added --filesystem=home yet.

I was trying to see if there was a possible alternative, but It seems that adding it will be necessary, so I will do so for now.

RoyiAvital commented 6 years ago

@fabiocolacio , Do you mean there is an update soon which will update the .dekstop launcher to have --filesystem=home and then it will work out of the box?

fabiocolacio commented 6 years ago

@RoyiAvital it works now with the latest update.

RoyiAvital commented 6 years ago

Without any need for a special flag or anything? Works out of the box?

Could you tell me what have changed?

fabiocolacio commented 6 years ago

I added --filesystem=home to the flatpak manifest, which gives the application permission to access the home folder.

RoyiAvital commented 6 years ago

Installing now through Linux Mint 18.3 Software Manager.

It works!!!

2 Remarks:

  1. When exporting as PDF it doesn't add the PDF postfix automatically.
  2. Could we have an option to output PDF as one long page (Set the width like A4 or any other page, just make the length infinite, like watching HTML document)?

Thank You.