volatile config data and XDG Base Directory spec

Thomas Koch thomas at koch.ro
Mon Feb 24 08:39:06 PST 2014


On Monday, February 24, 2014 02:09:19 PM Kevin Krammer wrote:
> On Saturday, 2014-02-22, 22:14:50, Thomas Koch wrote:
> > On Wednesday, February 19, 2014 01:40:39 PM Simon McVittie wrote:
> > > On 18/02/14 23:53, Richard Hartmann wrote:
> > > 
> > > the difference between DATA and STATE appears to be "STATE doesn't
> > > contain much data, and doesn't need to be sync'd across machines". 
But
> > > surely if it's small, it doesn't matter if it gets sync'd across
> > > machines unnecessarily? If an application wants to store explicitly
> > > per-machine state, it can use the D-Bus/systemd machine ID as a key,
> > > like GNOME does for display settings (I know that's config rather than
> > > state, but the principle is the same).
> > 
> > Well, you're pinpointing it. Syncing window positions or recently opened
> > files across machines would lead to undesired behaviour because 
different
> > machines have different screen setups and differnt sets of files. You put
> > the burden on the application developer to distinguish between 
machines,
> > but that's unrealistic. The xdg-basedir-spec should rather help by
> > providing a directory for state information that makes sense only in the
> > context of this machine.
> 
> Sorry, slighly offtopic, but:
> 
> Window geometry is a rather bad example for a machine specific state, 
since
> it is screen setup specific.
> 
> Either application developers really want the burden of handling that
> themselves, in which case they need to track screen configurations 
somehow,
> or they do the sensible thing and let the workspace shell/window manager
> handle it for them.
> 
> My rather limited knowlegde around Wayland even suggests, that the latter
> will be the only option there anyway.
> 
> Cheers,
> Kevin

KDE is my posterchild example for saving window and a lot of other state in a 
config file. There is also some useful data in kmailrc that I'd like to keep 
when setting up a new machine. But most of the data is state:

cat ~/.kde/share/config/kmailrc | grep -A 5 Window 
ReaderWindowHeight=1334
SearchAndHeaderHeight=388
SearchAndHeaderWidth=1334
composer=523,1624

[HTML Settings]
--
[Main Window]
Height 1050=1048
Height 1600=500
Height 1680=1624
State=AAAA/wAAAAD9AAAAAAAABo4AAAO5AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAWAG0AYQBpAG4AVABvAG8AbABCAGEAcgEAAAAA/////wAAAAAAAAAA
ToolBarsMovable=Disabled
--
[Separate Reader Window]
Height 1050=1048
Height 1680=1624
State=AAAA/wAAAAD9AAAAAAAAAgsAAAX7AAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAEAAAAWAG0AYQBpAG4AVABvAG8AbABCAGEAcgEAAAAA/////wAAAAAAAAAA
ToolBarsMovable=Disabled
Width 1050=523


Regards, Thomas Koch


More information about the xdg mailing list