Saturday, January 17, 2009

How to change locale in Mozilla Firefox

... or How to change language in Mozilla Firefox ...
... or How to change the language of the Firefox menu bar

We might need to switch to a different language in Mozilla Firefox (User Interface, Spell Checker Dictionary, Website content and error messages) to test applications behavior with various internationalized testing conditions (localization or internationalization testing or automatic Globalization Support)


On Windows
We'll download any Windows specific language version from

After installing all consecutive specific versions to the same path (every language must be downloaded and installed), we can manually change the following Mozilla Firefox variables.

Typing about:config on the address var, we can filter and change variables (with the right Windows permissions):


Possible values:
(ISO 639-1 Code)

IE. (en,en-us,sv,sv-se)

Another easy and versatile way is to install Firefox Add-On "Quick Locale Switcher"
It allows you to quickly change and apply a different locale related setting from the tools menu, the statusbar, or your Toolbar.

After selected language and restarted Mozilla Firefox, our browser automatically goes to the right place.

On Linux
We'll download any Linux specific language version from

We can decompress to an specific folder (one per language) and call the right one by some script and install Firefox Add-On "Quick Locale Switcher" from

NOTE: we can also install OPIE from or FEBE to selectively backup and restore extensions if we want to try different configurations.
Or simply do backup (Firefox_Dir\defaults\profile) = file prefs.js

Links, References:

Friday, January 9, 2009

Oracle bash and ksh prompt

Colect different bash promts to adecuate our Oracle terminal session.

Version: Unix bash/ksh

Bash prompt customization
After a user login to the system, user environment variables are initialized from various files like:

* global system files /etc/profile or /etc/bashrc
* user files ~/.bash_profile , ~/.bash_login , ~/.profile , ~/.bashrc or ~/.bash_logout.

It is important to know that all users environment variable have a life time equal to the terminal session. When the terminal session is closed the user's variables including bash shell variables defined during a terminal session are emptied and a again redefined when new terminal session is created either via logon in shell or interactive shell.

Note: Use "source" command to re-read a bash initialization .bashrc file instead of restarting a terminal session.

source .bashrc

or similarly

. .bashrc

source .bash_profile
. .bash_profile

source .profile
. .profile

Bash and ksh prompt Examples

Display current user, host, working dir, hour, Oracle versiĆ³n and SID
Working on multi-instance and different Oracle versions environments we'd need to know the working directory, ORACLE SID and other usefull data and keep the entire command line free, specially with long paths. Furthermore, we can use the promt to separate command outputs. (adapted from

Over bash
.bash_profile or .profile
ohvers ()
echo -n $ORACLE_HOME |sed -n 's/.*\///p'
export PS1=$'\\n# [ \u@\h:\w [\\t] [`ohvers` SID:${ORACLE_SID:-"no sid"}] ]\\n# '

Note: could be that way if prefered...
export PS1=$'\\n# [ $LOGNAME@\h:$PWD [\\t] [`ohvers` SID:${ORACLE_SID:-"no sid"}] ]\\n# '


Display hostname, working directory and the history number of commands
We'd want to know hostname and history # of executed commands.

Over ksh
export PS1="`uname -n`$[!]$ "---------------------------------------------------------------------

W/working directory
export PS1=`uname -n`@`whoami`':$PWD [!] $'
tauro@oracle:/oracle [2] $

Over bash
export PS1=`uname -n`@`whoami`':$PWD [\!] $'
tauro@oracle:/oracle/product/10.2.0/bin [824] $

Counting Files in the Current Directory
This bash prompt displays current number of files and directories in the current directory.

export PS1="\u@\h [\$(ls | wc -l)]:\$ "
oracle@tauro [334]:$ pwd
oracle@tauro [334]:$

Links, References:
Unix man pages: bash/ksh

Oracle Search