ubuntu12.04 Gnome桌面fcitx4.25工作正常

来源:互联网 发布:电工理论与新技术 知乎 编辑:程序博客网 时间:2024/05/22 13:13



vmware虚拟机下使用ubuntu12.04,换成了gnome的界面,

安装了fcitx 4.25版本:



貌似使用gtk3,之前一直有个报错:

root@ubuntu:/home/zhangbin/vlc_store# apt-get install fcitx
Reading package lists... Done
Building dependency tree       
Reading state information... Done
fcitx is already the newest version.
The following packages were automatically installed and are no longer required:
  gir1.2-unique-3.0 python-lxml python-compizconfig
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
root@ubuntu:/home/zhangbin/vlc_store# apt-get autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  gir1.2-unique-3.0 python-compizconfig python-lxml
0 upgraded, 0 newly installed, 3 to remove and 32 not upgraded.
After this operation, 2,276 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 179984 files and directories currently installed.)
Removing gir1.2-unique-3.0 ...
Removing python-compizconfig ...
Removing python-lxml ...
root@ubuntu:/home/zhangbin/vlc_store# sudo apt-get purge ibus
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  ibus* ibus-pinyin* ibus-table*
0 upgraded, 0 newly installed, 3 to remove and 32 not upgraded.
After this operation, 3,273 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 179858 files and directories currently installed.)
Removing ibus-table ...
Removing ibus-pinyin ...
Removing ibus ...
update-alternatives: using /etc/X11/xinit/xinput.d/fcitx to provide /etc/X11/xinit/xinput.d/ja_JP (xinput-ja_JP) in auto mode.
update-alternatives: using /etc/X11/xinit/xinput.d/fcitx to provide /etc/X11/xinit/xinput.d/ko_KR (xinput-ko_KR) in auto mode.
update-alternatives: using /etc/X11/xinit/xinput.d/fcitx to provide /etc/X11/xinit/xinput.d/zh_TW (xinput-zh_TW) in auto mode.
update-alternatives: using /etc/X11/xinit/xinput.d/fcitx to provide /etc/X11/xinit/xinput.d/zh_HK (xinput-zh_HK) in auto mode.
Purging configuration files for ibus ...
Processing triggers for gconf2 ...
Processing triggers for man-db ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
root@ubuntu:/home/zhangbin/vlc_store# 


