Running Linux Applications Under Sugar

From Sugar Labs
Revision as of 11:25, 24 May 2008 by AuntiMame (talk | contribs)
Jump to navigation Jump to search

Note: This article is about running standard Linux applications inside Sugar by using the Activities icon panel rather than starting them from the Terminal.

Sugar Coating

Many standard Linux programs can be run within Sugar, but without the collaboration and other Sugar integration programmed into them. The process of adding an icon to the Sugar Activities panel is called "Sugar Coating".

A simple script to automate the process was created by a woman named CatMoran. The script:

  • has be confirmed to work with Firefox, Seamonkey, Midnight Commander, TuxType2, TuxPaint and Totem. It it presumed to work with many other Linux programs.
  • only works with programs that use the same command every time (i.e., a single command with no qualifiers). It doesn't work for roto's current mplayer configuration, because the mplayer command requires an input file name to start the program.

To setup (one time):

  1. Start a Terminal activity.
  2. Enter the following commands:
  3. su wget chmod 755 wget chmod 755 sug (What do those commands do? They log you in as root, gets a copy of Albert Cahalan's compiled libsugarize file, and gets the script CatMoran created.) Optional, if you want to use one of the icons CatMoran created: wget wget wget

To Run (once per program that you want to Sugar Coat):

  1. Locate an icon you want to use/reuse.
    • You can copy any .svg file located in /usr/share/activities/*.activity/activity/*.svg
    • Or you can use one of the icons CatMoran created--and downloaded using the wget commands listed above. plain.svg is a plain circle, ff.svg is a circle with the letters FF (for Firefox) inside, l.svg is a circle with the single letter L inside. Both of the latter files can be easily edited using any text editor and one or both character(s) changed. Each letter is in plain text just before the </tspan> tags, replace them and save the file.
  2. Enter the following commands, to log in as root and execute the sug script. T quit the script at any time, just enter nothing at the prompt and hit the Enter button.
  3. su ./sug First, you'll be prompted for an activity name. Enter a short, descriptive name with no spaces or punctuation, such as BibleTime, Firefox, or MC. Second, you'll be prompted for an icon file to copy into the new task. Enter the full path and filename of any .svg file. If the icon is in the same directory as the sug file, you can enter just the filename. Next, you'll be prompted for the command to start the program. This is the command you type at the Terminal prompt to start the program, such as firefox, totem, or mc. Finally, you'll be prompted for an organization path, such as org.mozilla If you don't know what this is, just enter org.x The script will give you a success message. Reboot Sugar by pressing Ctrl-Alt-Erase (the Control, Alt and Erase buttons) at the same time. When Sugar restarts you will now see the new icon in the Sugar taskbar. A simple click on the icon will start the newly Sugar Coated program, like any other Sugar Activity.

Sugar Coat Script Mirror Servers

Source -