Description
I have been evaluating LxQt in a VM for a possible future migration of my main pc to it.
I noticed a few pain points and started to investigate. Luckily the code is hosted on github and it's online viewer/browser does wonders into researching the codebase without needing to clone the repos locally.
I am also knowledgeable with Qt and C++ and I am willing to implement solutions if there is agreement to the direction.
Enough chit chat, let me write about what I noticed.
Expected Behavior
Settings from lxqt-config-appearance
should be applied consistently for Qt and Gtk apps. Settings should restore on session start.
Available mechanisms for realtime "settings change" signaling to running apps should be used effectively.
Current Behavior
Some options from lxqt-config-appearance
are applied inconsistently between Qt and Gtk. I can't remember all the stuff but I focused on the Font settings. All these settings are directly written to fontconfig files but they aren't saved into an lxqt config file.
Qt/Gtk apps seem to pick up the font family from fontconfig but not the DPI setting. They pickup the DPI settings if I shoehorn it into the config file of xsettingsd
. Same for Firefox.
For whatever reason, writing the gtk-xft-dpi setting into settings.ini
doesn't work for Gtk apps. Did Gtk deprecate it without notice?
For Qt apps, they can pickup a lot of those settings from the qplatformtheme
plugin. Even though lxqt-qtplugin has code to inform the Qt apps about the normal and fixed fonts, the variables are initialized from non-existent config settings (lxqt-config-appearance
writes the value only to fontconfig).
Currently, lxqt-config-appearance
runs xsettingsd
upon start with a temp file as config file. The temp file on each run has a random filename and is autoremoved when lxqt-config-appearance
is closed. The xsettingsd
deamon is also killed when lxqt-config-appearance
is closed. This presents problems because when the deamon dies the XSETTINGS get wiped out. New (gtk?) apps can't get info about many of the settings configured by lxqt-config-appearance
. It's common practice of all other DEs to have an xsettings deamon running.
Possible Solution
- All configurable settings should be written to lxqt specific config file first. From there they should be mirrored to their equivalent settings for Gtk* and system (fontconfig)*.
- Upon lxqt-session start it should start
xsettingsd
with a non-temp config file. Upon settings change it should SIGHUP the running deamon to pickup the new settings. - Maybe transfer the responsibility of the settings mirroring to lxqt-session?
- If step 3 is true, then should the session re-mirror the settings upon session start to ensure that they are synced with the saved lxqt settings?
- lxqt-qtplugin should read the settings from the lxqt specific config file.
- On Wayland I think gtk prioritizes the settings portal. What if xdg-desktop-portal-lxqt exposed the interface gtk expects and responded with the values saved in our own config file, without needing to fiddle with gsettings?
*Maybe we shouldn't fiddle with non-lxqt config files? What if we use xsettingds
and a settings portal to propagate settings to Gtk apps and lxqt-qtplugin to propagate settings to Qt apps? We avoid writing to gsettings/settings.ini/gtkrc and leave them vanilla for other DEs the user might be running concurrently.
This last thing is just a suggestion.
My main concern is about having an xsettings daemon running and what architecture changes are needed to do that.
As a secondary importance, some configurable settings aren't mirrored to their xsettings and gtk equivalents currently.
Steps to Reproduce (for bugs)
Context
System Information
- Distribution & Version: Endeavour OS
- Kernel: 6.6.44
- Qt Version: 6.7.2
- liblxqt Version: 2.0.0
- lxqt-build-tools Version:
- Package version: 2.0.0