Sugar Control Panel: Difference between revisions
No edit summary |
|||
Line 82: | Line 82: | ||
== Nickname == |
== Nickname == |
||
Usage is |
Usage is |
||
sugar-control-panel -s nick |
sugar-control-panel -s nick Katie |
||
(type the "new name" that you want after the word nick) |
(type the "new name" that you want after the word nick) |
||
Revision as of 20:25, 19 April 2008
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 is
sugar-control-panel -s color strokecolor fillcolor [strokequalifier [fillqualifier]]
e.g.
sugar-control-panel -s color red blue
or
sugar-control-panel -s color red blue dark
or
sugar-control-panel -s color purple yellow light medium
(A shade difference between the optional stroke and fill qualifiers is enforced by code.)
Base colors
- red
- orange
- yellow
- brown
- 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
GUI for the command line tool (work in progress)
Mockups
About Me
- nick
- entry field
- color
- random-colorpicker like on the info screen
- color pickers for stroke and fill color
About my XO
- software image
- firmware
- serial number
- cpuinfo
- meminfo
- disk space (usage)
- more_info-section: (camera, mic, analog-in, ports, speakers, wlan-chip...)
Network
- jabber server
- entry field
- maybe a drop-down with available options if we can get this info from somewhere
- radio (turn the wireless radiation on/off)
- on/off checkbox
Time and Date
- timezone
- example: gnome-control-center timezone
- new: date (ntp)
- option to synchronize with a specific time server
- example: gnome-control-center date/time
Language
- language
- A language is determined by a) 'the name of the language' and b) 'a specific country' e.g. Spanish/Peru
- new: Speech Configuration Management for Sugar