** Xu Wang <xuwang...@gmail.com> [2016-06-22 10:07]: > Hello, > > I would like to be able to do > 'v' and then 'm' to open an HTML email in my browser. I can succeed in > this regard by having the following entry in ~/.mailcap: > text/html; chromium-browser %s; description=HTML Text; > > However, mutt will be unresponsive until I exit the browser. This is > not my work style. So I added & to detach. This is good in the sense > that mutt now does not wait for the browser. However, by the time my > browser opens, mutt has already deleted the .html temporary file > because after adding & the command returned immediately? > > Has any one come across this situation and has a similar desire? > > Is there a setting I can choose to ask mutt to not delete the > temporary files? They are stored in /tmp and space is cheap so I would > like to ask mutt to not worry about them. > > Kind regards, > > Xu ** end quote [Xu Wang]
There are several solutions to this of varying levels of complexity, but I use a simple one liner to fix this. I always ensure that the browser is running first, but even when it is the deletion of the temporary file isn't uncommon so I make the following change to /etc/mailcap # ----- User Section Begins ----- # text/html; /usr/bin/sensible-browser %s; description=HTML Text; nametemplate=%s.html; needsterminal # ----- User Section Ends ----- # You don't need to add the comments above and below, but I've included them to emphasis that this goes in the user section at the top so that it is not deleted automatically. All this does is make Mutt wait until a key is pressed to return to normal operations and thereby delays the file deletion. Since you always have to do that anyway on returning it is just a double press instead of a single one. -- Paul Tansom | Aptanet Ltd. | https://www.aptanet.com/ | 023 9238 0001 Vice Chair, FSB Portsmouth & SE Hampshire Branch | http://www.fsb.org.uk/ ============================================================================= Registered in England | Company No: 4905028 | Registered Office: Ralls House, Parklands Business Park, Forrest Road, Denmead, Waterlooville, Hants, PO7 6XP