<<< Date Index >>>     <<< Thread Index >>>

Re: Could not load html file to browser



On Sun, Sep 21, 2008 at 3:31 PM, Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Sunday, September 21 at 10:14 AM, quoth hce:
>> Hi,
>>
>> I set following definition in the muttrc on the Debian box:
>>
>> set implicit_autoview
>> alternative_order text/plain text/html
>
> Okay... what does your text/html mailcap entry look like?
>
>> When an email contains html format, the mutt called [-- Autoview
>> using /usr/bin/w3m -dump -T text/html ''/tmp/mutt.html'' --]. But
>> the html file could not be loaded to the browser as following error:
>
> It sounds like your mailcap erroneously hardcoded the location of
> temporary html files as /tmp/mutt.html, which is not what mutt uses.
>
>> (1) Where is the autoview configurated to call /usr/bin/w3m -dump -T
>> text/html?
>
> It's defined in your mailcap file, either in ~/.mailcap or
> /etc/mailcap. See your mailcap man page.
>
>> (2) Why there is no /tmp/mutt.html? I tried to use vi to open
>> /tmp/mutt.html, there was no that file either. That is why caused
>> the browser eror to load a non exist /tmp/mutt.html file.
>
> The short answer is: because there isn't *supposed* to be.
>
>> (3) How to fix it in muttrc?
>
> You can't. It has to be fixed in your mailcap.
>
> A correct mailcap entry should look something like this:
>
>     text/html; w3m -dump -T text/html %s; needsterminal; copiousoutput;

That fixed the probem. Thank you so much and thanks all other responses.

> Note the "%s" instead of "/tmp/mutt.html". That's so that mutt can
> tell w3m where the temporary file is. It is usually something with an
> unpredictable name (if it was a predictable name, it would be a
> security problem), and NOT /tmp/mutt.html.
>
> ~Kyle
> - --
> Reliability means never having to say you're sorry.
>                                             -- Dr. Daniel J. Bernstein
> -----BEGIN PGP SIGNATURE-----
> Comment: Thank you for using encryption!
>
> iEYEARECAAYFAkjV3EoACgkQBkIOoMqOI17qdwCgvtijBhiWXDgdsdP5hcrKqiac
> lV0AnjxDa/cHJOEGJUO85lLiT1qsGvSO
> =OkBv
> -----END PGP SIGNATURE-----
>