Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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 Lawson Oct 4 '11 at 20:55
add comment

1 Answer

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/ARDAgent.app/Contents/Resources/kickstart -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/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off
share|improve this answer
    
nice. that worked great. –  BeauGeste Oct 4 '11 at 21:44
add comment

Your Answer

 
discard

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.