You are not logged in.
Pages: 1
I need to collect information from monitors. I found displays.xml where information about them is stored, but there are devices where the information is not updated for some reason (the old one is stored). Only opening xfce4-display-settings helps, only after that the file is overwritten, but then displayed in the GUI, which is very bad. How is it possible to resample with a command?
Offline
xfconf-query -c displays -lv
Xfce maintainer: https://gravatar.com/gaelbonithon
Offline
xfconf-query -c displays -lv
I don't need to display information, I can look at the path .config/xfce4/xfconf/../displays.xml. I need to update display.xml without the graphical interface, because it is not updated after reboot
Offline
Not sure what you mean, but anyway:
* xml files aren't necessarily up to date, as it's possible that xfconfd has cached information that it hasn't yet written (hence the use of xfconf-query instead of reading xml files directly);
* xfconfd is likely to overwrite the contents of these files at any time (especially when it exits following a SIGTERM signal), and is also likely to restart at any time if an application calls it via dbus.
So unless you modify the xml files outside an xfce session (and even then, having taken care to check that xfconfd is no longer running), the way to modify the settings stored in xfconf is to use xfconf-query (see xfconf-query --help).
Finally, to make changes made in xfconf active in xfsettingsd for displays, create the /Schemes/Apply property on the displays channel (xfsettingsd listens for these changes):
xfconf-query -c displays -p /Schemes/Apply -s Default --create --type string
Xfce maintainer: https://gravatar.com/gaelbonithon
Offline
Not sure what you mean, but anyway:
* xml files aren't necessarily up to date, as it's possible that xfconfd has cached information that it hasn't yet written (hence the use of xfconf-query instead of reading xml files directly);
* xfconfd is likely to overwrite the contents of these files at any time (especially when it exits following a SIGTERM signal), and is also likely to restart at any time if an application calls it via dbus.So unless you modify the xml files outside an xfce session (and even then, having taken care to check that xfconfd is no longer running), the way to modify the settings stored in xfconf is to use xfconf-query (see xfconf-query --help).
Finally, to make changes made in xfconf active in xfsettingsd for displays, create the /Schemes/Apply property on the displays channel (xfsettingsd listens for these changes):
xfconf-query -c displays -p /Schemes/Apply -s Default --create --type string
I will describe the situation more specifically in display.xml the information on monitors (monitor model) is displayed very well. This is important to me. But on some devices it is not possible to collect information correctly, because in display.xml there is information from 2021, the monitor has already changed 100%. I noticed that if I open xfce4-display-settings in the GUI, the information is updated in display.xml. I need to execute the command without the GUI so that nothing opens, but at the same time receive up-to-date information. I need a command in the console that updates this display.xml
Added later 08 min 07 s:
After turning off, turning on display.xml is not updated. Is it possible to implement what I described?
Offline
So what you have to do is do by hand what xfce4-display-settings does in the background:
* call xrandr to retrieve information from the monitor;
* call xfconf to finally update the xml file.
xfce4-display-settings does this in C via the APIs of the libxrandr and libxfconf libraries. I suppose the simplest thing to do in your case would be to write a script based on the xrandr and xfconf-query commands. Once you've finished, kill xfconfd and it will write the xml file. Unfortunately, it doesn't get much simpler than that: it's not magic...
Xfce maintainer: https://gravatar.com/gaelbonithon
Offline
Pages: 1
[ Generated in 0.010 seconds, 8 queries executed - Memory usage: 551.42 KiB (Peak: 552.27 KiB) ]