Modeled after SlidingHorn's issue which may be related:
I want w3m to open pdf files with zathura, so I created a ~/.mailcap file with the line
application/pdf; zathura '%s'
hoping to get w3m to use zathura for opening pdf links. However, it keeps defaulting to okular, which is in the /etc/mailcap file. I tried everything: using .w3m/mailcap instead, changing the syntax around (removing the quotes around the %s), absolutely nothing works. I even nuked /etc/mailcap and s/okular/zathura/g on it. As a result, w3m opened the pdf with... xpdf. Anything other than zathura.
Otherwise, zathura works just fine and cooperates with other applications, e.g. vim/vimtex.
Versions:
w3m version w3m/0.5.3+git20151119, options lang=en,m17n,image,color,ansi-color,mouse,gpm,menu,cookie,ssl,ssl-verify,external-uri-loader,w3mmailer,nntp,gopher,ipv6,alarm,mark,migemo
EDIT: To test, I replaced the zathura with xpdf invocation above, and it still does not work. Note that in the Options entry in w3m I have .w3m/mailcap and ~/.mailcap as entries to search for mime types.
You wrote .w3m/mailcap I think the proper path would be ~/.w3m/mailcap
The entries in "List of mailcap files" in Options are separated with commas
like these
~/.w3m/mailcap, /etc/w3m/mailcap, /etc/mailcap
If the mailcap file is edited, it is necessary to reload the file to use the
modifications, you can do this by quit and start w3m or with the REINIT
function, this is the entry in my ~/.w3m/keymap file (the shortcut is Alt+r)
Reload configuration files.
keymap M-r REINIT
I test the format with the following programs: zathura, apvlv, atril and mupdf
so, I think the entry:
Modeled after SlidingHorn's issue which may be related:
I want w3m to open pdf files with zathura, so I created a ~/.mailcap file with the line
application/pdf; zathura '%s'
hoping to get w3m to use zathura for opening pdf links. However, it keeps defaulting to okular, which is in the /etc/mailcap file. I tried everything: using .w3m/mailcap instead, changing the syntax around (removing the quotes around the %s), absolutely nothing works. I even nuked /etc/mailcap and s/okular/zathura/g on it. As a result, w3m opened the pdf with... xpdf. Anything other than zathura.
Otherwise, zathura works just fine and cooperates with other applications, e.g. vim/vimtex.
Versions:
w3m version w3m/0.5.3+git20151119, options lang=en,m17n,image,color,ansi-color,mouse,gpm,menu,cookie,ssl,ssl-verify,external-uri-loader,w3mmailer,nntp,gopher,ipv6,alarm,mark,migemo
zathura 0.3.5 (plugin) pdf-poppler (0.2.6) (/usr/lib/zathura/pdf.so) (plugin) djvu (0.2.5) (/usr/lib/zathura/djvu.so) (plugin) ps (0.2.3) (/usr/lib/zathura/ps.so) (plugin) cb (0.1.5) (/usr/lib/zathura/cb.so)
Distribution:
Linux mint 18.3 Cinnamon edition.
EDIT: To test, I replaced the zathura with xpdf invocation above, and it still does not work. Note that in the Options entry in w3m I have .w3m/mailcap and ~/.mailcap as entries to search for mime types.