Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to enable screen sharing (vnc) from terminal (ssh connection)?

Hi,


Setting the scene:

I installed Lion on my office iMac a couple of days before leaving on vacation.

Now on a remote location on holiday, I cannot share the screen of my office mac anymore. This was possible before the upgrade to Lion.

I'm still able to ssh to my office iMac, so I have some control...


Problem:

I want to check the Systems Preferences settings via terminal (the ssh session). How can I do this?

I suppose VNC is just switched off due to the upgrade, and I want to remotely enable screen sharing (and vnc) from the Terminal.

A google search tells me how to do this for 10.6, but not howto for 10.7.


Hope somebody can help.


Thanks,


Stefan.

Posted on Aug 6, 2011 4:42 AM

Reply
Question marked as Best reply

Posted on Aug 6, 2011 5:07 AM

Problem solved! 🙂


I found the solution in the meantime here: http://support.apple.com/kb/HT2370


1/ In the ssh session to my my iMac:

a) cd /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/


b) sudo ./kickstart -activate -configure -access -on -privs -all -restart -agent


2/ Than on my local MacBook Terminal:

a) cd /System/Library/CoreServices/Screen Sharing.app/Contents/MacOS


b) ./Screen\ Sharing &


3/ In the popup I connect to my ssh tunnel... (localhost:5901)


Hope this may help somebody else in the future...


Stefan.

4 replies
Question marked as Best reply

Aug 6, 2011 5:07 AM in response to Treanus

Problem solved! 🙂


I found the solution in the meantime here: http://support.apple.com/kb/HT2370


1/ In the ssh session to my my iMac:

a) cd /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/


b) sudo ./kickstart -activate -configure -access -on -privs -all -restart -agent


2/ Than on my local MacBook Terminal:

a) cd /System/Library/CoreServices/Screen Sharing.app/Contents/MacOS


b) ./Screen\ Sharing &


3/ In the popup I connect to my ssh tunnel... (localhost:5901)


Hope this may help somebody else in the future...


Stefan.

How to enable screen sharing (vnc) from terminal (ssh connection)?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.