# I can't use fcitx?



## miracle20003 (Jan 2, 2013)

If I use `lstxt`, I can't use fcitx imput method!
I use userxx to login! I use FreeBSD 9.0-RELEASE !
/home/userxx/.cshrc

```
#setenv  LC_TYPE zh_CN.UTF-8
setenv  XMODIFIERS @im='fcitx'
setenv  QT_IM_MODULE fcitx
setenv  GTK_IM_MODULE fcitx
```
/home/userxx/.xinitrc

```
export LC_CTYPE=zh_CN.UTF-8
fcitx -d &
exec ck-launch-session dbus-launch --exit-with-session openbox-session
```
/root/.cshrc

```
#setenv  LC_TYPE zh_CN.UTF-8
setenv  XMODIFIERS @im='fcitx'
setenv  QT_IM_MODULE fcitx
setenv  GTK_IM_MODULE fcitx
```
/root/.xinitrc

```
export LC_CTYPE=zh_CN.UTF-8
fcitx -d &
exec ck-launch-session dbus-launch --exit-with-session openbox-session
```

What's the problem?
How to fix it!


----------



## xiaopeng (Jan 12, 2013)

Don't ask this question in this forums, you should ask it in an Chinese forums.


----------



## wblock@ (Jan 12, 2013)

There may be some people here who know about it.  If/when you find an answer, please post it here.

PS: my compliments to miracle20003 on the post formatting.  Nicely done!


----------



## yyc1992 (Jan 12, 2013)

1. You need to set the environment variable before you start fcitx and X. And not every time you open a terminal. I don't really think your cshrc is a good choice, either .xprofile (if you are using a dm) or .xinit (since it seems that you start X session in this way) may be a better choice for you.
2. Please make sure you have installed fcitx-gtk/qt immodule (you probably have already done that) using the instructions (and screenshots) on this[1] page to check that.
3. You need to start fcitx after dbus starts especially if you are not using the newest version. (fcitx <= 4.2.4 may not be able to connect to dbus if you start it before dbus (and before any dbus-related env are set)).  I'm not an openbox export but either start fcitx in openbox's init file or making openbox support xdg-autostart may be a good way. (And you just need to use `fcitx` instead of `fcitx -d &` to start fcitx although the latter one won't cause any issue either.)

If you still have any problem after all of these are done, please try running this[3] script and paste the output (you may want to paste the output on github (gist) since that can make it looks prettier).

P.S. Please ask these questions about fcitx @ our googlegroup (or twitter). It is impossible for us to monitor all fcitx related questions on each individual forum, mailinglist etc..

[1] http://fcitx-im.org/wiki/Configure_(Other)
[2] http://fcitx-im.org/wiki/How_to_contact_with_Fcitx_team
[3] https://github.com/fcitx/fcitx/blob/master/data/script/fcitx-diagnose.sh


----------



## yyc1992 (Jan 12, 2013)

Haven't noticed *u r* you are saying using fcitx in sudo.

Gtk and Qt im_modules based on dbus will generally not work when *u r* you are using sudo (unless *u* you set a lot of environment variables that are cleared by sudo correctly including HOME), so in order to use fcitx in a sudo program, *u* you need to set GTK_IM_MODULE (ur your case) or QT_IM_MODULE (for QT program) to xim instead of fcitx. (I'm not really sure if *ur* your init/rc files for root can do this.)


----------



## falkenphun (Apr 29, 2014)

Thanks @yyc1992! It works after I created .xprofile with adding the line fcitx in the home directory.


----------



## scottro (Apr 29, 2014)

By the way, the link is not showing properly.  It shows as http://fcitx-im.org/wiki/Configure_(Other  with a missing closing parenthesis.  

I haven't yet given fcitx a real tryout on anything.   Are there any obvious reasons to use it over ibus?  If using it with Japanese, are most people using mozc or anthy?


----------



## SirDice (Apr 30, 2014)

miracle20003 said:
			
		

> I use FreeBSD 9.0-RELEASE !


Not related to your problem but please upgrade to 9.1, 9.2 or 10.0. FreeBSD 9.0 went end-of-life in March 2013 and is not supported any more.

Topics about unsupported FreeBSD versions


----------



## scottro (Jun 19, 2015)

I realize this is an old post, but it comes out on google when looking for `fcitx` and FreeBSD. 

As mentioned in my latest thread on this, at  https://forums.freebsd.org/threads/japanese-input-in-freebsd-10.46315, I had to edit my $HOME/.config/fcitx/profile  to get fcitx working properly. In my case, I had to change mozc:False to mozc:True, this would vary upon the user's input method.

In any case, to someone who comes upon this thread searching how to get fcitx working with FreeBSD and Japanese input, I'm going to spam my own page at http://srobb.net/jpninpt.html
(Hrrm, if I don't have ads on the page, is it spamming?)


----------



## scottro (Jun 29, 2015)

Since the whole reason I resurrected this was because it comes up on google, I should add information.  I found out that there's a separate chinese/fcitx-configtool.  If you install that too, you can run it, click the plus sign to add a language, uncheck the box to only show installed languages which will give a list of languages, click Japanese and add mozc from there. I go into more detail on my page (which has a link in the previous post.) So, it's not necessary to stop X and manually edit the file if you don't want to do so.


----------

