Friday, May 28, 2010

Flags in the Gnome Keyboard Indicator (gswitchit)

Basically, there are two things you need to do: tell gswitchit to use flags, and put the flags in the right place.

Configure gswitchit: Start gconf-editor (Applications > System tools > Configuration Editor), and go to Apps > gswitchit > Applet, then check "ShowFlags".

Flags image files: Unfortunately, in most distributions, the images files are in the wrong location. Try to look for the Israeli flag:

$ find /usr/share/pixmaps -name 'il.png' -- OR -- $ locate il.png

Once you know where the flags are located, copy all the flags you mean to use (us.png, il.png, gr.png, etc.) to /usr/share/pixmaps:

$ cp /usr/share/pixmaps/gkb/{us,il}.png /usr/share/pixmaps

Restart the gnome-panel: $ killall gnome-panel - The flags are now supposed to show.

Another method:

  1. Press ALT+F2 and it open the Execute App Dialog. Type gconf-editor and press Enter.
  2. Now, go to Desktop>Gnome>Peripherals>Keyboard>Indicator and check the box on the right side that says “showFlags”. (If you have an older gnome desktop and u dont find it, try: Apps->gswitchit->Applet->showFlags).
  3. Download the flags of languages that you use(You can download SVG files from Wikipedia searching the country name). Scale it to 64×43 size and move to /usr/share/pixmaps Directory with name XX.png, where XX is the iso country name not the language name, for example i use es.png with cuban flag and my language is Spanish(Spain).
  4. Now restart your session and you will see the flags in your panel: