Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS Version 12.3 NEURON installation icons fail #1708

Closed
nrnhines opened this issue Mar 17, 2022 · 5 comments · Fixed by #1712
Closed

MacOS Version 12.3 NEURON installation icons fail #1708

nrnhines opened this issue Mar 17, 2022 · 5 comments · Fixed by #1712

Comments

@nrnhines
Copy link
Member

After updating to MacOS Version 12.3, double clicking on the neurondemo icon (and others) fails with:

The application "Terminal" can't be opened.
-1703

Note that one can start a Terminal manually and launch by typing neurondemo.

@nrnhines
Copy link
Member Author

Something new in MacOS Version 12.3. From a Terminal window

hines@Michaels-MacBook-Pro-2 ~ % ls -al /Applications/Utilities
total 0
drwxr-xr-x   4 root  wheel  128 Mar 16 18:45 .
drwxrwxr-x  18 root  admin  576 Mar 16 20:12 ..
-rw-r--r--   1 root  wheel    0 Feb 26 02:05 .localized
drwxr-xr-x   3 root  wheel   96 Nov 10 10:58 XQuartz.app
hines@Michaels-MacBook-Pro-2 ~ % 

Though, looking via the Finder, there are a bunch of programs there, including Terminal. Again, from a Terminal,

hines@Michaels-MacBook-Pro-2 ~ % sudo open /Applications/Utilities/Terminal
Password:
The file /Applications/Utilities/Terminal does not exist.

@nrnhines
Copy link
Member Author

This issue came to my attention from https://www.neuron.yale.edu/phpBB/viewtopic.php?p=19374

@nrnhines
Copy link
Member Author

nrnhines commented Mar 17, 2022

I don't know it this will lead to a solution but:

After some testing on a Catalina system, I see more clearly what is happening.
Finder has a "Smart Folder" for "Applications" which provides the contents of both /Applications and /System/Applications. All representations of "Applications" from the Finder use this, including opening /Applications.
When you open /System/Applications, you are presented with just the contents of that directory. This should contain the software applications that were installed from the initial installation such as "App Store".
So both ls /System/Applications and open /System/Applications should have the same content. While running ls /Applications will show you the contents of that directory (normally user installed applications), open /Applications will use Finder's special Smart Folder to show all applications available.

I see thatTerminal.app is located in /System/Applications/Utilities.
open /Applications/Utilities opens a finder window that lists Terminal
but open /Applications/Utilities/Terminal.app gives The file ... does not exist
but open /System/Applications/Utilities/Terminal.app -n indeed opens a new Terminal window.

@nrnhines
Copy link
Member Author

The problem seems to reduce to the fact that for MacOS 12.3

osascript -e 'tell application "Finder" to open file "Macintosh HD:Applications:NEURON:bin:macnrn.term"'

gives the error, even though the following works

open /Applications/NEURON/bin/macnrn.term

@nrnhines
Copy link
Member Author

Looks like the solution is

hines@Michaels-MacBook-Pro-2 mac % git diff
diff --git a/src/mac/prototype_applescript_cmake.txt b/src/mac/prototype_applescript_cmake.txt
index 5f2788775..49be84f22 100644
--- a/src/mac/prototype_applescript_cmake.txt
+++ b/src/mac/prototype_applescript_cmake.txt
@@ -43,7 +43,7 @@ on mylaunch(farg)
                close access thefile
                
                set termfile to appdir & "bin:" & "macnrn.term"
-               open file termfile
+               tell application "Terminal" to open file termfile
                
        end tell

I guess it was a change needed for security. In looking around on the web, it appears that applescript's days are numbered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant