On Thu, 27 Jun 2013, Sietse Brouwer wrote:
Instead of choosing our own default PDF viewer, we should probably invoke the user's default PDF viewer. Every OS has a command-line program to open a file with the system default program:
On OS X: open myfile.pdf
On Windows: start myfile.pdf
On Linux, there separate programmes for KDE, new gnome and old gnome, and desktop-agnostic: kde-open myfile.pdf || gvfs-open myfile.pdf || gnome-open myfile.pdf || xdg-open myfile.pdf
Or, simple read the mailcap preference or use a program such as run-mailcap or see which choose the viewer based on mailcap preferences. I am half joking here; don't go down this route. One can simply leave it to the user to write a wrapper to context that calls the PDF viewer when context is finished. Aditya