On 2022-10-09 08:18, Cameron Simpson wrote: > On 08Oct2022 21:55, Jan Eden via Mutt-users <mutt-users@mutt.org> wrote: > > Thank you! This works well with Epiphany, but Firefox still fails (which > > I do not care about, as long as I have a working browser option). > > My recollection is that this is a timing issue. To run the viewer mutt goes: > - make a temp file containing the message or html > - run the mailcap command > - remove the temp file > > Your command is "open", which tells firefox (your default browser) to open > the file for viewing. That message takes little time. By the time firefox > gets around to opening the file (probably after making the new browser > window) the file has been removed by step 3 above. > > This is why helper scripts like Chris Green's one take a copy of the file. > They tell the browser to view the copy, which does not get removed.
Yes, I did use Chris Green's helper script, and it does work with Epiphany, but not with Firefox. The (slightly modified) script creates a file in /tmp/mutt_attach, which is then passed to the respective browser, and while Epiphany handles it properly, Firefox still displays "File not found" along with several error messages: >>update.go:85: cannot change mount namespace according to change mount >>(/var/lib/snapd/hostfs/usr/share/cups/doc-root /usr/share/cups/doc-root none >>bind,ro 0 0): cannot create directory "/usr/share/cups/doc-root": permission >>denied >>update.go:85: cannot change mount namespace according to change mount >>(/var/lib/snapd/hostfs/usr/share/gimp/2.0/help /usr/share/gimp/2.0/help none >>bind,ro 0 0): cannot create directory "/usr/share/gimp/2.0": permission denied >>update.go:85: cannot change mount namespace according to change mount >>(/var/lib/snapd/hostfs/usr/share/libreoffice/help /usr/share/libreoffice/help >>none bind,ro 0 0): cannot create directory "/usr/share/libreoffice/help": >>permission denied >>update.go:85: cannot change mount namespace according to change mount >>(/var/lib/snapd/hostfs/usr/share/xubuntu-docs /usr/share/xubuntu-docs none >>bind,ro 0 0): cannot open directory "/var/lib": permission denied >>/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) >>Gtk-Message: 09:22:48.907: Failed to load module "canberra-gtk-module" >>Gtk-Message: 09:22:48.921: Failed to load module "canberra-gtk-module" >>ATTENTION: default value of option mesa_glthread overridden by environment. >>ATTENTION: default value of option mesa_glthread overridden by environment. >>ATTENTION: default value of option mesa_glthread overridden by environment. >>Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs >>[2022-10-09T07:22:51Z ERROR glean_core::metrics::ping] Invalid reason code >>startup for ping background-update >>^CExiting due to channel error. >>Exiting due to channel error. >>Exiting due to channel error. >>Exiting due to channel error. >>Exiting due to channel error. >>Exiting due to channel error. >>Press any key to continue... >>/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) >>Gtk-Message: 09:24:29.485: Failed to load module "canberra-gtk-module" >>Gtk-Message: 09:24:29.487: Failed to load module "canberra-gtk-module" >>ATTENTION: default value of option mesa_glthread overridden by environment. >>ATTENTION: default value of option mesa_glthread overridden by environment. >>ATTENTION: default value of option mesa_glthread overridden by environment. >>Missing chrome or resource URL: resource://gre/modules/UpdateListener.sys.mjs >>[2022-10-09T07:24:31Z ERROR glean_core::metrics::ping] Invalid reason code >>startup for ping background-update Interesting enough, opening URLs from mutt with Firefox is possible. > My personal process, which is by no means seamless, is a macro bond to my > "V" key: > > macro index,pager V "<pipe-message>mail-open-attachments<enter>" "extract > attachments to temp dir and open" > macro attach V "qVv" "extract attachments to temp dir and open" > > and the associated script is here: > > https://github.com/cameron-simpson/css/blob/main/bin/mail-open-attachments > > Like Chris' script, it makes a copy. > > It unpacks everything in the message into a directory, then opens the Finder > on that directory. Then I can use preview on the HTML or open it in Firefox. > Etc etc for whatever other attachments there may have been. Nice, thank you! - Jan
signature.asc
Description: PGP signature