<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://fcitx-im.org/index.php?action=history&amp;feed=atom&amp;title=Input_method_related_environment_variables%2Fen</id>
	<title>Input method related environment variables/en - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://fcitx-im.org/index.php?action=history&amp;feed=atom&amp;title=Input_method_related_environment_variables%2Fen"/>
	<link rel="alternate" type="text/html" href="https://fcitx-im.org/index.php?title=Input_method_related_environment_variables/en&amp;action=history"/>
	<updated>2026-05-03T11:25:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://fcitx-im.org/index.php?title=Input_method_related_environment_variables/en&amp;diff=1402&amp;oldid=prev</id>
		<title>FuzzyBot: Importing a new version from external source</title>
		<link rel="alternate" type="text/html" href="https://fcitx-im.org/index.php?title=Input_method_related_environment_variables/en&amp;diff=1402&amp;oldid=prev"/>
		<updated>2016-02-02T23:17:36Z</updated>

		<summary type="html">&lt;p&gt;Importing a new version from external source&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;languages/&amp;gt;&lt;br /&gt;
This page introduces the meaning of following environment variables. You don&amp;#039;t need to understand it to use Fcitx, but it might help when you meet some problem, and let you examine what&amp;#039;s going wrong.&lt;br /&gt;
&lt;br /&gt;
== XMODIFIERS ==&lt;br /&gt;
This variable affects XIM only. The format is&lt;br /&gt;
&lt;br /&gt;
 XMODIFIERS=@im=&amp;lt;xim server name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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. In general case, the XIM server name of Fcitx will be fcitx.&lt;br /&gt;
&lt;br /&gt;
So the settings for Fcitx will be &lt;br /&gt;
&lt;br /&gt;
XMODIFIERS=@im=fcitx&lt;br /&gt;
&lt;br /&gt;
In non-CJK locale, if this variable is not specified, XIM will not work for some application, which means you should always set it. And XIM will also need you to have correct locale, which means your locale is must in the output of&lt;br /&gt;
&lt;br /&gt;
 locale -a&lt;br /&gt;
&lt;br /&gt;
You can check your locale by&lt;br /&gt;
&lt;br /&gt;
 locale&lt;br /&gt;
&lt;br /&gt;
In order to use XIM, your locale also must NOT be C or POSIX.&lt;br /&gt;
&lt;br /&gt;
== GTK_IM_MODULE ==&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;zh:ja:ko:*&amp;quot;. And this information will be record in a file, on most linux system it&amp;#039;s /etc/gtk-2.0/gtk.immodules and /etc/gtk-3.0/gtk.immodules, or suffixed with -32 or -64.&lt;br /&gt;
&lt;br /&gt;
{{warning|After Debian goes multiarch, they will use different file. The file will be /usr/lib/&amp;lt;arch&amp;gt;/gtk-{2,3}.0/gtk.immodules }}&lt;br /&gt;
You need to use&lt;br /&gt;
&lt;br /&gt;
 gtk-query-immodules-2.0 &amp;gt; &amp;lt;gtk-2.0 immodule file&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to do update for gtk2.&lt;br /&gt;
&lt;br /&gt;
Or if your gtk2 version is newer than 2.24.20, you should use&lt;br /&gt;
&lt;br /&gt;
 gtk-query-immodules-2.0 --update-cache&lt;br /&gt;
&lt;br /&gt;
instead just like gtk3.&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
 gtk-query-immodules-3.0 --update-cache&lt;br /&gt;
&lt;br /&gt;
to do update for gtk3.&lt;br /&gt;
&lt;br /&gt;
Otherwise new im module will not be recognized.&lt;br /&gt;
&lt;br /&gt;
If no im module specified by GTK_IM_MODULE is found, it will fallback to auto select method.&lt;br /&gt;
&lt;br /&gt;
== QT_IM_MODULE ==&lt;br /&gt;
&lt;br /&gt;
Qt&amp;#039;s im module is similar with Gtk, but don&amp;#039;t need extra file to recognize. If QT_IM_MODULE is not specified, qtconfig (Ubuntu/Debian/ArchLinux qtconfig-qt4) can be used to configure the default one.&lt;br /&gt;
&lt;br /&gt;
Otherwise it will be override by QT_IM_MODULE.&lt;br /&gt;
&lt;br /&gt;
== LC_CTYPE ==&lt;br /&gt;
&lt;br /&gt;
System locale should not be changed in all case. It might brings unpredictable effect.&lt;br /&gt;
&lt;br /&gt;
This should only be used in some case, including emacs and java. 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 (Though emacs is a gtk app, it use XIM). The only way to walkaround this is to use LC_CTYPE to fix this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, to only set this with emacs, run emacs with&lt;br /&gt;
&lt;br /&gt;
 LC_CTYPE=zh_CN.UTF-8 emacs&lt;br /&gt;
&lt;br /&gt;
It will not effect the display language of emacs.&lt;br /&gt;
&lt;br /&gt;
Notice, even if you are not using Chinese, you should also try to set it so LC_CTYPE=zh_CN.UTF-8, due to some limitation of XIM.&lt;/div&gt;</summary>
		<author><name>FuzzyBot</name></author>
	</entry>
</feed>