在虚拟机上安装Ubuntu14.04 后安装ibus输入法,万万没想到在切换输入法的时候居然出错了!

无语了,再网上查了一下,这个错误出现的还是比较少的。

先说Ubuntu输入法(ibus)安装的一般步骤吧。

一、安装语言包

System Settings-->Language Support-->Install/Remove Languages

安装时间会稍微长一点。完成后注销一下。

如果不想安装中文语言包,则需要安装中文字体:

$ sudo apt-get install ttf-wqy-*
$ sudo apt-get install xfonts-wqy
$ sudo apt-get install fonts-wqy-*

二、安装iBus框架

sudo apt-get install ibus ibus-clutter ibus-gtk ibus-gtk3 ibus-qt4
im-switch -s ibus

我就是在这一步出错的,先不用理他,继续往下安装

IBus拼音:sudo apt-get install ibus-pinyin
IBUS五笔:sudo apt-get install ibus-table-wubi
谷歌拼音输入法:sudo apt-get install ibus-googlepinyin
Sun拼音输入法:sudo apt-get install ibus-sunpinyin
ibus-setup

在这里添加中文的输入法

如果没有在右上角出现图标使用这个命令找回图标

ibus-daemon –drx

三、错误解决:

=======执行im-switch -s ibus出错:no configuration file “ibus” exists.============

通过如下命令来设置系统默认的输入法框架:

$ im-switch

从上图可以看到在这里可以设置在当前环境下,X下默认的输入法框架。注意,图上选不到ibus!!查阅资料,好多都说是要重启ibus:

$ sudo killall ibus-daemon
$ sudo ibus-daemon -d –xim

重启ibus对于在托盘看不到输入法图标是管用的,但这里ibus启动正常,只是没法输入。问题的关键就在于im-switch中设定了当前环境关联的输入法框架是什么,很显然它没有关联ibus,而当试图通过命令:

$ im-switch -s ibus

来关联的时候提示:no configuration file “ibus” exists。上图所列的是im-switch下配置的输入法框架,这些配置文件放置在目录

/etc/X11/xinit/xinput.d/
$ cd /etc/X11/xinit/xinput.d/
$ sudo cp default ibus
$ sudo vim ibus

在Vim中编辑配置项:

XIM=ibus
XIM_PROGRAM=/usr/bin/ibus-daemon
XIM_ARGS="—xim"

创建好配置文件之后再重新启动im-switch,就可以发现这回能够选择到ibus,而括号里面的就是我们的配置文件名,通过配置文件将设置指向了ibus的守护进程ibu-daemon,这样每次X在启动的时候就能自动关联该输入法,如下:

然后就OK了~~~~

本文参考了:

1、www.imchaser.com/apts/359.html

2、blog.163.com/china_uv/blog/static/11713726720136922632636/

im-switch -s ibus错误:Error: no configuration file "ibus" exists.的更多相关文章

  1. (救星啊)im-switch -s ibus错误:Error: no configuration file "ibus" exists.

    转自:http://www.cnblogs.com/csulennon/p/4194902.html 在虚拟机上安装Ubuntu14.04 后安装ibus输入法,万万没想到在切换输入法的时候居然出错了 ...

  2. [ERROR ] Error parsing configuration file: /etc/salt/minion - conf should be a document, not <type 'str'>.

    错误信息 [ERROR ] Error parsing configuration file: /etc/salt/minion - conf should be a document, not &l ...

  3. 关于quartusII 错误 Error: Current license file does not support the EP*** device 错误原因总结

    关于quartusII 错误 Error: Current license file does not support the EP*** device 错误原因总结 第一,有的人用了破解文件lice ...

  4. cvsnt报错:Administrator: Switch to user failed due to configuration error. Contact your System Administrator

    在安装CVSNT一开始用Administrator登录时总是报[login aborted]Switch to user failed due to configuration error. Cont ...

  5. 怎样处理“error C2220: warning treated as error - no object file generated”错误

    最近用VS2010 编译ceflib开源库是出现"怎样处理"error C2220: warning treated as error - no object file gener ...

  6. VS EF Error: Configuration Error extension=".edmx" type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider"

    错误截图: Configuration Error :<add extension=".edmx" type="System.Data.Entity.Design. ...

  7. 测试中出现ERROR StatusLogger No log4j2 configuration file

    概述 在hibernate框架搭建完成用log4j2进行测试时,总是出现ERROR StatusLogger No log4j2 configuration file found. Using def ...

  8. Flutter采坑之路 Run Configuration error:broken configuration due to unavailable

    今天把AndroidStudio升级成了3.3.1 原先还能编译成功的Flutter工程突然连编译都不行了, 错误是 Run Configuration error:broken configurat ...

  9. hadoop 出现FATAL conf.Configuration: error parsing conf file,异常

    FATAL conf.Configuration: error parsing conf file: com.sun.org.apache.xerces.internal.impl.io.Malfor ...

随机推荐

  1. lintcode101 删除排序数组中的重复数字 II

    删除排序数组中的重复数字 II   跟进“删除重复数字”: 如果可以允许出现两次重复将如何处理? 在:lintcode100删除排序数组中的重复数字 的基础上进行改进. class Solution ...

  2. nordic mesh中的消息缓存实现

    nordic mesh中的消息缓存实现 代码文件msg_cache.h.msg_cache.c. 接口定义 头文件中定义了四个接口,供mesh协议栈调用,四个接口如下所示,接口的实现代码在msg_ca ...

  3. C#通过gridview导出excel

    [CustomAuthorize]        public FileResult ExportQuestionCenterExcel(SearchBaseQuestion search)      ...

  4. struts2之form标签theme属性详解

    struts2中theme属性包括xhtml,html,simple,ajax .默认是xhtml theme:设置struts2标签的主题,默认为xhtml. theme=xhtml时:会默认额外生 ...

  5. Python中__name__属性的妙用

    在Python中,每一个module文件都有一个built-in属性:__name__,这个__name__有如下特点: 1 如果这个module文件是被别的文件导入的,那么,该__name__属性的 ...

  6. 什么是Frozen Binary

    对于Python来说,你可以将Python的字节码,PVM(也就是解析器),以及需要的相关类库,打包成一个package,这个package实际上是一个二进制可执行文件,这样,用户获取到这个packa ...

  7. Python练习——循环2

    1.求1~100之间能被7整除,但不能同时被5整除的所有整数 . for i in range(1,101): if i%7 == 0 and i%5 !=0: print(i) 2.输出“水仙花数” ...

  8. Python基础1 Hello World!

    从今天开始和大家分享一下python最基础的知识,以便帮助初学者快速入门. 最最基础的当然是hello world 了,无论哪门语言都会从它开始... 简单的‘Hello World!’ 1. 直接运 ...

  9. eg_3

    3. 编写一个程序,返回一个 double 类型的二维数组,数组中的元素通过解析字符串参数获得,如字符串参数:“1,2;3,4,5;6,7,8”,则对应的数组为: d[0][0]=1.0, d[0][ ...

  10. HDU 2163 Palindromes

    http://acm.hdu.edu.cn/showproblem.php?pid=2163 Problem Description Write a program to determine whet ...