termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.18k stars 3.03k forks source link

mutt email view html on firefox browser #3767

Closed erji44 closed 5 years ago

erji44 commented 5 years ago

I'm trying to open the html mails on mutt with termux-open-url but so far to no avail. On linux I do the following: .mailcap file content: text/html; firefox '%s' >/dev/null 2>&1; test=test -n "$DISPLAY"; needsterminal

Then when viewing an email on mutt, pressing v will bring up the html part and when selected it will open the url with firefox. Any ideas on how to get termux-open-url call firefox and open html emails.

Thank you

ghost commented 5 years ago

Is termux-open-url working at all for you ?

ghost commented 5 years ago

termux-open-url doesn't work for local (file://) urls.

erji44 commented 5 years ago

OK, thanks for the answer. termux-open-url work fine to open urls, it calls firefox(or other default browser) and opens the url. Is there a way round this? I'd like to be able to open html file attachments on mutt from local browser installed on android. I can get them to open with elinks but it's not good enough.

ghost commented 5 years ago

You should use termux-open instead of termux-open-url. Example command:

termux-open --content-type 'text/html' /path/to/file.html
erji44 commented 5 years ago

I've been trying all possible options with this, it starts the browser but then browser says: content://com.termux.files/path/to/file.html Address was not understood. Any suggestions? Thanks

ghost commented 5 years ago

Html files opened through termux-open displayed correctly in Firefox:

  1. termux-open command:

  2. Firefox:

Limero commented 5 years ago

How do I make mutt open html automatically with termux-open from the v menu?

kontsevoy commented 5 years ago

@Limero while in the v menu, select the HTML MIME part and hit m.