[sugar] Update.1 activities download script
Bert Freudenberg
bert
Mon Mar 17 11:53:33 EDT 2008
On Mar 17, 2008, at 14:48 , Chris Hager wrote:
> Bert Freudenberg wrote:
>> ...
>>
>> To save download time, do something like this first:
>>
>> cp -a /usr/share/activities/*.activity /home/olpc/Activities
>
> Maybe only make symlinks?
>
> ln -s /usr/share/activities/*.activity /home/olpc/Activities/
Err, the point of my script is to download activities that are deleted
from /usr/share/activities once you upgrade to update.1-699 or later.
There are no more pre-installed activities (except for the Journal).
>> And finally, there is a trick in the script so it connects to the
>> current Sugar session even if run from the console or via ssh - may
>> be useful to somebody:
>>
>> if not 'SUGAR_PREFIX' in os.environ:
>> """Connect to running Sugar session"""
>> cp = ConfigParser()
>> cp.read(env.get_profile_path('session.info'))
>> os.environ['DBUS_SESSION_BUS_ADDRESS'] = cp.get('Session',
>> 'dbus_address')
>> dbus.set_default_main_loop(dbus.mainloop.NULL_MAIN_LOOP)
>
> Thanks a lot, this is really useful for me already! Maybe also put
> it somewhere in the wiki... [[Programming Tricks]] :)
I actually have no idea how evil that snippet really is ;) Wold be
nice if some Sugar/DBus expert could comment.
- Bert -
More information about the Sugar-devel
mailing list