Launch application on remote machine with EPPC - Newb

Hello, I’m trying to launch a closed application on a remote computer with this code-

tell application "Finder" of machine "eppc://user:pass@machine.local" to ¬
	launch application "Transmission" of machine "eppc://user:pass@machine.local"

I have Transmission as the application here for testing. It works fine with the quit application command. Eventually I’ll be launching an automator workflow saved as an application. If there’s an easier way to do it using just the workflow that’s cool too.

When running the workflow on the main computer I don’t get the usual “application isn’t running” message when using the open command. Nothing happens.

Is the first line with Finder necessary, or is there a better method?
Thanks

Model: Mac Mini
Operating System: macOS 10.14

Older version of macOS allowed to call applications remotely. Not in recent version (After 10.7 ?).

There is the only application allowed to accept eppc, AppleScript applet.

So, you have to call AppleScript applet on remote machine then applet calls application and returns result.

Model: MacBook Pro 2012
AppleScript: 2.7
Browser: Safari 13.0.1
Operating System: macOS 10.14

Sorry, maro, this is wrong. You can launch applications with Remote Apple Events even on Catalina machines.


First of all enable Remote Apple Events in System Preferences > Sharing on the target machine.

As the Finder is the only application which is guaranteed to run you have to tell the Finder to launch the app.

This opens Safari on the target machine. Replace literal name “Safari” and bundle identifier “com.apple.Safari” with the corresponding values of Transmission

set RemoteMachine to "eppc://user:pass@machine.local"

tell application "Finder" of machine RemoteMachine
	using terms from application "Finder"
		if "Safari" is not in (get name of processes) then
			open application file id "com.apple.Safari"
			repeat until "Safari" is in (get name of processes)
				delay 1
			end repeat
		end if
	end using terms from
end tell

The repeat loop is only necessary if you want to proceed to send Apple Events to the application.

Thank you! :smiley:

Now I can use a key on my keyboard to put my computer to sleep and run an automator app on my Savant host to turn off all my speakers, displays, and powered music equipment at the same time!

lol

Big surprise!! It is my misunderstanding. Wao.