On 010612, at 12:15:00, malcolm.boekhoff wrote > I want to spawn internet explorer or lynx or any program to read an > attachment, but I want to be able to continue to read my mail with the > spawned process still going. Unfortunately it appears that Mutt deletes > the temporary file containing the attachment so that even if I do get > the syntax for spawning the viewer asynchronously, the actual temporary > file has been deleted. I use the attached script to rename the temporary file, and launch a program in the background. I create a link to it, 'prog'bg for each program I want to launch (ie for xv, the link is xvbg; for acroread, the link is acroreadbg). I add an appropriate line to my mailcap file: application/pdf; acroreadbg %s; -- David Ellement
#!/bin/ksh # eval ${DEBUG+set -x} prog=${0##*/} prog=${prog%bg} tmp=$(mktemp -p ${prog}-).$(echo "${1##*/}" | sed -e 's/ /_/g') mv "$1" $tmp ( $prog $tmp rm $tmp ) >&- 2>&- &