<div dir="ltr"><div>Hi Graeme and all,</div><div><br></div><div>My first thought is to recommend migrating to gsettings. It is one of the few gnome projects, which does not have gnome-specific stuff hardcoded. However, my thinking was motivated by the fact that xfconf had no way of overwriting by the packagers and now just discovered that this is false, and this email turned into a little wake-up call to the distro packagers. ;)<br></div><div><br></div><div>Well, xfconf respects the XDG standard and by default uses $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/* for user settings, and /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/* for default values. It basically takes the values of the environment variable XDG_CONFIG_DIRS.</div><div>So, <span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><span>the way to modify the default options is to add a specific directory (/etc/xfce-vendors? /usr/share/xdg?, I don't know. It will depend on each distribution), to XDG_CONFIG_DIRS environment variable (Just a bash file on /etc/profile.d/ that sets it), and then just add the *.xml files in that directory.<br></span></span></span></div><div><br></div><div>It would also be easy to add a patch in xfconf, to add an alternate default folder, but I think the current behavior is fine, it was just unknown.<br><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><span></span></span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><span><br></span></span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><span>Xubuntu seems to do something like this, but Fedora and Debian add patches to change the default options. I don't know other distributions.<br></span></span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><span><br></span></span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><span>So, IMHO obviously, I think we should promote the use of XDG_CONFIG_DIRS and that distributions use it instead of patching applications. =)<br><br></span></span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><span>Thank you for reading,<br></span></span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><span>Regards,<br></span></span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><span>Matias<br></span></span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><span><br></span></span></span></div><div><br><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><span></span></span></span></div><div><span class="gmail-VIiyi" lang="en"><span class="gmail-JLqJ4b gmail-ChMk0b"><span><br></span></span></span></div><div><br><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El jue, 21 oct 2021 a las 11:24, Graeme Gott (<<a href="mailto:graeme@gottcode.org">graeme@gottcode.org</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I am considering switching Whisker Menu to Xfconf, but one thing I have <br>
not been able to determine: can panel plugins have general system values?<br>
<br>
The simplest way I could find to set system values for a panel plugin in <br>
Xfconf was to put values under a property with name="plugin-$ID" in the <br>
file "/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml". But <br>
that is obviously linked to a specific panel plugin ID, and there isn't <br>
a way to predict what the plugin ID will be. It also won't work if the <br>
user adds more than one instance.<br>
<br>
The method I settled on instead is a bit of a hack; have a separate <br>
channel other than the xfce4-panel channel that all plugins use. Use <br>
this separate channel only for loading the system values at plugin <br>
start, then disconnect from it and connect to the regular xfce4-pannel <br>
channel instead. This wouldn't detect any changes to the system values <br>
until plugin restart, but those are usually set up once at install time.<br>
<br>
This separate channel would be used by distributions to preconfigure <br>
Whisker Menu instances. That is better than making them patch Whisker <br>
Menu to change the default values, which is what they did before I added <br>
support for the "defaults.rc" file.<br>
<br>
I suppose I could just keep loading the file "defaults.rc" before <br>
anything else. The code for reading from RC files would have to stay <br>
around indefinitely anyway for migrating users to Xfconf, but it just <br>
feels cleaner if I can use Xfconf for both the user settings and the <br>
system values. Especially when I add new settings--I would want them to <br>
be only in Xfconf.<br>
<br>
I want to make sure that I'm not missing something and that the separate <br>
channel is actually necessary.<br>
<br>
Cheers,<br>
Graeme<br>
_______________________________________________<br>
Xfce4-dev mailing list<br>
<a href="mailto:Xfce4-dev@xfce.org" target="_blank">Xfce4-dev@xfce.org</a><br>
<a href="https://mail.xfce.org/mailman/listinfo/xfce4-dev" rel="noreferrer" target="_blank">https://mail.xfce.org/mailman/listinfo/xfce4-dev</a></blockquote></div>