Closed fkorotkov closed 5 months ago
I noticed this new behavior today when trying the --vnc
and --vnc-experimental
options.
The command line documentation still says "Use screen sharing instead of the built-in UI." and "Use Virtualization.Framework's VNC server instead of the build-in UI.". While in fact the built-in UI is now still run. Should we update these?
Another complication is that we use --no-graphics
to determine whether the VNC connection should be automatically opened or not:
if noGraphics || ProcessInfo.processInfo.environment["CI"] != nil {
print("VNC server is running at \(vncURL)")
} else {
print("Opening \(vncURL)...")
NSWorkspace.shared.open(vncURL)
}
Deprecating --graphics
makes sense, but perhaps we should reconsider the behavior of --vnc
and --vnc-experimental
in terms of opening the default UI?
Ie, --vnc
and --vnc-experimental
shouldn't set noGraphics
, because we're still running with graphics (non-headless), but we are using a different way to provide the graphics, so we skip the call to runUI
.
Ie, right now using --vnc-experimental
I have to choose between:
--no-graphics
and losing out on Tart automatically opening Screen Sharing with the right address and passwordRestoring the previous behavior allows the choice of headless or not (--no-graphics
), to be independent of how the graphics are provided (default vs --vnc
vs --vnc-experimental
).
Proposed fix in https://github.com/cirruslabs/tart/pull/758
From a discussion in #728 it appeared that having both
--graphics
and--no-graphics
is a bit confusing.--graphics
was introduced in #248 to support having both VNC and UI for debugging Packer plugin in cirruslabs/packer-plugin-tart#21. This is because--vnc
flag has a side effect of hiding UI which I think was wrong in retrospective. One can runtart run --vnc --no-graphics
. In most of the cases this is automated via Alfred or something like that.Now we have so many arguments that IMO it's worth to remove
--graphics
for overall consistency in arguments: everything is enabled by default and can be disabled via--no-*
flags.