Difference between revisions of "Deployment Platform/Shell Plugins"
(Created page with "== Summary == Plugins are pluggable Sugar Shell code. By design, plugins are not isolated from the rest of shell code and each other, thus, they are assumed to be setup by Su...") |
|||
Line 3: | Line 3: | ||
Plugins are pluggable Sugar Shell code. By design, plugins are not isolated from the rest of shell code and each other, thus, they are assumed to be setup by Sugar distributors or experienced users. | Plugins are pluggable Sugar Shell code. By design, plugins are not isolated from the rest of shell code and each other, thus, they are assumed to be setup by Sugar distributors or experienced users. | ||
− | Plugins are Python modules placed in one of the following (sorted by | + | Plugins are Python modules placed in one of the following (sorted by search order) directories. Only the first directory will be used in order to prevent unwanted code collisions between different installation level plugins. |
* {{Code|~/.sugar/''PROFILE''/plugins/''PLUGIN_NAME''}}, user-wide plugins. | * {{Code|~/.sugar/''PROFILE''/plugins/''PLUGIN_NAME''}}, user-wide plugins. | ||
* {{Code|''SHELL_INSTALL_PATH''/jarabe/plugins/''PLUGIN_NAME''}}, system-wide plugins; | * {{Code|''SHELL_INSTALL_PATH''/jarabe/plugins/''PLUGIN_NAME''}}, system-wide plugins; | ||
− | To be detected as a plugin | + | To be detected as a plugin source, a directory should conform to the following policies: |
− | * directory should be a regular Python module; | + | * The directory should be a regular Python module; |
− | * {{Code|__init__.py}} file from plugin directory should contain [https://git.sugarlabs.org/desktop/sugar/blobs/master/src/jarabe/plugins/README required declarations]. | + | * the {{Code|__init__.py}} file from plugin directory should contain [https://git.sugarlabs.org/desktop/sugar/blobs/master/src/jarabe/plugins/README these required declarations]. |
Use [https://git.sugarlabs.org/desktop/sugar-example-plugin sugar-example-plugin] sources as a template for new plugins. | Use [https://git.sugarlabs.org/desktop/sugar-example-plugin sugar-example-plugin] sources as a template for new plugins. | ||
− | After installing, plugins should be enabled from ''Plugins'' Control Panel in the Sugar Shell, or, if this | + | After installing, plugins should be enabled from the ''Plugins'' Control Panel in the Sugar Shell, or, if this section is [[#Configure_Shell_components|disabled]], add the plugin name to the {{Code|plugins}} setting in the [[Deployment_Platform/Client_Configuration|[shell]]] configuration section. If the plugin has a configuration UI, it will appear in the same ''Plugins'' section. |
== Existing plugins == | == Existing plugins == | ||
Line 25: | Line 25: | ||
* [http://git.sugarlabs.org/desktop/sugar-proxy-plugin proxy] from the {{Code|sugar-plugin-proxy}} package<br>Internet proxy configuration. | * [http://git.sugarlabs.org/desktop/sugar-proxy-plugin proxy] from the {{Code|sugar-plugin-proxy}} package<br>Internet proxy configuration. | ||
− | * [http://git.sugarlabs.org/desktop/sugar-plugin-stats stats] from the {{Code|sugar-plugin-stats}} package<br>Plugin collects [[Deployment_Platform/Usage_Statistics|usage statistics]] and | + | * [http://git.sugarlabs.org/desktop/sugar-plugin-stats stats] from the {{Code|sugar-plugin-stats}} package<br>Plugin collects [[Deployment_Platform/Usage_Statistics|usage statistics]] and uploads them to a Sugar Network node. |
Latest revision as of 12:38, 12 June 2013
Summary
Plugins are pluggable Sugar Shell code. By design, plugins are not isolated from the rest of shell code and each other, thus, they are assumed to be setup by Sugar distributors or experienced users.
Plugins are Python modules placed in one of the following (sorted by search order) directories. Only the first directory will be used in order to prevent unwanted code collisions between different installation level plugins.
~/.sugar/PROFILE/plugins/PLUGIN_NAME
, user-wide plugins.SHELL_INSTALL_PATH/jarabe/plugins/PLUGIN_NAME
, system-wide plugins;
To be detected as a plugin source, a directory should conform to the following policies:
- The directory should be a regular Python module;
- the
__init__.py
file from plugin directory should contain these required declarations.
Use sugar-example-plugin sources as a template for new plugins.
After installing, plugins should be enabled from the Plugins Control Panel in the Sugar Shell, or, if this section is disabled, add the plugin name to the plugins
setting in the [shell] configuration section. If the plugin has a configuration UI, it will appear in the same Plugins section.
Existing plugins
- telepathy from
sugar-plugin-telepathy
package
Alternative implementation of Neighborhood collaboration in Sugar Shell, which is assumed to make Telepathy related code more robust.
- sn from
sugar-plugin-sn
package
Plugin adds Sugar Network integration to the Sugar Shell.
- proxy from the
sugar-plugin-proxy
package
Internet proxy configuration.
- stats from the
sugar-plugin-stats
package
Plugin collects usage statistics and uploads them to a Sugar Network node.