MacOS – Remote into Mac Mini after a reboot

macosremote desktop

How can a Mac running El Capitan always be ready for a VNC connection even after a reboot?

I can vnc into the Mac with no problem but when I reboot the Mac remotely I can't vnc back in. Someone has to hook up a keyboard to the Mac and physically log in and log back out. Once the machine has been logged in locally I can once again log in remotely via Mac.

I'm using the Mac's built-in VNC as well as an installed RealVNC server. Neither will respond after a reboot.

I edited the RealVNC launch daemon to run at load but that didn't work.

UPDATE

The mac has filevault turned on. 'sudo fdesetup authrestart' will work with a manual reboot. It will not work however with a forced system reboot or a power outage. Someone would still need to manually login with a keyboard in those cases.

The options at this point seem to be to disable Filevault or accept the fact that a person will need to login occasionally.

Best Answer

Apple supports this out of the box. Under the Sharing preference pane you need to enable either the Screen Sharing or the Remote Management and then use the Computer Settings dialog to enable VNC.

enter image description here

The service starts up automatically when incoming network traffic on the VNC ports is detected by the OS. Now, you do need to get past any FileVault pre-login screen where the full actual OS isn't running yet. To restart and skip FileVault one time, use:

fdesetup authrestart

You might need to watch for DHCP traffic and see if the Mac is rejoining the network and asking for an address from the router if you can't find the machine on reboot. For troubleshooting, you could assign a static IP address so that you're sure it's not a DHCP issue.

The problem also could be your choice of VNC client and it's not expecting to connect to OS X Lion or newer. Some older clients break when Apple allows a choice to connect to the logged in user or a new login window. The client needs to reconnect once the session drops to log you in.

One client I like on iOS and Mac OS X is http://edovia.com/screens/ Of course Apple's free Screen Sharing app (look for it in /System/Library/CoreServices/Applications ) and Apple Remote Desktop work well, too.