Leif Halvard Silli

Den 2022-11-09 09:56 skreiv Hussein Shafie:
On 11/8/22 20:32, Leif H Silli wrote:

I discovered a simple workaround ... In the Helper Apps section of the Preferences, the command

     open "%U”

is (by default) defined as the «Default viewer» (strange terminology btw).


And it turns out that, for the PDF file type, if you replace

     open -W -n -a /System/Applications/Preview.app "%F"

with the «Default viewer» command

     open "%U”

then I get the behavior that I want: PDFs gets opend by your default PDF-viewer (typically the Preview.app on MacOS), and you also avoid that a new instance of your default PDF-viewer is opened each time you click the fil in XXE’s Browse Files tool.


Thank you for this information.

The advantage of using

      open "%U”

is that the user can use the MacOS Finder to decide which app that should open a certain file type. (This is done via the Show info panel for particular files in the Finder.) But this might also be the disadvantage.

If you want to not rely on the Finder, then another workaround is to simply remove the «-n» from

      open -W -n -a /System/Applications/Preview.app "%F"

so that we get

      open -W -a /System/Applications/Preview.app "%F"

By removing the «-n», we avoid that a new instance is opened every time the command is run … See https://ss64.com/osx/open.html

(I do not know whether the «open» is a MacOS only command of if it also runs on Linux and more.)
--
Leif Halvard Silli

--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to