Xfce mutt, mailcap, and Firefox

I tried configuring FreeBSD on a desktop system (with Xfce) for the first time, and encountered the following problem. My mailcap for mutt has points to Firefox for HTML attachments:

Code:
text/html; firefox %s; needsterminal;

When opening a HTML attachment from within mutt, it is displayed in Firefox, but then messages like the following are printed to the terminal:

Code:
console.warn: BackupService: "There was an error while trying to get the Document's directory" [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIProperties.get]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource:///modules/backup/BackupService.sys.mjs :: get docsDirFolderPath :: line 1245"  data: no]
JavaScript error: resource:///modules/backup/BackupService.sys.mjs, line 3812: NotAllowedError: PathUtils.join: PathUtils does not support empty paths

The HTML attachment is stored in /tmp. I also created a little wrapper script:

Code:
#!/bin/sh
cp "$1" /tmp/mutt-html-$$.html
firefox /tmp/mutt-html-$$.html &>/dev/null &

and refer to it in mailcap, but the result was identical. What could be the problem here?
 
The errors are printed to stderr and console warnings are printed to stdout.
I'm not sure what you intended that cmd to do, but I think you have a mistake in it.
&>/dev/null is not a construct. That is parsed as & >/dev/null which is just a duplicate & and redirecting stdout.
I think you want firefox /tmp/mutt-html-$$.html >/dev/null 2>&1 & to redirect stdout, set stdout to stderr, and background.
 
With elm+ME, which invokes metamail(1) to deal with mailcap(4) for non-text displays, I use:
Code:
text/html;firefox %s >/dev/null 2>&1; nametemplate=%s.html
and when the iridium package is actually available (which is not very often):
Code:
text/html;iridium %s; test=test -n "$DISPLAY"; nametemplate=%s.html
(also works for chrome with s/iridium/chrome/).
 
The errors are printed to stderr and console warnings are printed to stdout.
I'm not sure what you intended that cmd to do, but I think you have a mistake in it.
&>/dev/null is not a construct. That is parsed as & >/dev/null which is just a duplicate & and redirecting stdout.
I think you want firefox /tmp/mutt-html-$$.html >/dev/null 2>&1 & to redirect stdout, set stdout to stderr, and background.
Yes, sorry, my script did not make any sense.
 
Back
Top