[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Adding new Activities via RPM



Hi,

   > There is some incantation to tell sugar to refresh the
   > activities. If we could put that in the rpm (or at least doco it)
   > it would make installing a much more pleasant activity.

I think there's a goal of making this just work via inotify or
something, so the answer may be "hang on a few weeks".  The way
that Sugar handles it when you download from the Sugar browser is:

   from sugar.bundle.activitybundle import ActivityBundle
   xo = "/filename/that/was/just/downloaded.xo"
   ActivityBundle(xo).install()

When an activity's installed in this way, a dbus message to add the
new activity to the the Sugar view is created, as I understand it.
For this to be done inside the RPM, we'd need to be:

   * running as the right user
   * with the right $DBUS_SESSION_BUS_ADDRESS envvar set and a
     connection to the session bus
   * and Sugar running at the time, of course

(So Greg's statement about the activities being in the user's homedir
isn't the right answer; it's that we tell Sugar about the new activity
directly, not that it knows to track changes to a directory.)

Given how much hassle it would be to satisfy the bullet points above,
letting the Sugar folks know that the inotify idea is something Fedora
would like soon is probably the best way forward.

Thanks!

- Chris.
-- 
Chris Ball   <cjb laptop org>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]