fleet/orbit/pkg
Scott Gress 43e4207fef
Don't attempt to start fleet desktop if no user is logged in on Linux (#30261)
for #29942 

# Details

This PR addresses an issue on Linux where Orbit repeatedly attempts to
launch Fleet Desktop even though no GUI user is logged in. The fix is
similar to one implemented for MacOS, where we have Orbit check for the
presence of a real user (not a system user like `gdm` or `root`) before
trying to launch the desktop app.

Part of this work involved moving some functionality from the `execuser`
package to the `user` package, to avoid duplicating functionality.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
- [x] Manual QA for all new/changed functionality
- For Orbit and Fleet Desktop changes:
- [x] Make sure fleetd is compatible with the latest released version of
Fleet (see [Must
rule](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/workflows/fleetd-development-and-release-strategy.md)).
- [x] Orbit runs on macOS, Linux and Windows. Check if the orbit
feature/bugfix should only apply to one platform (`runtime.GOOS`).
- [x] Manual QA must be performed in the three main OSs, macOS, Windows
and Linux.
The changed code is only executed on Linux, so I tested on Ubuntu,
Fedora and Debian. Also verified that it still works on MacOS and
Windows.

---------

Co-authored-by: Lucas Manuel Rodriguez <lucas@fleetdm.com>
2025-06-27 08:41:13 -05:00
..
augeas fleetctl, API, copy updates around host identifiers (#20220) 2024-07-09 10:25:01 -07:00
bitlocker Fix Windows lint issues and enable linting on Windows (#28704) 2025-05-02 16:11:26 -04: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 Removed indicator for background LUKS validation (#28218) 2025-04-16 12:25:41 -04:00
execuser Don't attempt to start fleet desktop if no user is logged in on Linux (#30261) 2025-06-27 08:41:13 -05:00
go-paniclog Fix Windows lint issues and enable linting on Windows (#28704) 2025-05-02 16:11:26 -04:00
insecure Make creation of http.Client uniform across the codebase (#3097) 2021-11-24 15:56:54 -05:00
installer Split .tar.gz extraction into installer and TUF implementations to remove permissions checks on installer implementation (#28888) 2025-05-06 21:10:14 -05:00
kdialog Removed indicator for background LUKS validation (#28218) 2025-04-16 12:25:41 -04: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 Re-verify Linux disk encryption #26693 (#29034) 2025-05-22 16:15:26 -04: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 Adding optional parameter outfile to fleetctl package (#29579) 2025-06-12 10:25:40 -05:00
platform Fix Windows lint issues and enable linting on Windows (#28704) 2025-05-02 16:11:26 -04: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 Fix Windows lint issues and enable linting on Windows (#28704) 2025-05-02 16:11:26 -04:00
setup_experience Fixed setup experience UI hanging when a step is removed from the payload (#29385) 2025-05-22 14:58:17 -04:00
swiftdialog 28434 Setup experience reliability (#28931) 2025-05-08 14:05:31 -04:00
table DCLK: add mechanism to verify user-scoped profiles (#30110) 2025-06-25 09:51:43 -04: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 Revert "Always install Escrowbuddy and Swift Dialog (#28742)" (#29264) 2025-05-19 13:23:05 -04:00
user Don't attempt to start fleet desktop if no user is logged in on Linux (#30261) 2025-06-27 08:41:13 -05:00
useraction Fix [here] links in Go code (#29722) 2025-06-03 15:13:59 -06:00
windows Add Kolide osquery tables 2023-11-01 20:11:35 -06:00
zenity Removed indicator for background LUKS validation (#28218) 2025-04-16 12:25:41 -04:00