[Sugar-devel] Odp: [Dextrose] activities on SD card, XO 1.0

Dominik Granada dgranada at frks.pl
Tue May 15 04:45:34 EDT 2012


Many thanks for advice we'll look into it.
DG
---------------- 

Dominik Granada
Prezes Zarządu
www.FRKS.pl

Tel.: 22 545 05 11
Fax.: 22 545 05 10
----- Wiadomość oryginalna ----- 

  Od: Bernie Innocenti 
  Do: Dominik Granada 
  DW: dextrose at lists.sugarlabs.org ; Sugar Devel 
  Wysłano: 15 maja 2012 02:49
  Temat: Re: [Dextrose] activities on SD card, XO 1.0


  [cc += sugar-devel]

  On Mon, 2012-05-14 at 12:47 +0200, Dominik Granada wrote:
  > 
  > Our problem is that this feature does not work with Dex2. SD card is
  > not being mounted on startup. Once the system is on it is enough to
  > take it out/in and it starts to work. Yet for kids at school we would
  > need that automatic at start up.
  >  
  > I would appreciate any hints...

  If all you need the SD for is adding extra activities, there might be an
  easier way: modify Sugar to add an extra lookup path for activities.

  The system directory for activities is hard-coded by configure into the
  variable "activities_path" of src/jarabe/config.py. In the rpm package
  of Sugar, this ends up in

   /usr/lib/python2.7/site-packages/jarabe/config.py

  If you're feeling a little braver, you could change bundleregistry.py to
  support a colon-separated list of paths:

  --- a/src/jarabe/model/bundleregistry.py
  +++ b/src/jarabe/model/bundleregistry.py
  @@ -61,7 +61,7 @@ class BundleRegistry(gobject.GObject):
           self._gio_monitors = []
   
           user_path = env.get_user_activities_path()
  -        for activity_dir in [user_path, config.activities_path]:
  +        for activity_dir in [user_path, config.activities_path.split(':')]:
               self._scan_directory(activity_dir)
               directory = gio.File(activity_dir)
               monitor = directory.monitor_directory()

  Proper support for activities on removable media would involve finding
  the callback where Sugar handles hotplug events for storage media and,
  if the filesystem contains a directory called Activities, add it
  dynamically to BundleRegistry.

  -- 
  Bernie Innocenti
  Sugar Labs Infrastructure Team
  http://wiki.sugarlabs.org/go/Infrastructure_Team


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20120515/ef00db05/attachment.html>


More information about the Sugar-devel mailing list