$SHARE/xfwm4/defaults

Svein Halvor Halvorsen svein-xfce at halvorsen.cc
Thu Jul 7 10:46:27 CEST 2005


* Olivier Fourdan [2005-07-06 21:50 +0200]
>  It's not the way it works actually. The name "defaults" is admittedly 
>  misleading, it's rather the data used as fall-back. The MCS plugin 
>  takes precedence over all other settings.

Then I honestly think that this behaviour is broken (regardless if it's by 
design). Xfce is far less viable as a windows manager and desktop 
environment for cases like mine, where one would like to deploy a 
site-wide default configuration for all users.


>  The default xfwm4 theme is defined in xfwm4/mcs-plugin/xfwm4_plugin.h
>  
>  [...]
>  #define DEFAULT_THEME "Default"
>  #define DEFAULT_KEY_THEME "Default"
>  #define DEFAULT_LAYOUT "OTS|HMC"
>  #define DEFAULT_ACTION "maximize"
>  #define DEFAULT_ALIGN "center"
>  #define DEFAULT_FONT "Sans 9"
>  [...]


So what exactly does the defaults file do? Only options that are not 
#define-ed would gets set through that file. Correct? If so; what options 
are not set by #define statements in the .h file?

The better way would IMHO most certainly to do it the other way around: 

1st) #define 
2nd) override by $SHARE/xfwm/defaults
3rd) override by $HOME/.config/xfce4/mcs_settings/

This would be more cinsistent with most other unix applications I know.
Or, to do this even more clean, to have the central files share the same 
format as the user's files, in step 2.


>  You have then 2 options
>  
>  1) Change the value in xfwm4_plugin.h, rebuild and reinstall 
>  2) Change the theme data in Default/xfwm4

And 

3) modify xinitrc to check for the existence of ~/.config/xfce4, and if it 
doesn't exist, populate that directory with files from say, 
/global/skel/xfce4 before starting xfce.

But this behaviour is broken, since I would later be unable in a clean way 
to change the defaults. It would be hard to check whether a user has 
changed her settings, or are still using the defaults.


>  I would personally be more in favour of the 2nd option because it makes
>  sense to keep the default in a directory, but your mileage may vary.

Thanks, I will probably go this way. We'd like to keep the installation as 
vanilla as possible, to not have too much custom code to maintain. We'd 
like to keep track of the config-files alone, if possible. In this regard, 
to overwrite the Default-dir is probably the best way.


>  The backdrop is defines in $HOME/.config/xfce4/mcs_settings/desktop.xml
>  
>  Same as xfwm4 MCS plugin, the default values are defined in
>  xfdesktop/common/xfdesktop-common.h:
>  
>  #define DEFAULT_BACKDROP  DATADIR "/xfce4/backdrops/xfce-smoke.png"

This is the same problem all over. And this one is even more likely to be 
wanted changed in a site-wide config. We'd like to have our department 
logo in there. 

Again; I'm not sure if the best way is to just overwrite the file (or 
symlink it to the real backdrop), or if we should populate the user's 
mcs_settings dir.

Is there any particular reason that xfce has been designes this way, or 
haven't this been an issue before? Do you think that my proposed behaviour 
could probably get into Xfce 4.4? That is: to make mcs-plugin look for 
files in some centrally stored dir, before overriding with the users own 
settings? And to also not save the users settings in his own home dir 
unless different from the default?

I'd REALLY like to see this.


>  Please let us know your project goes :)

I will!


I hope I wasn't too hard on my critics. I really like xfce (which is why 
we want to use it in the first place). I hope we can work out a way to use 
it in a clean way, though.



Best regards, 
Svein Halvor



More information about the Xfce mailing list