-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Tuesday, September 22 at 10:33 PM, quoth Wu, Yue:
>Hi, list,
>
>I have a weird issue, my mailcap has this entry:
>
>    text/html; opera '%s'; test=test -n "$DISPLAY"
>
>But I still can't view the html attachment, opera always shows me a blank html
>file. What's wrong?

The way that mutt works is that for mailcap handling, it creates 
temporary files containing the portion of the email that needs to be 
viewed, and then launches the program specified in your mailcap. When 
that program exits, mutt deletes the temporary file (if it didn't, 
those temporary files would accumulate and pose not only a problem 
filling up your disk but also a privacy problem). This is logical and 
makes sense; the usual order of events goes like this:

     1. mutt creates temporary file
     2. mutt launches specified program
     3. program views file contents, per user's request
     4. program exits
     5. mutt deletes temporary file

HOWEVER, this can cause problems with programs like opera and firefox 
that don't stay bound to the original execution. They create a 
"master" execution of the program, and simply send the filename to it. 
Then, the original invocation exits. If that sounds confusing, try 
this description of the order of events:

     1. mutt creates temporary file containing html
     2. mutt launches opera with the filename as an argument
     3. opera launches the opera-master process
     4. opera sends a message to the opera-master process to open the
        temporary file
     5. opera exits
     6. mutt deletes temporary file
     7. opera-master attempts to open the temporary file

See the problem? How can mutt know when Opera is done using the file?

The usual solution is to create a wrapper script that will copy the 
temporary file somewhere safe. This essentially just avoids mutt's 
cleanup; so you need to have your own way of managing all the 
temporary files that will get created.

~Kyle
- -- 
In any conversation where only one side may be argued, we 
instinctively assume that those who publicly defend the official 
position are motivated by ideology and not by an interest in truth. 
The outlawed position is then assumed to be true, and wins by default.
                                              -- Fr. Andrew Hamilton SJ
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJKuON+AAoJECuveozR/AWeQ5kQAIE7EJ6SqAImbq6x7C+frPPy
VVhB5OtjrjXYIhACU987qVMmE35kJWChHHvnmC+N7X7fzql9RjMIXn9chhelpeA/
QyY9E4zy0ITxLi94V8gBdHtS+47PTV8qsM8lOPv19hPINwWZ9B/imIIr1WQ2XIvq
YrL5u3skC5t0tqpsu1lvf0P3b3iPlLuq9RUqod4sJ7w2eDoLbsh4klGDwjQ3VFGT
8mvkzPhPs2nnsk1zFfGKO6I5BIwZqvzxuj2mVHqMkFeoSQE5iG8IX+oGLMGrv6cY
RUQJzfvk6m+Piz3QwGI5iwaFv9oUcv4dE2ykgqrCRLMfyiPSQwc91ejDUwl1XdYG
HUk0/8o32T2nI7z/BosRCe+bbPM0qfbtq+1XoEuwllcxLajxYoSo/1Z3S0AAfzZC
kZ/milOB9LJNmYSbsuhGTgLLeiOgSU8guqSVEB00mkD/v/3I0QiAalnKntNzXMxi
fY416IayDSCmiFu+GoDbfSW0XLxoluTKGTTf6dZqwtUUwKYGcmoTpSX6AnmY8d+0
siv4OoRPk5fBlL8aNAjUErVrMzENxUOJIY1C0OjLH24Zx10moeifHqMPfMf4ajDC
OK7iixbAmQDNyawwoqlP7+yyts16tgllXcNdeMK37ELAe9Y7NLFpI7pMegOb4uUm
Ui6AHStW4sW/njhqhrhj
=iw+5
-----END PGP SIGNATURE-----

Reply via email to