MacOS – Remotely turn on screen sharing

macmacosscreen-sharing

I recently tried to turn on Internet Sharing for my mac mini, and accidently hit 'Remote Management' which turns off screen sharing! I have no peripherals – not even a display, but I do have a lot of Apple Laptops. Is there any way to turn it back on if I know the root/admin username and password?!

I also tried booting in target disk mode – both machines are running mountian lion, and connected through a firewire cord (with a thunderbolt adapter on one side). When I boot my machine in target disk mode I just get the firewire logo bouncing around, never see the others image.

Best Answer

Ben, you won't like this... my short answer is 'no, you should get a monitor'.

But, my longer answer is maybe... if you are comfortable with the command line, you could try this hair brained idea:

Start off with firewire target mode. From your description it sounds like you enabled firewire target mode on the laptop rather than the mini. The way you would want to do this is hold down the 'T' on the mini (using a keyboard) as you boot up the mini. Then after waiting a bit (since you can't use a monitor to check that it shows an icon indicating it is in target disk mode) you would connect the cable to the two machines. The mini should now be a hard drive mounted on the laptop.

Now I'm following instructions from here:

http://pivotallabs.com/enabling-os-x-screen-sharing-from-the-command-line/

and having you type this in to the terminal

sudo defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false

This is modifying a file on your laptop, and not on the mini, so you now are going to copy the file you just modified from the laptop to the mini: /var/db/launchd.db/com.apple.launchd/overrides.plist make sure it is in the same location. PLEASE PLEASE PLEASE backup this file first (both on the laptop and mini)

In theory, when you reboot the mini, screen sharing should be enabled. There are a LOT of descriptions in this file though - so I don't really like this idea... but if you are up against a wall it MIGHT work.

Additionally, if you are not comfortable on the command line, stick with the short answer, get a monitor (borrow it if you need to).