mcs to xfconf migration

Erik Harrison erikharrison at gmail.com
Sun May 18 04:37:59 CEST 2008


On Fri, May 9, 2008 at 2:50 PM, Brian J. Tarricone <bjt23 at cornell.edu> wrote:
> Hey all,
>
> Over the past month or two, Stephan and I have been working to get
> Xfconf in shape for 4.6, and we're making some really good progress.
> I've started working on migrating settings from MCS to Xfconf, and I
> have a little bit of a dilemma as to how to make it all work.
>
> So far I have perl scripts (generally one per module; so xfdesktop would
> install one, xfwm4 would install another, etc.) that manually parse the
> MCS XML files (I think it's reasonable to require the XML::Parser perl
> module), and then use xfconf-query (our command-line tool to get and set
> Xfconf config properties) to migrate the settings.  This seems to work well.
>
> Of course, I don't want people to have to run these manually, and I
> don't want the individual modules to have to check on startup for
> $XDG_CONFIG_HOME/xfce4/mcs_settings/foo.xml every single time and
> possibly initiate migration.
>
> One option I thought of is to use the autostart mechanism.  Each module
> that installs a migration script can install an autostart file to the
> system autostart location.  On first run, the migration script will get
> run.  The last thing each script will do is copy the autostart file to
> that user's per-user autostart directory, but set Hidden=true in the
> copy so future startups cause the system-wide file to be ignored.
>
> This sounds decent to me, and avoids putting annoying migration code
> into the applications themselves (like we did for the xdg basedir
> migration for 4.2... code which I think we should remove for 4.6).  It's
> possibly a little faster to put the code in the apps, since all it has
> to do is a stat() to see if it should do the migration, whereas the
> session manager has to parse .desktop files on startup each time.  But I
> think the autostart method is a much cleaner way of doing it.
>
> Anybody have any thoughts?  A better way of doing it?

Severe hand waving since I just got back from vacation - can we make
Xfconf do the work? If the channel name and property name are the
same, just fetch from the old store? Applications would have to do
precisely dick, and we could reuse MCS code to parse the XML so no
additional dependencies required. No fuss, no muss from a user or a
developer POV.

Of course your message is over a week old, so perhaps this has already
been sufficiently addressed.

>
>        -brian
> _______________________________________________
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
> http://foo-projects.org/mailman/listinfo/xfce4-dev
>



-- 
Erik
"Look at me still talking when there is Science to do"



More information about the Xfce4-dev mailing list