Difference between revisions of "Input method related environment variables"
Weng Xuetian (talk | contribs) m |
Weng Xuetian (talk | contribs) (Marked this version for translation) |
||
Line 3: | Line 3: | ||
<translate> | <translate> | ||
+ | <!--T:1--> | ||
This page introduce the meaning of following environment variables. You don't need to understand it to use Fcitx, but it might help when you meet some problem, and examine yourself to check what goes wrong. | This page introduce the meaning of following environment variables. You don't need to understand it to use Fcitx, but it might help when you meet some problem, and examine yourself to check what goes wrong. | ||
− | == XMODIFIERS == | + | == XMODIFIERS == <!--T:2--> |
This variable affects XIM only. The format is | This variable affects XIM only. The format is | ||
− | XMODIFIERS=@im=<xim server name> | + | <!--T:3--> |
+ | XMODIFIERS=@im=<xim server name> | ||
+ | <!--T:4--> | ||
When XIM server starts, it register a name, which will be used here. The name can not be same as other XIM server, so you cannot run two Fcitx under same X server. | When XIM server starts, it register a name, which will be used here. The name can not be same as other XIM server, so you cannot run two Fcitx under same X server. | ||
− | == GTK_IM_MODULE == | + | == GTK_IM_MODULE == <!--T:5--> |
+ | <!--T:6--> | ||
This will override the system automatic gtk im module selection. By default gtk select im module by the language provided by im module. Fcitx declares that it support "zh:ja:ko:*". And this information will be record in a file, on most linux system it's /etc/gtk-2.0/gtk.immodules and /etc/gtk-3.0/gtk.immodules, or suffixed with -32 or -64. | This will override the system automatic gtk im module selection. By default gtk select im module by the language provided by im module. Fcitx declares that it support "zh:ja:ko:*". And this information will be record in a file, on most linux system it's /etc/gtk-2.0/gtk.immodules and /etc/gtk-3.0/gtk.immodules, or suffixed with -32 or -64. | ||
+ | <!--T:7--> | ||
{{warning|After Debian goes multiarch, they will use different file. /usr/lib/<arch>/gtk-{2,3}.0 }} | {{warning|After Debian goes multiarch, they will use different file. /usr/lib/<arch>/gtk-{2,3}.0 }} | ||
You need to use | You need to use | ||
− | gtk-query-immodules-2.0 > <gtk-2.0 immodule file> | + | <!--T:8--> |
+ | gtk-query-immodules-2.0 > <gtk-2.0 immodule file> | ||
+ | <!--T:9--> | ||
or | or | ||
− | gtk-query-immodules-3.0 --update-cache | + | <!--T:10--> |
+ | gtk-query-immodules-3.0 --update-cache | ||
+ | <!--T:11--> | ||
to update those file. Otherwise new im module will not be recognized. | to update those file. Otherwise new im module will not be recognized. | ||
+ | <!--T:12--> | ||
If no im module specified by GTK_IM_MODULE is found, it will fallback to auto select method. | If no im module specified by GTK_IM_MODULE is found, it will fallback to auto select method. | ||
− | == QT_IM_MODULE == | + | == QT_IM_MODULE == <!--T:13--> |
+ | <!--T:14--> | ||
Qt's im module is similar with Gtk, but don't need extra file to recognize. If QT_IM_MODULE is not specified, qtconfig (Ubuntu/Debian qtconfig-qt4) can be used to configure the default one. | Qt's im module is similar with Gtk, but don't need extra file to recognize. If QT_IM_MODULE is not specified, qtconfig (Ubuntu/Debian qtconfig-qt4) can be used to configure the default one. | ||
+ | <!--T:15--> | ||
Otherwise it will be override by QT_IM_MODULE. | Otherwise it will be override by QT_IM_MODULE. | ||
− | == LC_CTYPE == | + | == LC_CTYPE == <!--T:16--> |
+ | <!--T:17--> | ||
System locale should not be changed in all case. It might brings unpredictable effect. | System locale should not be changed in all case. It might brings unpredictable effect. | ||
+ | <!--T:18--> | ||
This should only be used in one case, that is emacs. Emacs has a [http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-02/msg00761.html historical bug], that under en_US.UTF-8 or similar locale, it will never use XIM (Those emacs is a gtk app, it use XIM). The only way to walkaround this is to use LC_CTYPE to fix this. | This should only be used in one case, that is emacs. Emacs has a [http://lists.gnu.org/archive/html/bug-gnu-emacs/2012-02/msg00761.html historical bug], that under en_US.UTF-8 or similar locale, it will never use XIM (Those emacs is a gtk app, it use XIM). The only way to walkaround this is to use LC_CTYPE to fix this. | ||
+ | <!--T:19--> | ||
To only set this with emacs, run emacs with | To only set this with emacs, run emacs with | ||
− | LC_CTYPE=zh_CN.UTF-8 emacs | + | <!--T:20--> |
+ | LC_CTYPE=zh_CN.UTF-8 emacs | ||
+ | <!--T:21--> | ||
It will not effect the display language of emacs. | It will not effect the display language of emacs. | ||
</translate> | </translate> |
Revision as of 05:11, 19 March 2012
This page introduce the meaning of following environment variables. You don't need to understand it to use Fcitx, but it might help when you meet some problem, and examine yourself to check what goes wrong.
XMODIFIERS
This variable affects XIM only. The format is
XMODIFIERS=@im=<xim server name>
When XIM server starts, it register a name, which will be used here. The name can not be same as other XIM server, so you cannot run two Fcitx under same X server.
GTK_IM_MODULE
This will override the system automatic gtk im module selection. By default gtk select im module by the language provided by im module. Fcitx declares that it support "zh:ja:ko:*". And this information will be record in a file, on most linux system it's /etc/gtk-2.0/gtk.immodules and /etc/gtk-3.0/gtk.immodules, or suffixed with -32 or -64.
{{warning|After Debian goes multiarch, they will use different file. /usr/lib/<arch>/gtk-{2,3}.0 }} You need to use
gtk-query-immodules-2.0 > <gtk-2.0 immodule file>
or
gtk-query-immodules-3.0 --update-cache
to update those file. Otherwise new im module will not be recognized.
If no im module specified by GTK_IM_MODULE is found, it will fallback to auto select method.
QT_IM_MODULE
Qt's im module is similar with Gtk, but don't need extra file to recognize. If QT_IM_MODULE is not specified, qtconfig (Ubuntu/Debian qtconfig-qt4) can be used to configure the default one.
Otherwise it will be override by QT_IM_MODULE.
LC_CTYPE
System locale should not be changed in all case. It might brings unpredictable effect.
This should only be used in one case, that is emacs. Emacs has a historical bug, that under en_US.UTF-8 or similar locale, it will never use XIM (Those emacs is a gtk app, it use XIM). The only way to walkaround this is to use LC_CTYPE to fix this.
To only set this with emacs, run emacs with
LC_CTYPE=zh_CN.UTF-8 emacs
It will not effect the display language of emacs.