Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(linux)!: use XDG spec for fetching Linux configuration directory #2034

Conversation

rafaelsgirao
Copy link
Contributor

Description

Makes Sunshine follow the XDG Base Directory specification when setting the configuration directory under Linux:

$XDG_CONFIG_HOME defines the base directory relative to which user-specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.

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 a ConfigurationDirectory= 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
    I thought of putting a link to the spec above my changes, but I didn't see anything like that elsewhere in the code.
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components
    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.

  • I want maintainers to keep my branch updated

@CLAassistant
Copy link

CLAassistant commented Jan 17, 2024

CLA assistant check
All committers have signed the CLA.

@rafaelsgirao rafaelsgirao marked this pull request as ready for review January 17, 2024 15:28
@ReenigneArcher ReenigneArcher force-pushed the rafaelsgirao/linux-xdg-spec-config-dir branch from 1b753e4 to 4f02204 Compare January 19, 2024 02:02
@ReenigneArcher ReenigneArcher changed the title Use XDG spec for fetching Linux configuration directory fix!(linux): use XDG spec for fetching Linux configuration directory Jan 19, 2024
@ReenigneArcher ReenigneArcher changed the title fix!(linux): use XDG spec for fetching Linux configuration directory fix(linux)!: use XDG spec for fetching Linux configuration directory Jan 19, 2024
@ReenigneArcher ReenigneArcher merged commit 2e99535 into LizardByte:nightly Jan 19, 2024
42 checks passed
@rafaelsgirao rafaelsgirao deleted the rafaelsgirao/linux-xdg-spec-config-dir branch January 19, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants