Sugar Control Panel: Difference between revisions

From OLPC
Jump to navigation Jump to search
Line 384: Line 384:
|-
|-
| valign="top"|
| valign="top"|
[[Image:Cp_start_panel_1.png|200px|thumb|center|a) start the control panel in the freeform view]]
[[Image:Cp_start_panel_1.png|300px|thumb|center|a) start the control panel in the freeform view]]
| valign="top"|
| valign="top"|
[[Image:Cp_start_panel_2.png|200px|thumb|center|b) start the control panel in the ring view]]
[[Image:Cp_start_panel_2.png|300px|thumb|center|b) start the control panel in the ring view]]
|-
|-
|}
|}
Line 396: Line 396:
|-
|-
| valign="top"|
| valign="top"|
[[Image:Cp_panel_started.png|200px|thumb|center|c) The main page with the available sections.]]
[[Image:Cp_panel_started.png|300px|thumb|center|c) The main page with the available sections.]]
| valign="top"|
| valign="top"|
[[Image:Cp_about_me.png|200px|thumb|center|d) The 'About Me' section containing an option to change the nick name and the color of the XO]]
[[Image:Cp_about_me.png|300px|thumb|center|d) The 'About Me' section containing an option to change the nick name and the color of the XO]]
|-
|-
|}
|}
Line 407: Line 407:
|-
|-
| valign="top"|
| valign="top"|
[[Image:Cp_search.png|200px|thumb|center|e) Search for the string 'about'. All the options except the 'About Me' and 'About my XO' are greyed out.]]
[[Image:Cp_search.png|300px|thumb|center|e) Search for the string 'about'. All the options except the 'About Me' and 'About my XO' are greyed out.]]
| valign="top"|
| valign="top"|
[[Image:Cp_search_2.png|200px|thumb|center|f) Search for the string 'fra'. All the options except the 'Frame' are greyed out.]]
[[Image:Cp_search_2.png|300px|thumb|center|f) Search for the string 'fra'. All the options except the 'Frame' are greyed out.]]
|-
|-
|}
|}
Line 422: Line 422:
|-
|-
| valign="top"|
| valign="top"|
[[Image:Cp_about_me_cancel.png|200px|thumb|center|g) Cancel a change]]
[[Image:Cp_about_me_cancel.png|300px|thumb|center|g) Cancel a change]]
|-
|-
|}
|}
Line 434: Line 434:
|-
|-
| valign="top"|
| valign="top"|
[[Image:Cp_about_me_changed.png|200px|thumb|center|h) Inline alert when you change the nick name.]]
[[Image:Cp_about_me_changed.png|300px|thumb|center|h) Inline alert when you change the nick name.]]
| valign="top"|
| valign="top"|
[[Image:Cp_about_me_alert.png|200px|thumb|center|i) restart alert]]
[[Image:Cp_about_me_alert.png|300px|thumb|center|i) restart alert]]
|-
|-
|}
|}
Line 444: Line 444:
|-
|-
| valign="top"|
| valign="top"|
[[Image:Cp_about_me_valid_name.png|200px|thumb|center|b) Inline alert when the nick name is empty. Note that the 'Ok' button is inactive in that case.]]
[[Image:Cp_about_me_valid_name.png|300px|thumb|center|b) Inline alert when the nick name is empty. Note that the 'Ok' button is inactive in that case.]]
|-
|-
|}
|}

Revision as of 11:36, 18 July 2008

  This page is monitored by the OLPC team.


A control panel will be used to set user preferences like nickname or color on the XO. At the moment this will be a command-line tool in which you can access the settings. The requirements for the panel are listed here. The bold ones are those that have been implemented for the command line version of the panel. The following section will describe how to use the sugar-control-panel on the XO.

Usage

Open the Terminal activity and type the following command to display the help information for the control panel.

sugar-control-panel -h

Will display:

Usage: sugar-control-panel [ option ] key [ args ... ] 
   Control for the sugar environment. 
   Options: 
   -h           show this help message and exit 
   -l           list all the available options 
   -h key       show information about this key 
   -g key       get the current value of the key 
   -s key       set the current value for the key 

The control panel tries to be as self-explanatory as possible. We will go through a typical scenario to show the basic usage. We want to set the jabber server on the XO in order to do testing with an sugar-jhbuild instance. To list all the available commands, do:

sugar-control-panel -l

At the moment this will give you something like this:

[erikos@localhost sugar]$ sugar-control-panel -l
color
jabber
language
nick
radio
timezone

To display what the current value of a key is, use the -g option:

[erikos@localhost sugar]$ sugar-control-panel -g jabber
jabber.laptop.org

If you are not sure what to set, you can use the -h option for each key to display the help for a command:

[erikos@localhost sugar]$ sugar-control-panel -h jabber
Set the jabber server
    server : e.g. 'olpc.collabora.co.uk'

To change the jabber server, use the -s option.

[erikos@localhost sugar]$ sugar-control-panel -s jabber olpc.collabora.co.uk
To apply your changes you have to restart sugar.
Hit at the same time ctrl+alt+erase on the keyboard to do this.

Some of the options require restarting Sugar.

Colors

Usage:

sugar-control-panel -s color strokecolor fillcolor [strokequalifier [fillqualifier]]

Examples:

sugar-control-panel -s color red blue

o

sugar-control-panel -s color red blue dark

o

sugar-control-panel -s color purple yellow light medium

(Una tabla con los íconos de la XO en todas las combinaciones de colores en Media:Buddy-Icon-Color-Matrix.pdf. Una ampliación del 310% llenará la pantalla de la XO con las imágenes de los íconos. A shade difference between the optional stroke and fill qualifiers is enforced by code. It is possible that some stroke/fill pairs in the table may be disallowed. It is easy to see the low contrast color pairs in the Buddy Icon Color Matrix.)

Base colors

  • Red
  • Orange
  • Yellow
  • Brown - may not work
  • Blue
  • Purple
  • Green - not listed as a color option, but it works

Shades

  • Dark
  • Medium
  • Light

Nickname

Usage is:

sugar-control-panel -s nick "Katie"

(type the "new name" that you want after the word nick)

Languages

Usage is: (do not run as root)

sugar-control-panel -s language yourlanguage

e.g.

sugar-control-panel -s language Spanish/Peru

To get the current language do:

sugar-control-panel -g language

Note you may encounter problems with unsupported languages; only a few are currently present in Ship.2 (English and Spanish), with many more coming in Update 1 (you can see progress on translations to languages at our Pootle translation service. Not all of these languages will be available in Update.1. You can help yourself and OLPC by helping with localization for your favorite languages.

If you get into trouble, to recover, type:

  • Ctrl-Alt-F1 or Ctrl-Alt-F2 (F1 is the mesh-key and F2 the friends-key)
  • login as root (on an Update.1 build this is only hitting enter). Then type the commands:
  • su olpc
  • export SUGAR_PATH=/usr/share/sugar
  • sugar-control-panel -s language English/USA
  • switch back to the console which runs sugar Ctrl-Alt-F3 (F3 is the home-key)
  • restart the X server Ctrl-Alt-erase

If you do not find your language in the list below but want to start to translate for a specific language or just try things out you can set the locale by editing the ~olpc/.i18n config file which is in the home directory. This is what the sugar-control-panel does as well. Don't forget to restart sugar after you are done.

The list of languages include at this writing:

You can get this list on your XO with the following command:

sugar-control-panel -h language
  • 'Afrikaans/South_Africa': 'af_ZA',
  • 'Albanian': 'sq_AL.UTF-8',
  • 'Arabic/Algeria': 'ar_DZ.UTF-8',
  • 'Arabic/Bahrain': 'ar_BH.UTF-8',
  • 'Arabic/Egypt': 'ar_EG.UTF-8',
  • 'Arabic/India': 'ar_IN.UTF-8',
  • 'Arabic/Iraq': 'ar_IQ.UTF-8',
  • 'Arabic/Jordan': 'ar_JO.UTF-8',
  • 'Arabic/Kuwait': 'ar_KW.UTF-8',
  • 'Arabic/Lebanon': 'ar_LB.UTF-8',
  • 'Arabic/Libyan_Arab_Jamahiriya': 'ar_LY.UTF-8',
  • 'Arabic/Morocco': 'ar_MA.UTF-8',
  • 'Arabic/Oman': 'ar_OM.UTF-8',
  • 'Arabic/Qatar': 'ar_QA.UTF-8',
  • 'Arabic/Saudi_Arabia': 'ar_SA.UTF-8',
  • 'Arabic/Sudan': 'ar_SD.UTF-8',
  • 'Arabic/Syrian_Arab_Republic': 'ar_SY.UTF-8',
  • 'Arabic/Tunisia': 'ar_TN.UTF-8',
  • 'Arabic/United_Arab_Emirates': 'ar_AE.UTF-8',
  • 'Arabic/Yemen': 'ar_YE.UTF-8',
  • 'Basque/Spain': 'eu_ES.UTF-8',
  • 'Belarusian': 'be_BY.UTF-8',
  • 'Bengali/BD': 'bn_BD.UTF-8',
  • 'Bengali/India': 'bn_IN.UTF-8',
  • 'Bosnian/Bosnia_and_Herzegowina': 'bs_BA',
  • 'Breton/France': 'br_FR',
  • 'Bulgarian': 'bg_BG.UTF-8',
  • 'Catalan/Spain': 'ca_ES.UTF-8',
  • 'Chinese/Hong_Kong': 'zh_HK.UTF-8',
  • 'Chinese/P.R._of_China': 'zh_CN.UTF-8',
  • 'Chinese/Taiwan': 'zh_TW.UTF-8',
  • 'Cornish/Britain': 'kw_GB.UTF-8',
  • 'Croatian': 'hr_HR.UTF-8',
  • 'Czech': 'cs_CZ.UTF-8',
  • 'Danish': 'da_DK.UTF-8',
  • 'Dutch/Belgium': 'nl_BE.UTF-8',
  • 'Dutch/Netherlands': 'nl_NL.UTF-8',
  • 'English/Australia': 'en_AU.UTF-8',
  • 'English/Botswana': 'en_BW.UTF-8',
  • 'English/Canada': 'en_CA.UTF-8',
  • 'English/Denmark': 'en_DK.UTF-8',
  • 'English/Great_Britain': 'en_GB.UTF-8',
  • 'English/Hong_Kong': 'en_HK.UTF-8',
  • 'English/India': 'en_IN.UTF-8',
  • 'English/Ireland': 'en_IE.UTF-8',
  • 'English/New_Zealand': 'en_NZ.UTF-8',
  • 'English/Philippines': 'en_PH.UTF-8',
  • 'English/Singapore': 'en_SG.UTF-8',
  • 'English/South_Africa': 'en_ZA.UTF-8',
  • 'English/USA': 'en_US.UTF-8',
  • 'English/Zimbabwe': 'en_ZW.UTF-8',
  • 'Estonian': 'et_EE.UTF-8',
  • 'Faroese/Faroe_Islands': 'fo_FO.UTF-8',
  • 'Finnish': 'fi_FI.UTF-8',
  • 'French/Belgium': 'fr_BE.UTF-8',
  • 'French/Canada': 'fr_CA.UTF-8',
  • 'French/France': 'fr_FR.UTF-8',
  • 'French/Luxemburg': 'fr_LU.UTF-8',
  • 'French/Switzerland': 'fr_CH.UTF-8',
  • 'Galician/Spain': 'gl_ES.UTF-8',
  • 'German/Austria': 'de_AT.UTF-8',
  • 'German/Belgium': 'de_BE.UTF-8',
  • 'German/Germany': 'de_DE.UTF-8',
  • 'German/Luxemburg': 'de_LU.UTF-8',
  • 'German/Switzerland': 'de_CH.UTF-8',
  • 'Greek': 'el_GR.UTF-8',
  • 'Greenlandic/Greenland': 'kl_GL.UTF-8',
  • 'Gujarati/India': 'gu_IN.UTF-8',
  • 'Hebrew/Israel': 'he_IL.UTF-8',
  • 'Hindi/India': 'hi_IN.UTF-8',
  • 'Hungarian': 'hu_HU.UTF-8',
  • 'Icelandic': 'is_IS.UTF-8',
  • 'Indonesian': 'id_ID.UTF-8',
  • 'Irish': 'ga_IE.UTF-8',
  • 'Italian/Italy': 'it_IT.UTF-8',
  • 'Italian/Switzerland': 'it_CH.UTF-8',
  • 'Japanese': 'ja_JP.UTF-8',
  • 'Korean/Republic_of_Korea': 'ko_KR.UTF-8',
  • 'Lao/Laos': 'lo_LA.UTF-8',
  • 'Latvian/Latvia': 'lv_LV.UTF-8',
  • 'Lithuanian': 'lt_LT.UTF-8',
  • 'Macedonian': 'mk_MK.UTF-8',
  • 'Malay/Malaysia': 'ms_MY.UTF-8',
  • 'Maltese/malta': 'mt_MT.UTF-8',
  • 'Manx/Britain': 'gv_GB.UTF-8',
  • 'Marathi/India': 'mr_IN.UTF-8',
  • 'Northern/Norway': 'se_NO',
  • 'Norwegian': 'nb_NO.UTF-8',
  • 'Norwegian,/Norway': 'nn_NO.UTF-8',
  • 'Occitan/France': 'oc_FR',
  • 'Oriya/India': 'or_IN.UTF-8',
  • 'Persian/Iran': 'fa_IR.UTF-8',
  • 'Polish': 'pl_PL.UTF-8',
  • 'Portuguese/Brasil': 'pt_BR.UTF-8',
  • 'Portuguese/Portugal': 'pt_PT.UTF-8',
  • 'Punjabi/India': 'pa_IN.UTF-8',
  • 'Romanian': 'ro_RO.UTF-8',
  • 'Russian': 'ru_RU.UTF-8',
  • 'Russian/Ukraine': 'ru_UA.UTF-8',
  • 'Serbian': 'sr_CS.UTF-8',
  • 'Serbian/Latin': 'sr_CS.UTF-8@Latn',
  • 'Slovak': 'sk_SK.UTF-8',
  • 'Slovenian/Slovenia': 'sl_SI.UTF-8',
  • 'Spanish/Argentina': 'es_AR.UTF-8',
  • 'Spanish/Bolivia': 'es_BO.UTF-8',
  • 'Spanish/Chile': 'es_CL.UTF-8',
  • 'Spanish/Colombia': 'es_CO.UTF-8',
  • 'Spanish/Costa_Rica': 'es_CR.UTF-8',
  • 'Spanish/Dominican_Republic': 'es_DO.UTF-8',
  • 'Spanish/El_Salvador': 'es_SV.UTF-8',
  • 'Spanish/Equador': 'es_EC.UTF-8',
  • 'Spanish/Guatemala': 'es_GT.UTF-8',
  • 'Spanish/Honduras': 'es_HN.UTF-8',
  • 'Spanish/Mexico': 'es_MX.UTF-8',
  • 'Spanish/Nicaragua': 'es_NI.UTF-8',
  • 'Spanish/Panama': 'es_PA.UTF-8',
  • 'Spanish/Paraguay': 'es_PY.UTF-8',
  • 'Spanish/Peru': 'es_PE.UTF-8',
  • 'Spanish/Puerto_Rico': 'es_PR.UTF-8',
  • 'Spanish/Spain': 'es_ES.UTF-8',
  • 'Spanish/USA': 'es_US.UTF-8',
  • 'Spanish/Uruguay': 'es_UY.UTF-8',
  • 'Spanish/Venezuela': 'es_VE.UTF-8',
  • 'Swedish/Finland': 'sv_FI.UTF-8',
  • 'Swedish/Sweden': 'sv_SE.UTF-8',
  • 'Tagalog/Philippines': 'tl_PH',
  • 'Tamil/India': 'ta_IN.UTF-8',
  • 'Telugu/India': 'te_IN.UTF-8',
  • 'Thai': 'th_TH.UTF-8',
  • 'Turkish': 'tr_TR.UTF-8',
  • 'Ukrainian': 'uk_UA.UTF-8',
  • 'Urdu/Pakistan': 'ur_PK',
  • 'Uzbek/Uzbekistan': 'uz_UZ',
  • 'Walloon/Belgium': 'wa_BE@euro',
  • 'Welsh/Great_Britain': 'cy_GB.UTF-8',
  • 'Xhosa/South_Africa': 'xh_ZA.UTF-8',
  • 'Zulu/South_Africa': 'zu_ZA.UTF-8'

These are on its way to be included as well:

  • 'Amharic/Ethiopian': 'am_ET.UTF-8',
  • 'Hausa/Nigeria': 'ha_NG.UTF-8',
  • 'Igbo/Nigeria': 'ig_NG.UTF-8',
  • 'Mongolian': 'mn_MN.UTF-8',
  • 'Nepali': 'ne_NP.UTF-8',
  • 'Yoruba/Nigeria': 'yo_NG.UTF-8'

Time

You can set the timezone with the sugar-control-panel. This is an offset only, so if the actual time is not set correctly setting the timezone will not result in the correct timezone as well. If you have internet access you can use ntpdate or rdate to sync your clock with an available time server. It works as well to set the timezone first and then sync with a time server.

Utterly complicated. Please simplify; start with rdate with auto-install if it is not there with the rdate option to use ntp and a simple timezone code ('America/Los_Angeles' is not a simple timezone code; it requires the underscore ).


Setting The Time With ntpdate

Your machine likely already has ntpdate. Then synchronizing the time is as simple as (you must be connected to the Internet):

su - # become root with login shell
ntpdate pool.ntp.org

Then you will want to make the hardware clock remember the current time.

hwclock --systohc

Otherwise, see the next instructions.

Setting The Time With rdate

If your machine does not have ntpdate, or cannot connect to an NTP server, you may need to use rdate.

Install rdate:

su root
yum install rdate

Get the time (dependent on your current time zone) of an rdate server. (you must be root)

rdate [server]

Examples for servers:

time.fu-berlin.de
rdate.cpanel.net

To set your clock do:

rdate -s [server]

e.g.

rdate -s time.fu-berlin.de

Then you will want to make the hardware clock remember the current time.

hwclock --systohc

Manually setting date

You need to be root to set the date and time, so become root before you begin,

su
date -s 3/6/2008

sets the date to March 6, 2008

date -s 22:35:00

sets the time to 10:35 PM.

Setting The Timezone

Now you can use the sugar-control-panel to set the timezone. Get the list of available timezones:

sugar-control-panel -h timezone

Get the current timezone:

sugar-control-panel -g timezone

Set the timezone (you must be root):

G1G1 users which have not been updated to a newer Update.1 build have to use the 'su' command to become root. Do not use 'su -' since the 'su -' command starts a login shell where the $SUGAR_PATH variable needed by the sugar-control-panel is not preserved.

su
sugar-control-panel -s timezone [timezone]

If you are running a joyride build (tested with 1525) or an update.1 build (tested with 679) you can use sudo to run the sugar-control-panel command as root. (The sudo command will preserve the $SUGAR_PATH).

sudo sugar-control-panel -s timezone [timezone]

e.g.

sudo sugar-control-panel -s timezone Europe/Berlin

You needn't worry about any possible Daylight Saving Time; the OLPC handles this very well with no human intervention.

Common Usage Errors

Sugar Path

If the XO complains about things like 'SUGAR_PATH' and don't seem to work, you are probably running the program outside of Sugar or as Root. Try again from the Terminal Activity or as another user.

Sorry I do not speak 'english'

If you get the above response (or one like it) it's because you didn't format your chosen language correctly. You need to add your country as well, such as:

sugar-control-panel -s language English/USA
sugar-control-panel -s language Spanish/Peru

To get a list of available languages do:

sugar-control-panel -h language 

Since the list is long you might want to do something like this to limit the search result:

sugar-control-panel -h language | grep -i english

Error timezone does not exist

If you get the above response (or one like it) it's because you didn't format your chosen timezone correctly: A typical timezone command is looking like this:

sugar-control-panel -s timezone Europe/Berlin
sugar-control-panel -s timezone America/Lima

To get a list of available timezones do:

sugar-control-panel -h timezone

Since the list is long you might want to do something like this to limit the search result:

sugar-control-panel -h timezone | grep -i lima

The graphical user interface

With the 8.2.0 release the sugar control panel will have a graphical user interface. This will be in addition to the command line interface. So all the commands you learned to tweak your preferences do still work.

Access the interface

The control panel is accessible from the pop-up menu on the home view XO icon. Hovering over the icon with the mouse pointer will reveal a palette where the control panel is one of the available options (a.b).

a) start the control panel in the freeform view
b) start the control panel in the ring view

Main Page

Each of the icons on the main page represents a section in the control panel (c). A section can have more than one options. For example the section 'About Me' does have an option to set the nick name and one to change the color of the XO (d).

c) The main page with the available sections.
d) The 'About Me' section containing an option to change the nick name and the color of the XO

The cancel button 'x' at the right top can be used to quit the control panel. The entry widget on the top left is used to search for a specific option. Options that don't match will be greyed out (e,f).

e) Search for the string 'about'. All the options except the 'About Me' and 'About my XO' are greyed out.
f) Search for the string 'fra'. All the options except the 'Frame' are greyed out.

Basic navigation

Clicking on one of the section icons will bring you to the section page. In the section the cancel button is used to undo any changes. The ok button let's you acknowledge that you are happy with the changes you did in that section.

Undo changes

You can undo any change you did in the section. Pressing the cancel button 'x' at the top right (g) will undo the changes and you will be returned to the main page of the control panel.

g) Cancel a change

Acknowledge changes

If you are happy with your changes press the ok button. There are two types of options. Some require a sugar restart to take effect some don't. For example changing the nick name in the 'About Me' section does require a restart.

After changing this option an alert right next to it will be displayed that reminds you that these changes require a restart (h). When you hit the ok buttonan alert will be displayed that handles the restarting (i). Pressing the 'cancel' button will undo any changes in this section and will be presented with the section page like it was before you did any changes. Pressing the 'Later' button will keep the changes. The main page will be displayed and you can keep on modifying options. The changes you did will only be visible after your next restart. Pressing the 'restart' button will restart sugar directly. All your data (open activities) will be saved.

h) Inline alert when you change the nick name.
i) restart alert

Error handling

b) Inline alert when the nick name is empty. Note that the 'Ok' button is inactive in that case.

Available options

About Me

The 'About Me' section contains an option to change the nick name and the color of the XO.

a) The 'About Me' section containing an option to change the nick name and the color of the XO


About my XO

Date & Time

Frame

Language

Network

Power

Software updates