Introduction :Ubuntu under the use of Sogou Pinyin, before the normal use, but in recent days the input method began to wind, unable to output Chinese, after

! [](https://upload-images.jianshu.io/upload_images/24762785-c8af03aae1b502a9.jpg?imageMogr2/auto-orient/strip%7CimageView 2/2/w/1240)

The speed of typing Chinese suddenly quickened up. However, when I opened idea, PHPStorm, sublime and other software, I was dumbstruck and found that I could not input Chinese. Although I was used to writing English annotations for coding, I still needed some complicated logic

! [](https://upload-images.jianshu.io/upload_images/24762785-60493a2f2fd7339a.jpg?imageMogr2/auto-orient/strip%7CimageView 2/2/w/1240)

It would be better to explain it in Chinese. So to Google search for a long time, finally found a reliable, simple solution, in this record for later review.

If you have a problem with C/C++ one item is a very enthusiastic one (● ‘◡’ ●).

(1) If you use KDM, GDM, LightDM, etc display manager, please add the following code in ~/.xprofile; If you start with startx or Slim, where.xinitrc is used, add ~/.xinitrc instead:

exportGTK_IM_MODULE=fcitxexportQT_IM_MODULE=fcitxexportXMODIFIERS=”@im=fcitx”

After adding this, you can enter Chinese in the gedit text editor

! [](https://upload-images.jianshu.io/upload_images/24762785-39471dd21a9a8656.jpg?imageMogr2/auto-orient/strip%7CimageView 2/2/w/1240)

(2) If the IDE can not input Chinese, such as java-idea phpstorm, etc., need to start the script, idea.sh or phpstrom.sh to add

XMODIFIERS=”@im=fcitx”exportXMODIFIERS