Baofeng programming cable (DIY)


A USB serial dongle and some stereo plugs, hacked together. Chirp works great. Might try the company’s software if I ever boot my winxp partition again.


More Japanese on Linux: Anthy, uim, and Ubuntu (among others)

I still haven’t gotten around to updating the Ubuntu box running Gutsy Gibbon out in the den here in Sterling. It seems to be running just fine with Gnome 2.20.1 and I’m in no hurry to jump to Hardy Heron and mess with my users’ interface experience. So, I went about checking how a few things work in Gutsy, on the odd chance I might want to type something up while here, without firing up the laptop.

I’ve been running the new release of Opensuse on the Thinkpad (post on that to follow, after I spend a little time with it). For the most part, setting up uim for kanji input is about the same across distros (and BSD’s!). I noticed the Opensuse konqueror binary has uim suport built right in, obviating the need for uim-xim, and the concomitant config file hacks necessary to run a mixed gtk/qt environment. Just right click in a text input area in any QT app and select uim under input methods, if you haven’t already made it your system wide default.

I blogged on setting up Japanese in Gnome and KDE apps in each other’s environments a while back. Since then, I’ve figured out (stumbled upon) some things to make it easier and much less hacky, but haven’t properly documented my discoveries. Plus, I’ve been lax about going into much detail on uim-gtk-pref settings, since preferences do vary so much. I’ll remedy that with some basic screenshots of what works for me. Feel free to experiment to taste. By the way, I wouldn’t expect much difference in these settings for a given Debian release, or other Ubuntu version, but let me know of any gotchas that might come up.

First things first. I’ll assume you’ve got the requisite packages: uim-anthy, uim-applet-gnome, uim-gtk2.0, uim-xim, uim-utils. Installing these via apt-get, synaptic, what-have-you, should pull in all the dependencies you need. Now all that’s left is to add the uim-applet to the Gnome toolbar, right click on it. and select preferences. NOTE: the GTK applet will work exactly the same in a KDE panel, but there is also a KDE uim applet, if you’re into that.

uim-pref-gtk Global preferences, along with version window
uim-pref-gtk Global Settings

The Global Settings controls the input method framework, which would be uim in this case. The actual input method here is Anthy. So, this handles turning on any special input framework. Then you can choose to either use Anthy to input kanji immediately, or you can toggle between direct, kanji, or different kanas, or set one of those as the default. Confused? Just try my settings, play a little, and see what changes. Make sure to click apply.

My working anthy settings in uim-gtk-pref
My working Anthy settings in uim-gtk-pref

This menu controls how Anthy behaves once activated from the applet. I start with direct Roman character input, and I can toggle to kanji input via romaji transliteration with shift-space.

Advanced Anthy Setting in uim-pref-gtk
Advanced Anthy Setting in uim-pref-gtk

A few more preference settings for Anthy. I like predictive input. You may not.

Toolbar applet gimmicks and effective area in which to switch input
Area in which to activate an input method and various toolbar applet gimmicks

I usually have different applications open using different languages, so I like to just switch one at a time. One can change input for the whole desktop at once if preferred.

Those other programs: make it work with KDE, QT, X, GoogleEarth, etc.

Now how about those KDE apps like konqueror and k3b? And what about other non-GTK applications, such as xterm and GoogleEarth? In Ubuntu you just have to get uim-xim running and tell XIM (the old X input system) to use the uim settings you’ve been so carefully rigging up. I found an excellent how-to on this for Zenwalk Linux, which helped get me started. I put this script:

if [ "$DISPLAY" ]; then
uim-xim -engine=anthy & > /dev/null 2>&1
export XMODIFIERS=@im=uim > /dev/null 2>&1

in my .profile. In my case, I first backed up the default .profile and then added the uim-xim startup code to the original. We’re not done just yet.

We want to set the default input method for XIM to uim. This is accomplished by adding:

export XMODIFIERS=@im=uim

to .gnomerc in your home directory. If the file doesn’t exist, just create it. That worked for me.

