fix(linux)!: use XDG spec for fetching Linux configuration directory #2034
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Makes Sunshine follow the XDG Base Directory specification when setting the configuration directory under Linux:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Additionally, following this change
$CONFIGURATION_DIRECTORY
will also be checked and used, if set. This is used by systemd services that explicitly specify aConfigurationDirectory=
option:https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#RuntimeDirectory=
This should have minimal to no impact on existing Sunshine instances, since users with
$XDG_CONFIG_HOME
set will typically have their Sunshine instance still look for files in$HOME/.config
.Existing Sunshine instances running under e.g a hand-made systemd service may have an unexpected configuration directory change, if they're using
ConfigurationDirectory=
, but I think this is a very niche use-case. Still labeling as a breaking change, just in case.Screenshot
N/A
Issues Fixed or Closed
N/A
Type of Change
.github/...
)Checklist
I thought of putting a link to the spec above my changes, but I didn't see anything like that elsewhere in the code.
N/A (?)
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.