Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to run applescript to control Excel on a headless Mac.

I want to do it from the command line via ssh, and I cannot - there is no display to run applescript on, so osascript throws an error.

I know there is on a Linux machine with X11 - I'm hoping something similar is available, but how to do this on a Mac?

share|improve this question
up vote 0 down vote accepted

You can use VNC to log into the mac from a client machine (iOS, android, PC, Mac) and establish the UI session, set excel to launch at boot and set the user account to automatically log in.

You also will want remote access to the computer (allowing ssh, and perhaps remote apple script) so you can use ssh and osascript or perhaps another Mac to script things directly from AppleScript.

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.