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

There is a computer I don't have immediate access to that I cannot screenshare with it. I have an account on the computer and have screenshared before with it.

I believe some setting has been changed to deactivate screensharing.

Is there a way to activate screensharing through ssh?

My computer is OS 10.6.8. I'm not sure what the other one is but probably the same.

share|improve this question
I'm not able to answer right now, but I suspect the solution may involve osascript and the "System Events" application. More later if someone else hasn't already worked out an answer. – Daniel Oct 4 '11 at 20:55
up vote 5 down vote accepted

To enable remote management (including screensharing), issue the following command over ssh:

Note: This command sets your vnc password to 'mypasswd' as set by the -vncpw flag in the command, you should change this.

sudo /System/Library/CoreServices/RemoteManagement/ -activate -configure -access -on -clientopts -setvnclegacy -vnclegacy yes -clientopts -setvncpw -vncpw mypasswd -restart -agent -privs -all

To disable the remote management, issue the following command over ssh:

sudo /System/Library/CoreServices/RemoteManagement/ -deactivate -configure -access -off
share|improve this answer
nice. that worked great. – BeauGeste Oct 4 '11 at 21:44

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.