[sugar] Sharing data between activities.

Ivan Krstić krstic
Thu Aug 23 21:42:20 EDT 2007

On Aug 23, 2007, at 7:20 PM, Carlos Neves wrote:
> This 'My Own Image' should not pose problems in the future, but the
> shared stuff in the activity will, because activities will no longer
> have access to other activity dirs, right?


> So, my solution would be to add some post installation script for the
> code sharing activity (that might end up being just a placeholder
> activity, always invisible) and have that create hard links on some
> ~olpc/.sugar/default/$(OUR_PREFIX} directory.
> Would this work?


> Can I assume the activities will have access to
> ~olpc/.sugar?


> Will they have write access to all of it or will there be
> another place to write files on the filesystem?

You'll get chrooted into a activity-specific path with a few writable  
and few immutable folders. You won't get a view of the FS outside of  

I think you're attempting to solve a non-problem, however. The  
activity installation system will take care of not downloading (and  
not storing) duplicate information, based on file hashes. Making  
three activities that all incorporate the same shared files is  
sufficient; the OS will make sure no space is being wasted by storing  
multiple copies. If you really want to manage things yourself, you'll  
need to package up all three activities as one activity whose  
frontend is the launcher.

Ivan Krsti? <krstic at solarsail.hcs.harvard.edu> | http://radian.org

More information about the Sugar-devel mailing list