好像是dbus的报错:
zhangbin@ubuntu:~$ [INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-dbus.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-x11.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-xim.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-ipc.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-fullwidth-char.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-punc.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-autoeng.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-remote-module.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-googlepinyin.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-classic-ui.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-table.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-pinyin.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-chttrans.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-quickphrase.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-vk.conf
[WARN] /build/buildd/fcitx-4.2.0/src/module/dbus/dbusstuff.c:131-DBus Service Already Exists
[INFO] /build/buildd/fcitx-4.2.0/src/im/table/table.c:152-Load Table Config File:wbx.conf
[ERROR] /build/buildd/fcitx-4.2.0/src/frontend/xim/xim.c:245-Start XIM error. Another XIM daemon named fcitx is running?
[ERROR] /build/buildd/fcitx-4.2.0/src/frontend/ipc/ipc.c:248-DBus Not initialized
[ERROR] /build/buildd/fcitx-4.2.0/src/lib/fcitx/frontend.c:381-No available frontend



zhangbin@ubuntu:~$ apt-get remove fcitx
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
zhangbin@ubuntu:~$ 



root@ubuntu:/home/zhangbin# fcitx
root@ubuntu:/home/zhangbin# [INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-dbus.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-x11.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-xim.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-ipc.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-fullwidth-char.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-punc.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-autoeng.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-remote-module.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-googlepinyin.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-classic-ui.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-table.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-pinyin.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-chttrans.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-quickphrase.conf
[INFO] /build/buildd/fcitx-4.2.0/src/lib/fcitx/addon.c:99-Load Addon Config File:fcitx-vk.conf
[WARN] /build/buildd/fcitx-4.2.0/src/module/dbus/dbusstuff.c:86-Connection Error (Empty address '')






root@ubuntu:/home/zhangbin# [WARN] /build/buildd/fcitx-4.2.0/src/module/dbus/dbusstuff.c:86-Connection Error (Empty address '')
^C
root@ubuntu:/home/zhangbin# apt-get install ibus
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  ibus
0 upgraded, 1 newly installed, 0 to remove and 32 not upgraded.
Need to get 179 kB of archives.
After this operation, 1,069 kB of additional disk space will be used.
Get:1 http://mirrors.163.com/ubuntu/ precise/main ibus i386 1.4.1-3ubuntu1 [179 kB]
Fetched 179 kB in 0s (278 kB/s)
Selecting previously unselected package ibus.
(Reading database ... 179722 files and directories currently installed.)
Unpacking ibus (from .../ibus_1.4.1-3ubuntu1_i386.deb) ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
Processing triggers for gconf2 ...
Setting up ibus (1.4.1-3ubuntu1) ...
update-alternatives: using /etc/X11/xinit/xinput.d/ibus to provide /etc/X11/xinit/xinput.d/ja_JP (xinput-ja_JP) in auto mode.
update-alternatives: using /etc/X11/xinit/xinput.d/ibus to provide /etc/X11/xinit/xinput.d/ko_KR (xinput-ko_KR) in auto mode.
update-alternatives: using /etc/X11/xinit/xinput.d/ibus to provide /etc/X11/xinit/xinput.d/zh_TW (xinput-zh_TW) in auto mode.
update-alternatives: using /etc/X11/xinit/xinput.d/ibus to provide /etc/X11/xinit/xinput.d/zh_HK (xinput-zh_HK) in auto mode.
root@ubuntu:/home/zhangbin# 


root@ubuntu:/home/zhangbin# [WARN] /build/buildd/fcitx-4.2.0/src/module/dbus/dbusstuff.c:86-Connection Error (Empty address '')
^C



按照如下的方法重新设置了也不行:

1.去掉ibus,否则有冲突
$sudo apt-get purge ibus

2.设置环境变量,并默认启动
$vim .bashrc
export GTK_IM_MODULE=xim
export XMODIFIERS="@im=fcitx"
export QT_IM_MODULE=xim
fcitx& #当然,开机启动也可以在gnome-session-properties中添加

3.设置默认输入法
$gnome-language-selector 中选择fcitx

4.log out or reboot





root@ubuntu:/home/zhangbin#sudo add-apt-repository ppa:webupd8team/gnome3
You are about to add the following PPA to your system:
 GNOME 3 WebUpd8 PPA

Packages: Epiphany Browser (and extensions), GNOME Documents, GNOME Shell Extensions (official, but includes patches to prevent some crashes and to get some of the official extensions to work with the latest stable GNOME Shell), Tracker, WebKitGTK+, GPaste GNOME Shell clipboard manager, Mailnag GNOME3 mail notifier, other unofficial GNOME Shell extensions such as Pidgin Shell Extension, MediaPlayer, noa11y, Weather, System Monitor applet, Extended Places Menu, etc.
 More info: https://launchpad.net/~webupd8team/+archive/gnome3
Press [ENTER] to continue or ctrl-c to cancel adding it

Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.9hszeIEn5v --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp://keyserver.ubuntu.com:80/ --recv 7B2C3B0889BF5709A105D03AC2518248EEA14886
gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
[WARN] /build/buildd/fcitx-4.2.0/src/module/dbus/dbusstuff.c:86-Connection Error (Empty address '')
gpg: key EEA14886: public key "Launchpad VLC" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
root@ubuntu:/home/zhangbin# 



root@ubuntu:/home/zhangbin# apt-get install dbus
Reading package lists... Done
Building dependency tree       
Reading state information... Done
dbus is already the newest version.
[WARN] /build/buildd/fcitx-4.2.0/src/module/dbus/dbusstuff.c:86-Connection Error (Empty address '')
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.
W: Duplicate sources.list entry http://extras.ubuntu.com/ubuntu/ precise/main i386 Packages (/var/lib/apt/lists/extras.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages)
W: Duplicate sources.list entry http://extras.ubuntu.com/ubuntu/ precise/main i386 Packages (/var/lib/apt/lists/extras.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
root@ubuntu:/home/zhangbin# 

============================

fcix官方说:说是因为安装gnome桌面,而gtk3的bug,导致dbus有问题,不仅仅是fctix,ibus也弹不出来,我试验了下,确实如此。


===================================

(1)今天重新卸载了fcitx,然后重新安装。

(2)新安装了fcitx-tools

新安装了fcitx-m17n

(3)发现fcitx的配置界面更新了:



(4)在语言中设置默认的输入法:

application  --- system tools -----system settings---language support

选择fcitx。



(5)然后ctrl+space 切换输入法

工作正常了:

是fcitx更新了,还是我今天更新了系统的一些软件所致?

============



现在打开 终端输入看到的是:

zhangbin@ubuntu:~$ (INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-dbus.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-x11.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-xim.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-ipc.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-imselector.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-fullwidth-char.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-lua.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-sunpinyin.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-punc.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-autoeng.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-remote-module.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-googlepinyin.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-classic-ui.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-cloudpinyin.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-xkb.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-m17n.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-pinyin.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-chttrans.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-quickphrase.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-keyboard.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-kimpanel-ui.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-xkbdbus.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-unicode.conf
(INFO-7386 /build/buildd/fcitx-4.2.5/src/lib/fcitx/addon.c:100) Load Addon Config File:fcitx-vk.conf
(WARN-7386 /build/buildd/fcitx-4.2.5/src/module/dbus/dbusstuff.c:133) DBus Service Already Exists

这时候按下回车,有:

[1]+  Done                    fcitx
zhangbin@ubuntu:~$ 



========================

zhangbin@ubuntu:~$ sudo su
[sudo] password for zhangbin: 
root@ubuntu:/home/zhangbin# fcitx-config
No command 'fcitx-config' found, did you mean:
 Command 'fcitx4-config' from package 'fcitx-libs-dev' (universe)
fcitx-config: command not found
root@ubuntu:/home/zhangbin# fcitx4-config
The program 'fcitx4-config' is currently not installed.  You can install it by typing:
apt-get install fcitx-libs-dev
root@ubuntu:/home/zhangbin# apt-get install fcitx-libs-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  fcitx-libs-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 201 kB of archives.
After this operation, 865 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/fcitx-team/nightly/ubuntu/ precise/main fcitx-libs-dev i386 1:4.2.5-1~exp~precise [201 kB]
Fetched 201 kB in 7s (25.9 kB/s)                                               
Selecting previously unselected package fcitx-libs-dev.
(Reading database ... 209358 files and directories currently installed.)
Unpacking fcitx-libs-dev (from .../fcitx-libs-dev_1%3a4.2.5-1~exp~precise_i386.deb) ...
Processing triggers for doc-base ...
Processing 1 added doc-base file...
Registering documents with scrollkeeper...
Setting up fcitx-libs-dev (1:4.2.5-1~exp~precise) ...
root@ubuntu:/home/zhangbin# fcitx4-config
Usage: fcitx4-config [OPTION]


Known values for OPTION are:


  --package             Fcitx Package Name
  --prefix              Fcitx Install Prefix
  --exec-prefix         Fcitx Binary Prefix
  --libdir              Fcitx Library Prefix
  --includedir          Fcitx Include Prefix
  --addondir            Fcitx Addon Library Dir
  --configdescdir       Fcitx Configure Description File Dir
  --addonconfigdir      Fcitx Addon Config File Dir
  --imconfigdir         Fcitx Input Method Config File Dir
  --help                display this help and exit
  --version             output version information
root@ubuntu:/home/zhangbin# 




root@ubuntu:/home/zhangbin# fcitx4-config --prefix
/usr
root@ubuntu:/home/zhangbin# fcitx4-config --version
4.2.5
root@ubuntu:/home/zhangbin# fcitx4-config --libdir
/usr/lib/i386-linux-gnu
root@ubuntu:/home/zhangbin# fcitx4-config --exec-prefix
/usr
root@ubuntu:/home/zhangbin# fcitx4-config --package
fcitx
root@ubuntu:/home/zhangbin# fcitx4-config --imconfigdir
/usr/share/fcitx/inputmethod
root@ubuntu:/home/zhangbin# 

原创粉丝点击