ubuntu emacs not use fcitx input method

ubuntu linux emacs version 24 not use fcitx input method (write chinese word),

emacs24 default installed to "/usr/bin/" in this dir.

in this dir "/usr/local/bin/" created new a file,and file name "emacs"

command:"sudo touch emacs"

use vim modify this file "sudo vim emacs" and write the following content:

"#!/bin/bash
# Make Fcitx work in emacs
export LC_CTYPE=zh_CN.UTF-8;
/usr/bin/emacs "$@""

modify this file permission
sudo chmod ugo+rwx emacs

ok,now you can be in terminal run "emacs" command. started emacs ,you can be use fcitx input method ,write chinese word.
if you use ubuntu linux and in lanucher has emacs ico,,at the moment from lanucher start emacs not write chinese word.here startup emacs and in terminal is different,,those called different path for emacs,

in terminal called path is "/usr/local/bin" ,startup emacs from lanucher path is "/usr/bin"

now we moving to dir "/usr/share/applications" ,in here ,you see more ico,find to this file "emacs24.desktop"

we use vim editing it " sudo vim emacs24.desktop" ,
in file find to this line "Exec=/usr/bin/emacs24 %F"
instead it as “Exec=/usr/local/bin/emacs %F”

ok.now you whether in terminal startup emacs and startup emacs from lanucher,,you can be write chinese word.

finishing

    原文作者:wapeyang
    原文地址: https://segmentfault.com/a/1190000000573700
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