[Debian-olpc-devel] Should the sugar package provide the x-session-manager alternative?

Petter Reinholdtsen pere at hungry.com
Wed Apr 1 06:24:08 UTC 2009

One thing that occur to me when testing the Sugar environment in
Lenny, is that it need a better integration into the login and startup
process.  One way to do it, would be to let the sugar package provide
the x-session-manager alternative.  I've tested this by adding a
symlink from /usr/bin/x-session-manager to sugar, and with this change
I can log in using kdm and get suger started automatically.  I can
also run startx and get sugar started automatically.

Is there any reason not to let the sugar package provide an
x-session-manager alternative?

An alternative would be to provide the x-window-manager alternative
instead.  I guess it is a matter of taste which one of these fit sugar

Code like this would be needed in the postinst (the manpage part only
when a sugar.1 manual page is available):

  case "$1" in
        update-alternatives --install /usr/bin/x-session-manager \
          x-session-manager /usr/bin/sugar 20 \
          --slave /usr/share/man/man1/x-session-manager.1.gz \
          x-session-manager.1.gz "/usr/share/man/man1/sugar.1.gz"

and something like this in the prerm:

  case "$1" in
        /usr/sbin/update-alternatives --remove x-session-manager /usr/bin/sugar

PS: I am not on the list, please CC me.

Happy hacking,
Petter Reinholdtsen

More information about the Debian-olpc-devel mailing list