• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

LrShell.openFilesInApp in Catalina.

New Here ,
Nov 05, 2019 Nov 05, 2019

Copy link to clipboard

Copied

Hi there,

 

I am using 

LrShell.openFilesInApp() to show logfiles from a plugin, but it stopped working. I unfortunately dont know, if this is a macOS or LR CLassic issue. 
Strangely, it works this way:
LrShell.openFilesInApp( { "/tmp/lenstagger.txt" }, "/usr/bin/open" )
but 
LrShell.openFilesInApp( { "/tmp/lenstagger.txt" }, "/Applications/Textedit.app" )
doesnt work.
also doesnt work: 
LrShell.openFilesInApp( { "/tmp/excmd" }, "/usr/bin/open -a /Applications/Utilities/Console.app" )
 
Does someone have the same issue?
 
cheers,
dirk
TOPICS
SDK

Views

360

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 05, 2019 Nov 05, 2019

Use the path /System/Applications/TextEdit.app. 

 

Mac OS 10.15 put the core Mac OS files on a read-only volume as part of its changes to security, and the built-in apps are located under /System/Application.  The Finder does some magic to merge /System/Applications and /Applications (where user-installed apps go).

 

Shame on LrShell.openFilesInApp() for not raising an error when it can't open the specified app or files.

 

I debugged this by starting Lightroom from the command line, using the -t

...

Votes

Translate

Translate
LEGEND ,
Nov 05, 2019 Nov 05, 2019

Copy link to clipboard

Copied

Use the path /System/Applications/TextEdit.app. 

 

Mac OS 10.15 put the core Mac OS files on a read-only volume as part of its changes to security, and the built-in apps are located under /System/Application.  The Finder does some magic to merge /System/Applications and /Applications (where user-installed apps go).

 

Shame on LrShell.openFilesInApp() for not raising an error when it can't open the specified app or files.

 

I debugged this by starting Lightroom from the command line, using the -traceback option:

$ /Applications/Adobe\ Lightroom\ Classic/Adobe\ Lightroom\ Classic.app/Contents/MacOS/Adobe\ Lightroom\ Classic -traceback

(There used to be a forum post about using -traceback, but Adobe in its infinite wisdom decided to discard older posts from the SDK forum.)

 

When I ran LrShell.openFilesInApp(), the following debugging output appeared:

sh: /Applications/Textedit.app: No such file or directory

When I tried to do "ls /Applications" from the command line, I saw just the few user-installed applications I had. Then I recalled reading something about how 10.15 introduced a read-only volume for system files, and it then took a fair bit of googling and Disk Utility to figure out the file paths.

 

[Use the reply button under the first post to ensure replies sort properly.]

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 23, 2019 Nov 23, 2019

Copy link to clipboard

Copied

LATEST

Great find!

I am now using LrShell.openFilesInApp( { "/tmp/lenstagger.log" }, "/usr/bin/open" ) to keep backwards compatibilty. I have just renamed the logfile to .log launch Console.app automatically.

 

Cheers,

dirk

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines