Difference between revisions of "Sugar"

From ArchWiki
Jump to navigation Jump to search
(Notes: fix)
(Add Python-pygame note)
Line 150: Line 150:
* I ''suggest'' that we prefix sugar activities packages in AUR with {{Codeline|sugar-activity-}}.
* I ''suggest'' that we prefix sugar activities packages in AUR with {{Codeline|sugar-activity-}}.
* You may need to install {{Codeline|python-pygame}} if activities do not start up.

Revision as of 01:45, 16 September 2011

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

A product of the OLPC initiative, Sugar is a Desktop Environment akin to KDE and GNOME, but geared towards children and education. If you have a young son, daughter, brother, sister, puppy or alien, the best way to introduce them to the world of Arch Linux is by deploying an Arch/Sugar platform and then forgetting about it.

But wait..where art thou, O Sugar?

That's right. To lead such a good life, you need at least some Sugar-related packages in at least AUR.

Sugar has a special Taxonomy to name the parts of its system. The desktop itself constitute the glucose group. This is the basic system an activity can reasonably expect to be present when installing Sugar. But to really use the environment, you need activities. Basic and sample activities are part of fructose. Then, sucrose is constituted by both Template:Codeline and Template:Codeline and represents what should be distributed as a basic sugar desktop environment. Note that Template:Codeline (the underlaying operating system) is here replaced by Arch.Template:Codeline (the extra activities) are not currently provided in AUR but can be installed as shown in the #Building section.

Getting started: Glucose

Building from AUR

Install sugar from the AUR.

Building a Bundle

This is a cool build system provided by the developers that allows one to download and build Sugar almost in its entirety. You will be told what you need, and of course, it will not help if what you need has not yet been packaged for us mighty Archers.

The resulting project can then be offered as a bundle. This method of building should not be encouraged, since it is not "modular". A likely analogy is the easy-e17 script, except that we are in the opposite situation whereby there are no modular packages and thus no group - yet. Adding the provision is a safety measure, .eg:

pkgdesc="The Sugar environment and applications built with jhbuild"
provides=('sugar-desktop') # as in provides=('e')

But as soon as someone uploads a component of the build/Sugar as a separate package, it must be part of the group (and the bundle package will automatically conflict), eg.:

pkgdesc="The Sugar environment toolkit"
groups=('sugar-desktop' 'sugar-desktop-base')

Note: It might be possible to use the new split functions of makepkg here, in which case it will end up as a modular build :)

Depedency tree

Below is the dependency tree of sugar 0.86

   |  |--libxklavier
   |  |--pygobject
   |  |--gtk2
      |  |--librsvg
      |     |--gtk2
      |     |--libcroco
      |  |--dbus-python
      |  |--xapian-python-bindings
      |  |--python-cjson
      |  |--sugar-base
      |     |--pygobject
      |     |--python-decorator
         |  |--pygobject
         |  |--python-decorator

Building a Modular Group

This is the more appropriate route to take. Here is the current list of noted dependencies, acquired by inspecting the build trees of distributions supported by Sugar (Gentoo in particular):

# Syntax: pkgname .. :-> location + comment1 + comment2 ..

espeak			 :-> [community]
squeak			 :-> [unsupported]
evince			 :-> [extra]
pyabiword		 :-> [unsupported]
python-cjson		 :-> [community]
python-telepathy	 :-> [community]
gstreamer0.10-espeak	 :-> [unsupported]
olpcsound		 :-> [unsupported]
telepathy-glib		 :-> [community]
xulrunner		 :-> [extra]
telepathy-gabble	 :-> [community]
telepathy-salut		 :-> [community]
hippo-canvas		 :-> [unsupported]



All Template:Codeline activities are available on the AUR. To install them, you may issue

yaourt sugar-activity

or equivalent and select the activities you want to install. Currently provided activities are



Template:Codeline is provided separately as it is part of glucose but also include the fructose activity. You may install it using

yaourt -S etoys

or an equivalent AUR helper.


Now you have a working Sugar environment, it is time to populate it with activities such as a browser, a calculator, an image viewer or games and toys. They almost all have the same building procedure, a Template:Filename that calls functions shipped with sugar. Below is a typical Template:Filename: Template:File You may need Template:Codeline to run some activities (like Template:Codeline).


  • Activity building procedure is not made for packaging and using Template:Codeline can be dangerous if the application uses this path internally. I think the correct way to do this would be to patch the installation procedure in Template:Codeline so it accepts an argument such as Template:Codeline.