##(see the SpecSpec for an explanation) * '''Bazaar Repository''': http://dc.ubuntu-us.org/bazaar/gin/ * '''Created''': 2006-03-20 by flint@flint.com * '''Contributors''': flint * '''Packages affected''': == Summary == '''''gin''''' Gnome Instant Nationalization GIN allows superuser to determine and adjust language settings for individuals logging into any gnome based (*untu) along the development line. Slo-gin checks for the lang packs, gin.sh does not check. This will soon be a switch in the code. Note that if the user is logged in when gin is invoked, the user account effected must log off and log back in for this to reset the variables involved. == News Flash == Mr. Kevin Cole, the DCLOCO chief cat herder, has completely re-factored this program and replaced gin.sh with gin.py. This will be posted shortly. Flint wishes to thank Nick Wheeler and Kevin Cole for their efforts to "un-cruft" this and make it work well. I would describe his results as sensational. Please refer to [[http://docbox.flint.com/~flint/gin/index.html]] == Rationale == Teachers need to assign and set language variables to allow for unified teaching in multi lingual environments. This is a script to report and set language variables. == Use cases == The Edubuntu Lab has 30 workstations and 120 user accounts, some in Spanish some in English. When a user who prefers English logs in there is an English screen, and when a Spanish user logs in the system is delivered in Spanish. An educator has a running Edubuntu Breezy installation which was installed with English as the default language. I want to be able (as system administrator) to change the default language of some of the users to Spanish, leaving others with a default language of English. This needs to work on a user by user basis. The educator wants users who have their default language changed to Spanish to have all applications that support this to appear to them with Spanish menus, including the gnome desktop environment itself. == Scope == Any of the GNOME based *buntu distributions, such as Ubuntu and Edubuntu. It will be tested on Edubuntu, Ubuntu and Ubuntu server Warty, Hoary, Breezy and Dapper versions. == Design == This is initially a bash script. It should change to a Python script. Finally this will be added into Dapper +1. usage: '''gin''' accepts zero or more arguments, with zero arguments gins prints out the following: 0. If the the status of the executer is root 0. the language variables as they stand 0. the abbreviated help page for this product If '''gin''' is executed with a -q option this information is suppressed. If '''gin''' is executed as root... 0. and the fist and only variable is a user name for the system, '''gin''' prints out the current language settings for this user. 0. and the first variable is the user name and the second variable is a language identifier, then '''gin''' sets all related user language elements to this locale. == How It Works == such as userid and language as an and prints out either status, help must be run as root '''gin''' reports variables and options and exits if not run as root '''gin''' reports options and the fact it is not root. This program changes three areas and these environment variables Three areas effected are: 0. $HOME/.dmrc 0. /etc/environment 0. /etc/default/gdm The Variables effected are shown below in their English state: {{{ GDM_LANG=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 }}} Here are the Variables in their Spanish state: {{{ GDM_LANG=es_ES.UTF-8 LANG=es_ES.UTF-8 LANGUAGE=es_ES.UTF-8 }}} == Implementation == Again, the first shot of this would be a shell script, and then we refactor to a python script, and finally we plug into whatever gui someone wants... === Code === The Jeff Elkner memorial '''gin''' Script by Paul Flint This script actually works. Download the script from this [[https://docbox.flint.com/~flint/bazaar/gin/gin.sh|site]], next chmod +X it, become root, and torch it off. Optionally rename "gin.sh" to "gin" and maybe move to /usr/bin. It appears that Version 0.081 is worth testing with. ==== Testing ==== Testing has begun with Version .081 and at this time the program appears to do no damage however, see the following limitations and be careful. Remember the 5 most hated words in the world of computers are: 0. Did 0. You 0. Back 0. It 0. Up? Check version with the -v switch, not documented... (hm...:^) ==== Design Objectives ==== The script must be completely self sustained, no other files are needed, or if needed the script manufactures them. This should be refactored in python to allow seamless attachment to the Glade thingy by someone who likes gui. The architecture is a central case statement that is argument driven All calls in this code must be explicit. === Data preservation and migration === If all else fails, the original files are saved in the home directory of the runner in the files: 0. safe.dmrc 0. safe.environment 0. safe.gdm restore these and all will be as it was. == Outstanding issues and Limitations == Limitations discovered in this testing process include: 0. Version 0.081 of this program does not yet test whether it is running on a non Gnome system (e.g. KDE) the next version will. Do not attempt to run this on KDE or other windowing systems, as this will create unpredicatble results. 0. Version 0.081 of this program does not check whether the is a legitimate user on the system, and running this program with bogus user names will also, no doubt, create erratic results. 0. Need review of the debs required for the Spanish language, and have concerns / questions about this (boy do we need a faq). 0. Need to add documentation of -v (outputs version and stops) 0. Need to write a man page, would be neat if the script when first run creates this... 0. Need to add a -r or --restore feature to this script 0. This method (and script) has been tested and will operate in a Dapper or a Breezy environment. 0. This method (and script) has not been tested in a Hoary environment 0. This method (and script) will not function in a Warty environment testing performed April 2006 in the "flint linux candy lab", Montpelier, Vermont == BoF agenda and discussion == flint will be at Linuxworld, April 4-7 2006 ---- CategorySpec