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

lxqt doesn't read the correct settings for multiple XDG_CONFIG_DIRS #349

Closed
gilir opened this issue Oct 29, 2014 · 10 comments
Closed

lxqt doesn't read the correct settings for multiple XDG_CONFIG_DIRS #349

gilir opened this issue Oct 29, 2014 · 10 comments
Labels
Projects
Milestone

Comments

@gilir
Copy link

gilir commented Oct 29, 2014

lxqt always read the settings from /etc/xdg/lxqt, even if others directories are set on XDG_CONFIG_DIRS

For example, on Lubuntu, we have :
XDG_CONFIG_DIRS=/etc/xdg/lubuntu:/etc/xdg/xdg-QLubuntu:/etc/xdg
Custom settings on /etc/xdg/lubuntu/lxqt
lxqt default settings on /etc/xdg/lxqt

On a fresh start, the settings on /etc/xdg/lxqt are set, instead of /etc/xdg/lubuntu/lxqt

One weird note, pcmanfm-qt works, but we have :
XDG_CONFIG_DIRS=/etc/xdg/lubuntu:/etc/xdg/xdg-QLubuntu:/etc/xdg
Custom settings on /etc/xdg/lubuntu/pcmanfm-qt
No default settings on /etc/xdg/pcmanfm-qt

Maybe it's the last directory (with a content) on XDG_CONFIG_DIRS which is set, instead of the first one ?

@gilir
Copy link
Author

gilir commented Oct 30, 2014

Just to mention that I use lxsession, not lxqt-session. However, I think it's the applications themself (or qtxdg, or xdg directories management by qt) which doesn't pick the good directory, the problem seems to be deeper. The session manager does its job by setting correctly the env variable.

@jleclanche
Copy link
Member

@gilir why use lxsession at this point?

@gilir
Copy link
Author

gilir commented Oct 30, 2014

Why not ? And unless lxqt-session is responsable for loading the settings for all the lxqt components, it's not really the point.
A few more testing :

  • Removing lxqt-common (and so /etc/xdg/lxqt), lxqt fail to fallback to /etc/xdg/lubuntu/lxqt
  • Running use-qtxdg (the example in libqtxdg source code) with XdgDirs::configDir() list the correct 3 entries in XDG_CONFIG_DIR, in the right order

@gilir
Copy link
Author

gilir commented Oct 31, 2014

FYI, it fails with both lxqt-session and lxsession

@gilir
Copy link
Author

gilir commented Nov 17, 2014

The problem is in liblxqt. It uses QSettings which doesn't use values in XDG_CONFIG_DIR. See the QSettings documentation : http://qt-project.org/doc/qt-5/qsettings.html#locations-where-application-settings-are-stored . Only /etc/xdg is used, and in lxqtsettings.cpp, XdgDirs::configDirs is never used.

I see 2 solutions :

  • Do another implementtaion of QSettings which use XdgDirs::configDirs
  • Iterate in XdgDirs::configDirs and call QSettings when the first settings file is found.

@gilir
Copy link
Author

gilir commented Nov 17, 2014

See also this qt bug : https://bugreports.qt.io/browse/QTBUG-34919

@gilir
Copy link
Author

gilir commented May 14, 2016

To add more information on this, according to : https://github.com/NixOS/nixpkgs/pull/7525/files, QSettings itself has the problem, and the patch "fix" it.

@palinek
Copy link
Contributor

palinek commented Aug 23, 2016

Have a look on the lxqt/liblxqt#104 ...

@palinek
Copy link
Contributor

palinek commented Sep 28, 2016

The Qt patches bringing correct support for XDG_CONFIG_DIRS to QSettings were merged (qt/qtbase@ee35fbb, qt/qtbase@4758555).

So I'd like to close this. Does anyone insist to leave this issue open?

@paulolieuthier
Copy link
Contributor

Let's close it.

@agaida agaida added this to Archive in Issues Aug 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Issues
  
Translations and L10N
Development

No branches or pull requests

4 participants