--- strip-1.4.6.pre12.orig/gcin-conf.h
+++ strip-1.4.6.pre12/gcin-conf.h
@@ -16,6 +16,7 @@
 #define GCIN_POP_UP_WIN "gcin-pop-up-win"
 #define GCIN_INNER_FRAME "gcin-inner-frame"
 #define GCIN_INIT_IM_ENABLED "gcin-init-im-enabled"
+#define GCIN_XIM_ENABLED "gcin-xim-enabled"
 #define GCIN_BELL_VOLUME "gcin-bell-volume"
 #define GCIN_SOUND_PLAY_OVERLAP "gcin-sound-play-overlap"
 #define GCIN_ENABLE_CTRL_ALT_SWITCH "gcin-enable-ctrl-alt-switch"
@@ -119,6 +120,7 @@
 extern char *gcin_win_color_fg, *gcin_win_color_bg;
 extern int gcin_win_color_use, gcin_bell_off;
 extern int gcin_init_im_enabled, gcin_win32_icon;
+extern int gcin_xim_enabled;
 extern int gcb_enabled, gcb_position, gcb_position_x, gcb_position_y, gcin_edit_display;
 
 void get_gcin_user_fname(char *name, char fname[]);
--- strip-1.4.6.pre12.orig/gcin-settings.cpp
+++ strip-1.4.6.pre12/gcin-settings.cpp
@@ -8,6 +8,7 @@
 int left_right_button_tips;
 int gcin_im_toggle_keys, gcin_bell_off;
 int gcin_capslock_lower, gcin_eng_phrase_enabled, gcin_init_im_enabled;
+int gcin_xim_enabled;
 int gcin_win_sym_click_close, gcin_edit_display, gcin_win32_icon;
 
 int gtab_dup_select_bell;
@@ -81,6 +82,7 @@
   gcin_eng_phrase_enabled = get_gcin_conf_int(GCIN_ENG_PHRASE_ENABLED, 1);
 #if UNIX
   gcin_init_im_enabled = get_gcin_conf_int(GCIN_INIT_IM_ENABLED, 0);
+  gcin_xim_enabled = get_gcin_conf_int(GCIN_XIM_ENABLED, 1);
 #else
   gcin_init_im_enabled = true;
 #endif
--- strip-1.4.6.pre12.orig/gcin.cpp
+++ strip-1.4.6.pre12/gcin.cpp
@@ -509,7 +509,11 @@
   char *lc_all = getenv("LC_ALL");
   char *lang = getenv("LANG");
 
-  dbg("gcin get env LC_CTYPE=%s  LC_ALL=%s  LANG=%s\n", lc_ctype, lc_all, lang);
+  load_setttings();
+  if (argc == 2 && (!strcmp(argv[1], "-noxim")))
+    gcin_xim_enabled = 0;
+  if (gcin_xim_enabled)
+    dbg("gcin get env LC_CTYPE=%s  LC_ALL=%s  LANG=%s\n", lc_ctype, lc_all, lang);
 
   if (!lc_ctype && lang)
     lc_ctype = lang;
@@ -545,7 +549,8 @@
 #endif
 
 #if USE_XIM
-  dbg("gcin XIM will use %s as the default encoding\n", lc_ctype);
+  if (gcin_xim_enabled)
+    dbg("gcin XIM will use %s as the default encoding\n", lc_ctype);
 #endif
 
   if (argc == 2 && (!strcmp(argv[1], "-v") || !strcmp(argv[1], "--version") || !strcmp(argv[1], "-h")) ) {
@@ -553,7 +558,6 @@
   }
 
   init_TableDir();
-  load_setttings();
   load_gtab_list();
 
   gtk_init (&argc, &argv);
@@ -571,7 +575,8 @@
 #endif
 
 #if USE_XIM
-  open_xim();
+  if (gcin_xim_enabled)
+    open_xim();
 #endif
 
 #if UNIX
