Jump to content

I have a question about the Alfred Terminal Command function!


Recommended Posts

Posted (edited)

If you run the command shown in the picture as Alfred, the osascript -e 'tell app "System Events" to restart' command won't work.

 

Is there any way to solve this problem?

 

Thank you in advance 🙏

screenshot_2022-02-08_23-40-04.png

Edited by greedist
Posted

It isn’t working because you’re entering an interactive SSH session and presumably not exiting, so the other commands never have a chance to run.

 

What exactly are you trying to do?

Posted
7 minutes ago, vitor said:

It isn’t working because you’re entering an interactive SSH session and presumably not exiting, so the other commands never have a chance to run.

 

What exactly are you trying to do?

 

I'm going to connect to iMac through the shh and boot through the window.

 

Is this impossible? 🤔

Posted

If what you want is to send the commands for them to be executed on the target machine, you give them as another argument to the SSH command. As in:

 

ssh 'xxx@yyy' 'osascript -e "tell app \"System Events\" to restart"'

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...