timsutton / osx-vm-templates

macOS templates for Packer and VeeWee.
MIT License
1.12k stars 248 forks source link

prepare_iso disable flags #46

Closed mattieb closed 8 years ago

mattieb commented 8 years ago

This PR adds disable flags for Screen Sharing and Remote Management, the latter of which is currently required by #43 for VirtualBox to operate successfully.

The flag mechanism should be generally useful to selectively disable or enable additional features in the built DMG.

timsutton commented 8 years ago

Thanks for taking the time to narrow down the culprit in #43. I think this is helpful to have as a configurable option anyway.

It'd be nice if there were a clean way to do this via the template instead but I don't think there's enough "infrastructure" in the build process for that right now, so your solution is totally fine.

It's been a while since I looked into the steps to automatically enable ARD via means other than kickstart, and I forget exactly what piece having /private/etc/RemoteManagement.launchd was a part of it. But if I understand correctly from #43, if anyone wants basic Screen Sharing enabled they can still set -D DISABLE_REMOTE_MANAGEMENT and just not have the ARD support, but still be able to connect via standard screen sharing with an IP.

Speaking as someone who uses ARD for some of the tasks for which it was designed (and loathes using it), if someone is using this repo they probably have pretty different needs.

I'm going to do a couple run-throughs with a Fusion build to verify but looks great!

mattieb commented 8 years ago

Yeah, that's my understanding as well re Screen Sharing still being around. It's also possible to attach a background VM (like one Vagrant starts) to a screen session in VirtualBox 5.0 now—just launch the main UI and hit Show.

timsutton commented 8 years ago

One other bit we can omit if DISABLE_REMOTE_MANAGEMENT is set:

https://github.com/zigg/osx-vm-templates/blob/39131584e81c5acbdef1471c1ca6b187b118a2e7/prepare_iso/support/pkg-postinstall#L45-L47

The condition above the dscl stuff could be moved down so that this is all done in one block.

mattieb commented 8 years ago

Sounds good. I’ll add that this evening (handful of hours from now).

mattieb commented 8 years ago

I moved the ARD permission grants under the flag, built and tested. Everything's working over here, including being able to attach via VNC to Screen Sharing without Remote Management on.

timsutton commented 8 years ago

Great. Thanks for keeping the VirtualBox support cared-and-fed-for!