27 Jun
2013
27 Jun
'13
5:15 p.m.
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 Cheers, Sietse