Re: language/locale selector [was: Re: Settings downstream would reasonably want to add]



On Mon, 16.05.11 07:28, Ross Burton (ross burtonini com) wrote:

> 
> On 16 May 2011 00:09, Lennart Poettering <mztabzr 0pointer de> wrote:
> > Ah, very interesting. This is good to know. Interesting place though, in
> > connman.
> 
> Yeah, it is "interesting".  I discovered this because I'd floated the
> idea of a tiny TimeKit daemon, mainly to deal with setting the system
> timezone and emitting signals when it changes.  It's almost like we've
> all got the same problem. :)

I think the right place for tiny mini-daemons like that is probably
systemd. Since MeeGo is using that too this should be fine for you guys
too.

We already have a tiny daemon to deal with changing hostnames, and
pretty hostnames/icon names, while guaranteeing that it always stays
resolvable. My next steps are to fix locale and time/timezone like this
too.

> IIRC, the rationale was that connman is already doing a fair amount of
> time manipulation: it has a NTP client and can also (or will, can't
> recall) auto-set the timezone based on your geo-IP.  From that it's
> just a matter of allowing the user to manually set the timezone.

conmann also does geoloc? Is there something it doesn't do? Sounds
almost as crazy as systemd ;-) 

> Personally I'd hope that if a cross-desktop DBus interface was
> proposed, that connman would implement it as a wrapper.

Well, since you guys use systemd anyway, we might just ship it as
systemd component. But yeah, we probably need to get the story regarding
geoloc right before we do that.

> > Hmm, do you happen to know where connman stores the high-level timezone
> > name? i.e. "Europe/Berlin"? We'd like to standardize some place for this
> > in the systemd context, and I am currently figuring out if we can just
> > adopt an existing solution.
> 
> http://git.kernel.org/?p=network/connman/connman.git;a=blob;f=src/timezone.c;h=263ee4efe619e7f59a4844477131b09fb0e2cca1;hb=HEAD#l292
> 
> It takes the contents of the zoneinfo file and writes it to
> /etc/localtime.  It also reads /etc/sysconfig/clock at startup, but
> doesn't appear to write that file.  I can't seen where the name is
> written though.  This support is pretty new so might have some missing
> pieces.  Obviously for more details the connman list is the place to
> go.

Urks, so it seems to actively compare the /etc/localtime file with all
possible candidates. That's kinda evil.

I think it is time to introduce /etc/timezone or so which includes the
pretty name. Or maybe use a symlink for /etc/localtime, which would
allow us encode that info in the symlink path. And then write
/etc/timezone only for those crazyfolks who want to stick /usr on a
separate partition.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]