How to add a locale

Since I’m now back in Sun, albeit on a contract, and part of a team based in Beijing, I thought it would be really handy to be able to render Simplified Chinese characters in JDS (and CDE). It was really easy to find the font packages, but I didn’t have a clue which ones I really needed.A quick “please point me to TFM” question on #opensolaris this morning showed me the way: localeadm(1M).It was really easy to use:

# localeadm ---l ---d /media/SOL_11_X86
# localeadm ---d /media/SOL_11_X86 ---a china

I did have some problems along the way, due to the package inventories for the Blastwave Faroese (CSWaspellfo) and Kushibian (CSWaspellcsb) aspell packages having some bizarro characters (from an en_AU perspective) just lumped into /var/sadm/install/contents. Once I had removed those, the addition of the Simplified Chinese locale was a snap.Making use of it though … I had to logout, then go back to the console login so I could correctly kill of dtlogin and then run

# svcadm restart svc:/application/font/fc-cache:default
# svcadm restart svc:/application/x11/xfs:default

If you don’t restart at least the fc-cache service, then your font cache will be out of sync and your JDS login will die leaving a corefile in $HOME from gnome_segv2.Once I got logged back in correctly, I went straight to my zh test page and on mouseover there are now none of those ugly boxes with numbers. Yay!Once you’ve got everything setup correctly, you’ll notice in your process table entries such as these:

14132 /usr/bin/iiimx ---iiimd
14133 iiimd ---nodaemon ---desktop ---udsfile /tmp/.iiim-jmcp/:0.0 ---vardir /home/jmcp/.iiim
14135 iiim-xbe

Technorati tags: topic:{Technorati}[locale], topic:{Technorati}[localeadm], topic:{Technorati}[Beijing], topic:{Technorati}[damned square boxes], topic:{Technorati}[Solaris], topic:{Technorati}[OpenSolaris], topic:{Technorati}[Blastwave], topic:{Technorati}[fc-cache]