Linux FAQ's & Manuals


automatic starting of an xim server with the x11 session

the default scripts used on suse linux to start an x11 session will automatically attempt to start a suitable xim server for the the language indicated by the effective value of the lc_ctype environment variable.

a suitable xim server will be started automatically, if any such server is installed (and, if necessary, a suitable conversion backend is installed and running).

for example, if kinput2 and canna are installed and the cannaserver is running and there is no ``better'' japanese input system for xim installed, kinput2 will automatically start when you start an x11 session with lc_ctype set to some japanese locale, for example:

     ~$ lc_ctype=ja_jp.utf-8 startx 

you can set the system wide default value for language specific variables like lc_ctype in /etc/sysconfig/language. setting only rc_lang is usually enough, because lc_ctype inherits it's value from lang if lc_ctype is not set explicitly. i.e. with the following settings in /etc/sysconfig/language a japanese xim server will start automatically:

     rc_lang="ja_jp.utf-8"     rc_lc_all=""     rc_lc_messages=""     rc_lc_ctype=""     rc_lc_collate=""     rc_lc_time=""     rc_lc_numeric=""     rc_lc_monetary=""     root_uses_lang="yes" 

it may be useful to set lc_ctype explicitly if you want to start a xim server automatically but mainly want to use a different language. for example if you mainly use german and want to see messages and user interfaces in german but nevertheless automatically start a japanese input server because you need to input japanese from time to time you can use the following settings:

     rc_lang="de_de.utf-8"     rc_lc_all=""     rc_lc_messages=""     rc_lc_ctype="ja_jp.utf-8"     rc_lc_collate=""     rc_lc_time=""     rc_lc_numeric=""     rc_lc_monetary=""     root_uses_lang="yes" 

to use german and japanese at the same time using utf-8 locales is especially useful.

after making changes in /etc/sysconfig/language run suseconfig and login again to make the changes effective.

if you use one of the display managers xdm, kdm, or wdm to start your x11 session, you cannot choose the language anymore before starting your x11 session as in the above example with startx. therefore you need to set good default values in /etc/sysconfig/language or in your own profiles in your home directory.

the ``gnome display manager'' gdm is an exception, it has an extra menu to select the language to use for the x11 session and sets lang to the value selected from the menu before starting the x11 session. you cannot set different values for lang and lc_ctype from the language menu of gdm though, if you need that you still need to edit /etc/sysconfig/language or your personal profiles accordingly.



subsections
2005-03-09