fleet/orbit/pkg
Scott Gress 866d8bcc00
Ensure MacOS desktop app launched as correct user (#27296)
For #25924  

This PR attempts to fix the issue where the Fleet desktop icon sometimes
fails to appear on MacOS hosts until the hosts are rebooted. Anecdotal
evidence points to this being an issue when system setup is happening,
leading to the theory that Orbit is attempting to launch the app as
`_mbsetupuser` rather than the real logged-in user. The fix here is to
use a different command to get the name of the logged-in user (ignoring
`_mbsetupuser` if it appears), and to launch the desktop app as that
user using `sudo`.

I have tested this on MacOS and Ubuntu hosts, and verified that the
desktop app launches as expected on both.

We don't have a solid reproduction scenario for the issue, but we do
have [some ways to look for relevant
errors](https://github.com/fleetdm/fleet/issues/19172#issuecomment-2627812786),
so we can try this out and see if those errors cease.
2025-03-20 09:49:23 -05:00
..
augeas fleetctl, API, copy updates around host identifiers (#20220) 2024-07-09 10:25:01 -07:00
bitlocker fix formatting of unrecognized BitLocker erorr (#21220) 2024-08-09 11:52:50 -03:00
build Add user agent to Orbit HTTP client (#5429) 2022-05-02 11:03:49 -07:00
constant Delete Fleet Desktop auth token when we detect a migrated host (#23658) 2024-11-09 23:35:49 -06:00
cryptoinfo Enable staticcheck Go linter. (#23487) 2024-11-05 11:16:24 -06:00
dataflatten Additional CA validation (#27169) 2025-03-19 08:27:55 -05:00
dialog add kdialog for kubuntu key escrow (#24405) 2024-12-05 08:44:16 -07:00
execuser Ensure MacOS desktop app launched as correct user (#27296) 2025-03-20 09:49:23 -05:00
go-paniclog Fix Fleet Desktop bugs on Windows (#16402) 2024-01-29 18:52:55 -03:00
insecure Make creation of http.Client uniform across the codebase (#3097) 2021-11-24 15:56:54 -05:00
installer Added more logging for troubleshooting of software package installation (#27291) 2025-03-20 11:09:57 -03:00
kdialog add kdialog for kubuntu key escrow (#24405) 2024-12-05 08:44:16 -07:00
keystore Add gosimple linter (#23250) 2024-10-29 14:17:51 -05:00
logging Reduce orbit logging when the server is down (#16968) 2024-02-21 15:36:15 -03:00
luks Working LUKS key escrow on non-english systems (#26474) 2025-02-21 11:42:44 -05:00
lvm Linux agent LVM volume detection on older Ubuntu versions (#24193) 2024-11-27 10:39:25 -07:00
migration fix: add missing comments 2024-08-15 19:00:47 -04:00
osquery Perform early restart before starting sub-systems and minor refactor of orbit sub-systems (#20610) 2024-07-19 12:44:43 -03:00
osservice 8009 fleet desktop icon duplication (#8017) 2022-10-13 10:58:37 -03:00
packaging Update wine to version 10, replace wine64 with wine (#25997) 2025-02-07 11:05:07 -05:00
platform Only allow once instance of fleet desktop at once (#25821) 2025-02-25 16:46:06 -05:00
process Fleetctl to package .app bundles for osquery (and changes for orbit to support them) (#4393) 2022-03-15 16:04:12 -03:00
profiles Additional CA validation (#27169) 2025-03-19 08:27:55 -05:00
scripts Add client-side logging for software installs, scripts, and setup experience (#26078) 2025-02-05 15:41:47 -06:00
setup_experience Add client-side logging for software installs, scripts, and setup experience (#26078) 2025-02-05 15:41:47 -06:00
swiftdialog Swiftdialog Closed method (#23024) 2024-11-12 15:52:46 -05:00
table Add update_url column to orbit_info (#25532) 2025-01-17 11:52:21 -03:00
token Fixing fleetd to NOT make unnecessary duplicate call to orbit/device_token endpoint. (#15543) 2023-12-10 17:00:24 -06:00
update Remove rollback to old TUF (#26081) 2025-02-06 08:17:03 -03:00
user Ensure MacOS desktop app launched as correct user (#27296) 2025-03-20 09:49:23 -05:00
useraction Catch signals for graceful fleet desktop exit (#23054) 2024-10-24 12:09:55 -04:00
windows Add Kolide osquery tables 2023-11-01 20:11:35 -06:00
zenity add kdialog for kubuntu key escrow (#24405) 2024-12-05 08:44:16 -07:00