i18n, olpc-configure and xorg.conf changes

Bernardo Innocenti bernie at codewiz.org
Wed Nov 7 16:24:22 EST 2007


Alexander M. Latham wrote:
> --- "Erik Blankinship" wrote:
> What is the secret to turning on reliable logs in Joyride?
> --- end of quote ---
> 
> For some reason the .xinitrc and .sugar.debug files are no longer
> in the /home/olpc directory. Were they moved, or is there a
> completely different way of turning up logging?

My bad for not advertising these changes before people stumbled
into them.

The old scheme *had* to be changed, because we were installing
system files such as .xinitrc in $HOME, thus preventing updates
from really updating them.  Moreover, we used to write to
several system files, which would require exceptional handling
in the update system and a few more of those horrible bind-mounts.

The new configuration scheme is implemented in olpc-utils (before,
it was scattered through initscripts, sugar and pilgrim).

The components are:

 * /etc/init.d/olpc-configure

  - As previously, it runs early at system boot to do some
    OLPC-specific initializations and the first-boot configuration.

  - For the first-boot configuration, it used to check for
    /.olpc-configured.  Now it uses /home/olpc/.olpc-configured
    instead.

  - olpc-configure used to rewrite /etc/sysconfig/i18n.  Now it
    writes language and keyboard settings to /home/olpc/.i18n,
    overridable by users.

  - I switched to specify XKB keyboards with the "layout(variant)"
    syntax because it's more intuitive when you have two or more
    layouts than the separate layout/variant keys.  The old
    syntax is still supported.

  - For MP machines, I'll set the keyboard directly from mfg
    data, without a hardcoded table to map KA tags to X11
    keyboars.

  - The Linux console keyboard is still not being set accordingly.
    Not sure if we really want to do it.  Power users can run
    loadkeys themselves if they really want to.


 * /etc/X11/xorg.conf

   - This file is *no longer* hacked by olpc-configure

   - actually, xorg.conf is not even a file: olpc-configure
     creates a symlink to one of two possible configuration
     files, which are read-only and can be upgraded normally

   - We still handle some differences between Geode+DCON and
     emulators.  I'd like to get X to autodetect these things
     better so we could kill off the configuration files
     altogether.

   - we're missing a way to allow user customizations in
     xorg.conf.  In the future, I could make olpc-dm check for
     /home/olpc/.xorg.conf and use it if present.
     But frankly, customizing xorg.conf is for power users who
     may also want to customize other /etc entries.  So if we
     really want to support these use cases, we'd be better off
     finding a generic way to preserve user customizations.


 * /usr/bin/olpc-dm

   - This is our "display manager".  A streamlined version of
     what gdm and kdm are.  So streamlined that it doesn't even
     have a UI.  In the future, it could be extented to support
     multiple users, XDMCP and other fancy things.  That day,
     I hope to be at a safe distance.

   - olpc-dm still spawns X and the session through startx
     and xinit.  I'm planning to through them away shortly.
     This will also allow us to do something smarter than
     sysvinit's once/respawn modes for restarting X.

   - olpc-dm still hogs the console and dies when you hit ^C.
     the fix is not a one-liner, and it's not a critical bug,
     but I'm planning to fix it some day.


 * /usr/bin/olpc-session

   - This script replaces /home/olpc/.xinitrc .  It sources
     /home/olpc/.i18n for $LANG, $XKB_LAYOUT and, optionally,
     $XKB_VARIANT.

   - olpc-session also replaces /usr/bin/sugar, which will
     shortly go away, thus simplifying our boot process even more.


 * /home/olpc/.xsession

  - This is an "extensibility hook" for customizing your session.
    It gets sourced near the end of /usr/bin/olpc-session.
    A default is provided as .xsession-example, with some tips
    you may want to review.

  - This file also replaces the /home/olpc/.sugar.debug


The latest version of olpc-utils fixes a couple of important
gotchas.  Please don't report bugs until you have

 - updated to latest joyride (later than this mail)

 - removed /home/olpc/.olpc-configured

 - rebooted (really, not just CTRL-ALT-BS!)

-- 
 \___/
 |___|   Bernardo Innocenti - http://www.codewiz.org/
  \___\  One Laptop Per Child - http://www.laptop.org/



More information about the Devel mailing list