Wiki source for MakeScimWorkWithJavaAndTerminal


Show raw source

[[HomePage]] >[[ComponentHowTo Components and HowTos]] > [[NativeLanguageSupport Language Support]]

======{{color text="Getting Scim working in Other Programs" c="black"}}======

The Scim files are here http://puppylinux.ca/members/Scim/
and here http://puppylinux.asia/members/Scim/

Scim is fairly easy to get working with GTK and QT programs. However, there are quite a few applications that don't come into these categories, and are fairly popular. Anything written in Java is an example, and so is the terminal.

The following notes describe how to get Scim working in these other applications. We will assume that you have already got Scim installed and working in GTK, along with the fonts you need.


==={{color text="Set Up Locale" c="black"}}===
Firstly, you need to set up a UTF-8 locale. Puppy 4.30 allows you to install a UTF-8 locale from the "chooselocale" option in the menu (or right-click on the desktop). Run this option before you do anything else.

Others only let you install non-UTF-8 locales. In that case, you will need to download and install the locale files yourself. The key is to have locale files that will work properly with the other basic libraries. There is a selection of locale files available that will work with Puppy 2.17 and 4.30 but apparently NOT all versions in between.

For Puppy 3 and Puppy 4 (including 4.30 if you like), select one of these files instead

Unarchive the locale file of your choice to /usr/lib/locale.

Check that the new locale directory that you have installed has the extension .UTF-8 and **not** .utf8 . If necessary, rename the directory.

Install __locale_support-0.01.pet__*. This provides some files that are either missing from or too old in standard Puppy, and are needed for Scim to work properly.

Now we need to edit three configuration files. First, open /etc/profile and look for these two lines:

""<code>LANG=[followed by some characters] <br>
export LANG</code>""

In later Puppy versions, this may be something like LANG=en_US.utf8. In earlier ones, it may just be LANG=en_US (or the language you have chosen). In both cases, it needs to have the extension .UTF-8 after your language, like this:

""<code>LANG=en_NZ.UTF-8 <br>
export LANG</code>""


==={{color text="Configure Scim" c="black"}}===
Next, we are going to add a couple of lines to /root/.xinitrc Near the beginning, you will see a line that reads:

""<code>export QT_IM_MODULE="scim-bridge"</code>""

Just after it, add these two lines:

""<code>export XMODIFIERS=@im=SCIM <br>
scim -d</code>""

If you have chosen en_US.UTF-8 as your locale, that is all you need to do. For other people, there is one more file to edit.

Open /usr/etc/scim/global and add your locale at the end of the first line. It should be separated from "en_US.UTF-8" by only a comma and no space, like this:

""<code>/SupportedUnicodeLocales = en_US.UTF-8,en_NZ.UTF-8</code>""

You can add more than one additional locale name if you wish.

Now reboot, and Scim should be working in Java applications.


==={{color text="Install UTF-8 capable Terminal" c="black"}}===
If you want to be able to see and enter non-Latin characters in the terminal, you need a UTF-8 capable terminal. Install __rxvt-unicode-9.06-i486.pet__* It has a menu entry (in Utilities), and you can edit the "console" desktop shortcut so that it runs /usr/bin/urxvt instead of /usr/bin/rxvt (If you do this on Puppy 4.30, you end up with two console icons for some reason, one for the old terminal and one for the new one - haven't worked out the fix yet.)

You'll find that the new terminal has a bright pink background. To change this, edit the file /root/.Xdefaults. Look for the line:

""<code>URxvt.background: "white smoke"</code>""

and change it from __"white smoke"__ to just __white__ without any quotation marks. If you are running one of the Puppy 4 series with white text in the terminal, choose __black__ instead. (If you want to try some other colours, there are lots of choices in the file /usr/X11R7/lib/X11/rgb.txt. Use the ones without spaces in them, such as ""LightSlateGray"".)


**A useful debugging hint** if things aren't working right: if non-Latin characters display as question marks ?????? in the terminal, something is wrong with the locale settings. If on the other hand you get boxes, then you need to install a font.

*__locale_support-0.01.pet__ and __rxvt-unicode-9.06-i486.pet__ can be downloaded


----
==Categories==
CategoryAdditionalSoftware
CategoryMultilingual
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki