"Show dock icon" setting inconsistently ignored when UTM is launched via `open` (command line)
- Dominant language
- Swift
- Stars
- 35.5k
- Forks
- 1.8k
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 7
Description
**UTM version:** 4.7.5 (installed via direct GitHub download, not Mac App Store)
**macOS version:** macOS Tahoe 26.6.2
**Hardware:** Mac mini (2024), Apple M4 Pro, 24 GB RAM
### Steps to reproduce
1. In UTM Settings → Application, disable "Show dock icon" (menu bar icon remains enabled, as required).
2. Fully quit UTM.
3. Launch UTM via the command line using `open -g -a UTM` (e.g. from a script/LaunchAgent), rather than double-clicking the app icon in Finder/Applications.
4. Start a VM via `utmctl start `.
### Expected behavior
No Dock icon should appear, per the disabled "Show dock icon" setting - only the menu bar icon.
### Actual behavior
The Dock icon appears and stays visible, even though the exact same setting correctly hides the Dock icon on some launches (e.g. via double-click, or even via the same `open -g -a UTM` command on other occasions). Behavior is inconsistent/intermittent between launches, without any change to the setting itself (confirmed via screenshot the setting remains disabled each time).
### Additional context
This is used in an automated background setup where UTM and a VM are started via a LaunchAgent + `open -g -a UTM` + `utmctl start`, without any user interaction. The inconsistent Dock icon appearance makes it unreliable to keep UTM fully headless/background-only in this kind of automated setup.
Contributor guide
Research direction
Start by reproducing the issue with `open -g -a UTM` followed by `utmctl start ` while “Show dock icon” is disabled, comparing it with a Finder launch. Trace UTM’s macOS application-launch and Dock-icon handling, then verify that repeated command-line launches consistently honor the setting without showing a Dock icon.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, swift
- Domain
- desktop, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100