Xdg-open is the freedesktop.org scheme for opening files and URLs with our preferred applications.
First I verified that PDF files were recognized as such:
> xdg-mime query filetype somepdffile.pdfGood, and then that Acroread was the default application:
application/pdf
> xdg-mime query default application/pdfExcellent, but does it work?
userapp-acroread-9UNI5W.desktop
> xdg-open somepdffile.pdfIn this case "Document Viewer"is Atril, not Acroread.
Error: no "view" mailcap rules found for type "application/pdf"
Opening "somepdffile.pdf" with Document Viewer (application/pdf)
Poking around the mailcap thing I edited the user section in /etc/mailcap as so:
# User section follows: Any entries included in this section will takeThat did the trick.
# precedence over those created by "update-mime". DO NOT CHANGE the
# "User Section Begins" and "User Section Ends" lines, or anything outside
# of this section!
#
# ----- User Section Begins ----- #
application/pdf;/usr/local/bin/acroread %s; test=test "$DISPLAY" != ""; description=Portable Document Format; nametemplate=%s.pdf; priority=1
# ----- User Section Ends ----- #
No comments:
Post a Comment