Highlighted

LrShell.openFilesInApp in Catalina.

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
Most Valuable Participant
Correct answer by johnrellis | Most Valuable Participant

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.]

 

Topics

SDK

Views

98

Likes

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

LrShell.openFilesInApp in Catalina.

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
Most Valuable Participant
Correct answer by johnrellis | Most Valuable Participant

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.]

 

Topics

SDK

Views

99

Likes

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
Most Valuable Participant ,
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.]

 

Likes

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
Reply
Loading...
Nov 23, 2019

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...