Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Workflows won't run properly on Monterey, opens terminal instead of calling executable with parameter

Hello,


All my previous workflows are not working after moving from Catalina to Monterey.


e.g. If I download the multimarkdown services : https://brettterpstra.com/projects/markdown-service-tools/ and install the executables in /usr/local/ (somehow the /bin disappeared with Monterey)


I need to change the path in all the scripts because /usr/local/bin/ don't exist anymore so I put all executables under /usr/local/


However, after that, my workflows that pass text to the executable won't work at all... instead a stupid terminal window is opened and that's all.


I don't want a bloody terminal to open... I want automator to pass the text to the executable the same way it has worked for years...


Any idea of what has changed ?


Thanks,

MacBook, OS X 10.11

Posted on Jan 2, 2022 7:22 AM

Reply
Question marked as Best reply

Posted on Jan 2, 2022 9:28 AM

Thanks both for the help.


I've fixed my /bin folder (it's a clean install, hence why it's not there anymore, I don't remember creating that folder on Catalina).


The issue was WAY WAY dumber than that : I've mapped my Markdown shortcut calling the Service with ⌘+Shift+M with some text selected... which is also the shortcut to display the terminal man page...


No wonder it opened the terminal !

4 replies
Question marked as Best reply

Jan 2, 2022 9:28 AM in response to aguett74

Thanks both for the help.


I've fixed my /bin folder (it's a clean install, hence why it's not there anymore, I don't remember creating that folder on Catalina).


The issue was WAY WAY dumber than that : I've mapped my Markdown shortcut calling the Service with ⌘+Shift+M with some text selected... which is also the shortcut to display the terminal man page...


No wonder it opened the terminal !

Jan 2, 2022 8:07 AM in response to aguett74

The operating system includes /usr/local/bin in its default search paths, but not /usr/local. If /usr/local/bin existed before the Monterey upgrade, then it should have been retained afterward with its contents.


However, you should not just dump your executables into /usr/local. Instead, you should create the bin child sub-directory from the Terminal command line, where you replace the word shortname with your own short user name:


sudo mkdir -p /usr/local/bin
sudo chown shortname:admin /usr/local/bin
sudo chmod 755 /usr/local/bin


Then, move the executables that you placed in /usr/local back into /usr/local/bin.


You may want your PATH environment variable set to look in /usr/local/bin first if there are command names in there that may conflict with identical names elsewhere in the operating system installation. Same scenario whether ~/.zshrc or ~/.bash_profile:


export PATH="/usr/local/bin:$PATH


In practice, my PATH statement is more complicated on Big Sur and Monterey due to other things that I have installed.


Depending on your individual scripts, you may need to introduce the following in the script before referencing applications, or you can use explicit paths for the applications that you reference. Pick the one for your SHELL:


source ~/.zshrc
source ~/.bash_profile


Jan 2, 2022 8:24 AM in response to aguett74

You are missing the 'multimarkdown' binary which needs to be located in '/usr/local/bin/multimarkdown'. The MarkdownServiceTools requires this binary and it is not distributed with the services collection from Brett Terpstra.


The MultiMarkDown binary is open source and the original code is found here:

https://github.com/fletcher/MultiMarkdown

https://fletcherpenney.net/multimarkdown/


You can install MultiMarkDown using the Homebrew package manager found here:

https://brew.sh - follow the instructions and read about Homebrew.


Install Homebrew then use the following command to install MultiMarkDown:


brew install multimarkdown


Homebrew is extremely useful to install open source software onto macOS. You may find many other tools available with Homebrew.


On Intel Mac's you merely need to install Homebrew then multimarkdown and then the MarkDownServiceTools and all will work as designed.


On Apple Silicon M1 based Macs Homebrew will put the files in /opt/homebrew/bin. You can create the '/usr/local/bin' directory on an M1 Mac and then create a symbolic link to the multimarkdown binary.


sudo mkdir -p /usr/local/bin
sudo ln -s /opt/homebrew/bin/multimarkdown /usr/local/bin


Creating the symbolic link will satisfy the MarkDownServiceTools workflows which are hardcoded to look for multimarkdown in /usr/local/bin. The symbolic link will redirect to the actual binary in /opt/homebrew/bin which ironically is another symbolic link as Homebrew manages multiple versions of packages and creates symbolic links for them.

Workflows won't run properly on Monterey, opens terminal instead of calling executable with parameter

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.