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

XDG_CONFIG_HOME is not respected #6029

Closed
eukara opened this issue Jan 10, 2023 · 5 comments
Closed

XDG_CONFIG_HOME is not respected #6029

eukara opened this issue Jan 10, 2023 · 5 comments
Labels
bug A bug (error) in the software client good first issue Good for first-time contributors

Comments

@eukara
Copy link

eukara commented Jan 10, 2023

Description

Currently the Mumble client hard-codes the location of the Mumble config directory to be located at ~/.config/mumble when it should read the XDG_CONFIG_HOME environment instead.

datapaths << QDir::homePath() + QLatin1String("/.config/Mumble");

Steps to reproduce

  1. Changing XDG_CONFIG_HOME and move ~/.config to set location.
  2. Launch Mumble client.
  3. Mumble will give an alert about the database file being missing.

Mumble version

1.4.0

Mumble component

Client

OS

Linux

Reproducible?

Yes

Additional information

No response

Relevant log output

No response

Screenshots

No response

@eukara eukara added bug A bug (error) in the software triage This issue is waiting to be triaged by one of the project members labels Jan 10, 2023
@Krzmbrzl Krzmbrzl added client good first issue Good for first-time contributors and removed triage This issue is waiting to be triaged by one of the project members labels Jan 11, 2023
@supersanban
Copy link

Hi, I wanted to contribute to resolving this issue and hence have raised a PR for this. Could you take a look at the PR please. Thank you.

supersanban added a commit to supersanban/mumble that referenced this issue Aug 5, 2023
Config directory path in Linux should be picked from XDG_CONFIG_HOME environment variable. Fixes mumble-voip#6029
@eukara
Copy link
Author

eukara commented Aug 5, 2023

Thank you, I left a comment on the PR commit in question with some feedback.

supersanban added a commit to supersanban/mumble that referenced this issue Aug 5, 2023
Config directory path in Linux should be picked from XDG_CONFIG_HOME environment variable. Fixes mumble-voip#6029
supersanban added a commit to supersanban/mumble that referenced this issue Aug 7, 2023
Config directory path in Linux should be picked from XDG_CONFIG_HOME environment variable

Fixes mumble-voip#6029
supersanban added a commit to supersanban/mumble that referenced this issue Aug 7, 2023
Config directory path in Linux should be picked from XDG_CONFIG_HOME environment variable

Fixes mumble-voip#6029
@Krzmbrzl
Copy link
Member

Krzmbrzl commented Aug 7, 2023

No need to comment here - I get notifications for anything that happens in the PR anyway

supersanban added a commit to supersanban/mumble that referenced this issue Aug 7, 2023
Config directory path in Linux should be picked from XDG_CONFIG_HOME environment variable

Fixes mumble-voip#6029
@Hartmnt
Copy link
Member

Hartmnt commented Jun 6, 2024

Ok, so I investigated this issue again. Mumble (at least the most recent versions) are respecting XDG_CONFIG_HOME for the mumble-settings.json config file and XDG_DATA_HOME for the Mumble SQLite DB, which is apparently not considered configuration, but rather data.

The respective code parts are:

SQLite DB:

qdBasePath.setPath(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation));

Config files:

mumble/src/mumble/Settings.cpp

Lines 1312 to 1314 in a32229f

chosenPath = QString::fromLatin1("%1/%2")
.arg(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation))
.arg(settingsFileNames[0]);

The code OP posted originally is part of the fallback chain for legacy locations. These are prioritized in order from top to bottom and if a database is found at those locations, that will be used instead.

The reason why OP ran into an issue is probably because they did not migrate XDG_DATA_PATH when they moved their home directory.

The only issue remaining here is that some of the QStandardPaths that we use as part of the fallback chain are deprecated in Qt5 and removed in Qt6 which has to be addressed at some point

@Hartmnt
Copy link
Member

Hartmnt commented Jun 6, 2024

See #6459

@Hartmnt Hartmnt closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug (error) in the software client good first issue Good for first-time contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants