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

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

Comments

Projects
None yet
4 participants

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 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.

Owner

jleclanche commented Oct 30, 2014

@gilir why use lxsession at this point?

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 commented Oct 31, 2014

FYI, it fails with both lxqt-session and lxsession

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 gilir removed the lxqt-session label Nov 17, 2014

@jleclanche jleclanche added the upstream label Feb 8, 2015

@jleclanche jleclanche added this to the 1.0.0 milestone Feb 8, 2015

@paulolieuthier paulolieuthier modified the milestones: 0.11, 0.10 Jun 14, 2015

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.

@paulolieuthier paulolieuthier modified the milestones: 0.12, 0.11 Jun 16, 2016

@palinek palinek referenced this issue in lxde/liblxqt Aug 23, 2016

Closed

Add XDG_CONFIG_DIRS support #104

Member

palinek commented Aug 23, 2016

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

Member

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?

Owner

paulolieuthier commented Sep 28, 2016

Let's close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment