MCS design proposal

Jannis Pohlmann jannis at
Tue Mar 20 01:32:49 CET 2007

Hey all,

I have uploaded my thoughts about a new MCS design to

This topic has been on our list for quite some time but we never made
it to a design draft. So here are my ideas. Hopefully they will be
start of a productive discussion - I hereby encourage anyone to
participate in it.
I'll keep the .txt updated with relevant opinions. Here's the initial

Xfce MCS Design Proposal

The MCS daemon is a process running in the background. It manages all
settings inside a root path (like $XDG_CONFIG_DIRS/xfce4/). The settings
could be stored in many different ways, e.g.

  * one big XML file (not recommended, unflexible)

  * several XML files in subdirectories, e.g.


  * .desktop files in subdirectories, e.g.


Personally, I prefer the second solution as XML files give us the
possiblity to create property hierarchies.

In the MCS concept, applications and libraries are not able to read or
write settings on their own. They have to query the MCS daemon for this.
Using D-Bus, we could define the following interface:

  <interface name="org.xfce.MCS">
    <method name="Set">
      <arg name="channel" type="s" direction="in"/>
      <arg name="property" type="s" direction="in"/>
      <arg name="value" type="v" direction="in"/>
    <method name="Get">
      <arg name="channel" type="s" direction="in"/>
      <arg name="property" type="s" direction="in"/>
      <arg name="value" type="v" direction="out"/>
    <signal name="Changed">
      <arg name="channel" type="s"/>
      <arg name="property" type="s"/>
      <arg name="value" type="v"/>

In this interface, all clients can query the MCS for settings based
on a channel (or domain, e.g. "xfwm4") and a property name (e.g.
"focus/follows-mouse"). The value parameter is a GValue ('v' stands for
variant) which makes handling different value types (string, int,
float, boolean etc.) pretty easy.

The MCS daemon should probably also listen to XSETTINGS events. I have
no experiences with XSETTINGS, so I'm not exactly sure how this would
work though.

MCS clients may connect to the "Changed" signal of the org.xfce.MCS
interface in order to be informed of property changes. Properties may
change if a) some other client sets them or b) the properties file

Due to b) the MCS daemon also has to monitor all files for changes,
e.g. using FAM/Gamin.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the Xfce4-dev mailing list