[sugar] Sharing data between activities.
Thu Aug 23 21:58:41 EDT 2007
Ivan Krsti? wrote:
> 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
>> 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
So the only writable common ground will be the datastore/journal? Isn't
that a bit harsh? I mean, we can assert that some places are write only,
and I know this whole home/my documents assumption is product of (bad)
habits created from years of using computers, and the XO is not targeted
for people like me. I know that there is a new usage paradigm on the
make here but shouldn't there be some kind of file based, invisible
unless searched specifically (not the journal) place for generic data,
Imagine I want to create an sqlite db. And I have interest in accessing
that from two separate activities. Is this an impossible task given the
security being implemented?
> 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
But Launchers are one thing so strongly opposed by many. You are
puzzling me, what is your opinion on having a Launcher frontend for
multiple activities (ignore the multiple things under the same activity
x multiple separate activities argument).
> Ivan Krsti? <krstic at solarsail.hcs.harvard.edu> | http://radian.org
cn at sueste.net
More information about the Sugar-devel