Translate

Translate to EnglishÜbersetzen Sie zum Deutsch/GermanΜεταφράστε στα ελληνικά/GreekПереведите к русскому/RussianOversetter til Norsk/NorwegianÖversätta till Svensk/Swedishहिन्दी अनुवाद करने के लिए/Hindi
Tradueix al català/CatalanTulkot uz latviešu/LatvianPreložiť do slovenčiny/SlovakVertaal aan het Nederlands/Dutchترجمة الى العربية/ArabicTraduzca al Español/SpanishTraduisez au Français/French
Traduca ad Italiano/ItalianTraduza ao Português/Portuguese日本語に翻訳しなさい /Japanese한국어에게 번역하십시오/Korean中文翻译/Chinese Simplified中文翻译/Chinese TraditionalПереклад на українську/Ukrainian
Image of Linux Kernel Development (3rd Edition)
Image of Modern Operating Systems (3rd Edition)
Image of RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)
Image of XSLT 2.0 and XPath 2.0 Programmer's Reference (Programmer to Programmer)

Google Globetrotting Woes

I am currently on the beautiful island of Cebu in the Philippines visiting with my old friend and colleague Charles Richmond at IISC and giving some talks on OS internals.  I use a Lenovo Thinkpad laptop running Windows Vista Ultimate when travelling with Mozilla Firefox 3 as my default browser.

Firefox 3 comes with a default Search Bar on the top right hand corner containing a number of default search engines including Google. If I type a search term in the Google Search Bar option, Google figures out behind the scenes that I am located in the Philippines, redirects me to www.google.com.ph and displays the search results with the interface language set Filipino (also spelt as Pilipino) as shown here.

This is not too much of a hindrance in the Philippines but becoming a total annoyance when in Japan, China, Vietman and many other countries. The standard workaround for this is to force Google to display its interface language in English by going to Google.com and setting your user preferences to English which results in Google.com creating a cookie on your machine to persist your preferences.

Maybe it is a bit of overkill or paranoia but I have Firefox set up to delete all cookies when terminating a session for the purpose of personal privacy and security. Thus Google defaults back to whatever interface language Google defaults to for the country that Google thinks I am currently in the next time I fire up Firefox and go to Google.com.

One way to overcome this problem is not to use the Firefox search bar but instead to browse to www.google.com/ncr where NCR stands for No Country Redirect before performing any searchs. Rather than going this route, I decided to write my own Search Engine plug-in so that I always get an English interface when I use the Firefox Google search toolbar. It turns out that this is quite easy to do once you understand what is required.

Cut and paste the following code into a file called GoogleEN.xml and save the file.

<SearchPlugin xmlns=”http://www.mozilla.org/2006/browser/search/”> <ShortName>GoogleEN</ShortName> <Description>Google Search (NCR English)</Description> <InputEncoding>UTF-8</InputEncoding> <Image width=”16″ height=”16″>data:image/x-icon;base64, AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQA AAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAACZMwD/mTMA/5kzAP+ZMwD/mTMA/5k zAP+ZMwD/mTMA/5kzAP+ZMwD/mTMA/5kzAP+Z MwD/mTMA/5kzAP+ZMwD/mTMA///////////// ///////////////////////////////////// //////////////////////////mTMA/5kzAP/ ////////////////48u//0a2g/71vWP+hLgz/ pCUI/5xDG/+dRRz/pFIs/7ibk//q4+D////// 5kzAP+ZMwD////////////q0MX/pDIP/6gxC/ /kq5H//fj1//////////////////zezv+MHgf /r5SE//////+ZMwD/mTMA///////36+X/pjAL /6YwC//Wr5z////////////////////////// //97eX/jB4G/7ecjP//////mTMA/5kzAP//// //4ZJu/5o5DP/Hm4j//////////////////// ///bk2/+gUCv/mD4V/54rCP+vhm7//////5kz AP+ZMwD///7+/7xPHf+dLAn/+PXz/wAA///// ////////wAA/////fz/AAD///bRv//52Mf/AA D//wAA//+ZMwD/mTMA//77+f+uNAz/nzcZ/// ///8AAP///////wAA//8AAP///////wAA//// ////AAD//wAA////////mTMA/5kzAP/++/n/t FUo/5RAG///////AAD//wAA////////AAD/// ////8AAP//AAD//wAA/////////////5kzAP+ ZMwD////+/7xVLv+WPBf//////wAA//8AAP// /////wAA////////AAD/////////////AAD// /////+ZMwD/mTMA///////plHP/mDUR////// 8AAP////////////8AAP///////wAA//8AAP/ /AAD//wAA////////mTMA/5kzAP//////8cm8 /607FP+6jn//+Ojl///////////////////// ///////9+7q//b08v///////////5kzAP+ZMw D////////////yu6X/qD4Z/8eQgP/46OX//// /////////////7Luz/55IIf95JQj/9O3q//// //+ZMwD/mTMA//////////////////PFuP/Pa Uj/uDUO/7U0Cf+1NAr/tTQJ/6k2Ff/dqJH/8t DD//79/f//////mTMA/5kzAP///////////// ///////////////38+f/48uz/9e3m//bv6P/7 +PX//////////////////////5kzAP+ZMwD/m TMA/5kzAP+ZMwD/mTMA/5kzAP+ZMwD/mTMA/5 kzAP+ZMwD/mTMA/5kzAP+ZMwD/mTMA/5kzAP+ ZMwD/AACsQQAArEEAAKxBAACsQQAArEEAAKxB AACsQQAArEEAAKxBAACsQQAArEEAAKxBAACsQ QAArEEAAKxBAACsQQ== </Image> <Url type=”text/html” method=”GET”    template=”http://www.google.com/search”>

KSH93 Custom Builtins 1

The majority of GNU/Linux and Unix shells are not designed for extensibility or embeddability. An exception is the the Korn Shell which includes support for runtime linking of libraries and custom builtins and accessing shell internals. This post shows you how to write your own simple Korn shell custom builtins.