Le Sun, Feb 19, 2023 at 07:18:35PM +0100, Joel Carnat a écrit :
> Hi,
> 
> Recently, I drag and dropped an HTML file from my localized ~/Downloads
> directory to Firefox ; to render this local file. And it wouldn't open even
> though that directory was listed in /etc/firefox/unveil.main. I can save
> files to it when I download stuff but the directory can not be listed and
> files can't be loaded by Firefox.

I'm perfectly aware of the issue, and wouldnt really know where to
document the workarounds, but i'm pretty sure this isnt supposed to work
in localized environments, even if the XDG stuff is properly setupped
there's
https://github.com/openbsd/ports/blob/master/www/mozilla-firefox/patches/patch-toolkit_components_downloads_DownloadIntegration_sys_mjs
to make sure we end up in ~/Downloads. Cf
https://bugzilla.mozilla.org/show_bug.cgi?id=1696958 for the rationale
at the time..

so even if you have a localized environment, that patch should make sure
that your downloads end up in ~/Downloads (if it exists, which is
another problem with pledge). Granted, maybe that's not what user wants,
and i'm fine dropping that patch as long as users having opted-in for
localization are aware one way or the other that they **have** to modify
the unveil config. Maybe MESSAGE is the way..

> After a bit of try & fail, I identified that this particular directory also
> has to be referenced in /etc/firefox/unveil.content. Since then, I can open
> the files from this directory. This also solves the error when you use
> "file://home/<username>/Downloads" in the URL bar.
> 
> As this is not straight forward and limited to the cases when you want a
> localized environment, what about adding a note to www/firefox-i18n MESSAGE
> file?
> 
> Attached is a MESSAGE patch proposal.

Not a bad idea, but sadly in my experience users often ignore MESSAGEs :)

Landry

Reply via email to