Check it out

Now we just have to log out and log back in to make sure those configs take effect.
Open konqueror, Google Earth, any old program, and activate Japanese input from
the uim Applet and have at it.

Closing thoughts:
There’s a handy keystroke chart here, for those characters that might be less than intuitive to typists
who haven’t studied advanced linguistics. Who knew the katakana dot was called an interpunct? Makes
perfect sense though, doesn’t it?

Coming Soon:
How to do all this in KDE.
ヒント: It’s not that different. A few scripts in different places. Ho hum.

Keep those comments coming! Let me know if this helps, or doesn’t.

Belated post on Japanese and multilingualization on Opensuse 10.3

I’m looking at some Linux distro releases and thinking about what to put on the T60. I will be nuking the Opensuse 10.3 that’s currently installed and hacked and kluged to an unacceptable point. Package management has been the main problem with Opensuse. Before I blow it out, I’ll try to remember what I did to get the Japanese running.

I keep the main menus English and a uim applet in the taskbar. That way, I can flip on my anthy input on the fly in most any application I have running. I’m dealing with Gnome and mainly GTK2 applications for now. I’ll write more about KDE and QT later, along with something about dealing with a mixed QT/GTK environment.

Package names? Did I mention I wasn’t expecting to keep that install very long and therefore didn’t pay close attention to package names….Uh Oh. I searched the package manager for uim, anthy, and I think, some combination of gtk and anthy. Also, if you want other languages, like Russian, the m17n-lib package should do the trick. A search of my existing packages gives me these: uim-qt, uim-gtk2, uim, anthy, m17n-lib, kasumi

These are all so far advanced upstream that it is pretty easy to find them in any distro (probably BSD’s too!) without being too nit-picky. Of course, package names and what gets packaged with what may vary between distros.

If you use the uim-applet in Gnome, and want to input Japanese in a QT application, like Konqueror, for instance, it should be as easy as selecting xim for input in the application menu. That is, provided you have uim-xim bridge running. That can be automated with a carefully placed script somewhere in your .kde settings tree. I’ll post again with the script I have on my KDE based desktop, which I’m not in front of at the moment. I got it from a Japanese developer’s blog.

However, just to see if it’s working, use the handy trick of running uim-xim in a terminal with an ampersand, then run Konqueror or whatever QT application from the same terminal and try switching the uim-applet to anthy input. That should allow you to input kanji with anthy in the text areas of Konqueror. Sometimes it’s nice just to see that something can be done first, then it’s easier to get into automating it later.

I won’t bother posting my config files. Just play with the options in the uim-gtk2 config menus; they’re pretty self-explanatory. Once you switch the uim-applet to anthy while a gtk app’s window is active, you can then input hiragana by romaji and then select the proper kanji from the pop-up window. There are too many variations in configuration to go into here. I’ll go into more detail about using anthy, uim, kasumi (a dictionary tool for anthy), and company in Gnome and KDE environments in future posts.

RE: M17n, I18n, mojibake, and what works (usually).

I’m trying to organize my Linux/BSD internationalization and multilingualization notes into some kind of form that will be useful to users of various operating systems and Linux distributions. I want to share some of the solutions I’ve worked out, as well as stumbled upon randomly, for emailing, instant messaging, and sharing documents from your Linux/BSD box. I mean to provide useful information for communicating with those using Japanized operating system versions in the Microsoft and Apple worlds too. I’ll be forever indebted to Craig Oda for his explanations of Japanese computing many years back. But the situation has evolved. Many things that used to require seemingly endless, exacting configuration have become a matter of installing the right set of packages and a few clicks. Some operations are still tricky. The advent of more widespread use of Unicode in the major open and closed source desktop environments has simplified Japanese input and display in many ways, but there are issues with a multitude of legacy character codes and cross-platform consistency to deal with. Just when you think you’re making progress and have achieved some reliability in your setup, mojibake , will rear its ugly head. So I’m looking back on my experiences with multi-lingual text processing, and with some organizing, will be sharing what works for me.