Agreed, thanks. I will make the change. On Tue, Jan 28, 2020 at 3:26 AM ethiejiesa via Source <sou...@jsoftware.com> wrote:
> In the spirit of making plot and viewmat Just Work TM, would it make sense > to > add 'xdg-open' as the initial option in 'dfltpdfreader' and > 'dfltimageviewer'? > This mirrors the usage of 'x-www-browser' in 'dfltbrowser'. > > For the sake of clarity, 'xdg-open' is a part of the xdg-utils[0] package > typically installed on desktop linux systems. It is a utility designed to > open > a given file or URL using the user's preferred application. > > Concretely, I am thinking something like this patch relative to 9.1.20: > > --- stdlib.ijs 2020-01-28 20:14:27.504002311 +0900 > +++ stdlib.ijs 2020-01-28 20:23:11.676843185 +0900 > @@ -2032,6 +2032,9 @@ > case. 'Darwin' do. 'open' > case. do. > try. > + 2!:0'which xdg-open 2>/dev/null' > + 'xdg-open' return. catch. end. > + try. > 2!:0'which evince 2>/dev/null' > 'evince' return. catch. end. > try. > @@ -2315,6 +2318,9 @@ > case. 'Darwin' do. 'open' > case. do. > try. > + 2!:0'which xdg-open 2>/dev/null' > + 'xdg-open' return. catch. end. > + try. > 2!:0'which eog 2>/dev/null' > 'eog' return. catch. end. > '' return. > > [0]:https://www.freedesktop.org/wiki/Software/xdg-utils/ > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm