Difference between revisions of "Configure (Other)/zh-hans"
Weng Xuetian (talk | contribs) (Created page with "并且确认,当你打开任意gtk程序的时候,在一个输入框点击鼠标右键,在输入法菜单中有一个fcitx的项目,例如") |
Weng Xuetian (talk | contribs) (Created page with "并且确认当你打开任意qt程序时,右键点击任意输入框,将有一项fcitx在输入法菜单中,例如") |
||
Line 17: | Line 17: | ||
[[File:GtkInputMethodMenu.png]] | [[File:GtkInputMethodMenu.png]] | ||
− | + | 并且确认当你打开任意qt程序时,右键点击任意输入框,将有一项fcitx在输入法菜单中,例如 | |
[[File:QtInputMethod.png]] | [[File:QtInputMethod.png]] |
Revision as of 23:41, 2 February 2016
配置环境变量
除了Ubuntu、Debian、Fedora、OpenSUSE外的其他发行版没有可以配置fcitx所需环境变量的工具。
如果要尽量简单的说明怎样设置的话,如果你在使用一个图形化的界面来进行用户名的输入并登录,你需要添加
export GTK_IM_MODULE=fcitx export QT_IM_MODULE=fcitx export XMODIFIERS=@im=fcitx
到你的 ~/.xprofile (这是一个隐藏文件,因为文件名由“点”开头),用你最喜欢的编辑器打开编辑它,例如gedit,kwrite,vim,emacs。
并且确认,当你打开任意gtk程序的时候,在一个输入框点击鼠标右键,在输入法菜单中有一个fcitx的项目,例如
并且确认当你打开任意qt程序时,右键点击任意输入框,将有一项fcitx在输入法菜单中,例如
It doesn't have to be selected if you haven't logout and re-login to make your setting effects, but you need to make sure they are selected after you change the setting and re-login.
Advance
If you can complete the step above, you don't need to bother following description.
Fcitx can use XIM or Fcitx's own DBus protocol to communicate with input program. Since 4.1, Fcitx provides GTK2/3 and Qt4 input method module, in order to provides better experience in those application, it's highly recommended to use im module instead of XIM, in order to avoid unresolvable problem.
There are several places to setup environment variable. It depends on how you start up your Display Server.
Requires following lines.
export GTK_IM_MODULE=fcitx # or xim export QT_IM_MODULE=fcitx # or xim export XMODIFIERS=@im=fcitx
Use GDM/KDM/LightDM/Slim (Session Mode)
~/.xprofile is the best choice (If not exists, create a new one), since it will only affect X and will not pollute to other console environment. Some other people might like to use ~/.profile (Affect whenever you login), or /etc/profile (Global profile).
Use Slim (~/.xinitrc)/startx
In that case, you are using ~/.xinitrc to startup, you also need those lines in your ~/.xinitrc. And depends on you use DBus (im module and kimpanel need it), you might want to add
eval `dbus-launch --sh-syntax --exit-with-session`
At the head, to make sure DBus correctly initialized.
With newer slim, you may need this instead:
dbus-launch --sh-syntax --exit-with-session > /dev/null
Other environment
Maybe you are using vncserver, or something else, you need to figure out your start script, for example, vncserver use ~/.vnc/xstartup. Treat it similar with ~/.xinitrc.
Autostart
For ~/.xinitrc, you can put fcitx to your ~/.xinitrc. Fcitx will run as daemon by default, so no need to use fcitx & to start it.
If you running a XDG compatible desktop, for example, Gnome, KDE, LXDE, Xfce, you can run
cp /usr/share/applications/fcitx.desktop ~/.config/autostart/fcitx.desktop
To add fcitx to your autostart. You can also use tool provided by your desktop to do the same thing.