I have a workflow where I use SSH in terminal in conjunction with remote desktop, and I often use the open command in SSH to open something in the GUI.
However, recently it stopped working with the following failure:
$ ssh 127.0.0.1
$ open .
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-600 "procNotFound: no eligible process with specified descriptor" UserInfo={_LSLine=387, _LSFunction=_LSAnnotateAndSendAppleEventWithOptions}
Just running open . locally on the machine works fine, it opens finder at the current working directory. It also seems to have started happening recently in Mac OS Monterey, but I wasn't able to track down exactly on which version it stopped working.
Any ideas what is causing this or how it can be worked around?
tmux? I had this problem when runningopenfrom insidetmux. I quittmuxserver (involves closing all windows) and reopened, and now the problem is gone and I haven't found a way to make the problem reoccur (to file a bug report).