fleet/pkg/open
Scott Gress c0742677f4
Remove XDG_CURRENT_DESKTOP env var when opening URLs on KDE (#32984)
for #31087 
for #32863

# Details

The [community PR](https://github.com/fleetdm/fleet/pull/30608) for
#31087 sets a number of new env vars to try and ensure that `xdg-open`
can correctly open URLs when called from our `open` package on linux.
However, it was discovered that the addition of the
`XDG_CURRENT_DESKTOP` env var actually broke `xdg-open` use on
environments using KDE Plasma (i.e. Kubuntu). After doing some testing I
determined that the best path forward was to just clear this env var
when KDE was detected, setting it back to the state that previous
versions of `fleet-desktop` have been in: that is, allowing `xdg-open`
to determine how to open links by other means.

# Checklist for submitter

## Testing

- [X] QA'd all new/changed functionality manually

## fleetd/orbit/Fleet Desktop

- [X] Verified compatibility 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] If the change applies to only one platform, confirmed that
`runtime.GOOS` is used as needed to isolate changes
- [ ] Verified that fleetd runs on macOS, Linux and Windows
- [ ] Verified auto-update works from the released version of component
to the new version (see [tools/tuf/test](../tools/tuf/test/README.md))
2025-09-15 11:53:38 -05:00
..
open.go Orbit: Add Fleet Desktop support to Windows (#4873) 2022-04-01 17:28:51 -03:00
open_darwin.go Orbit: Add Fleet Desktop support to Windows (#4873) 2022-04-01 17:28:51 -03:00
open_linux.go Remove XDG_CURRENT_DESKTOP env var when opening URLs on KDE (#32984) 2025-09-15 11:53:38 -05:00
open_windows.go Orbit: Add Fleet Desktop support to Windows (#4873) 2022-04-01 17:28:51 -03:00