您尚未登录。

#1 2020-05-09 12:42:10

WINYHZ
会员
注册时间: 2020-05-06
帖子: 2

解决gnome下安装ibus无法随gdm启动的问题

archlinux的wiki中介绍ibus随gdm启动需要在~/.profile中加入这几条,然后重启

   export GTK_IM_MODULE=ibus
   export XMODIFIERS=@im=ibus
   export QT_IM_MODULE=ibus
   ibus-daemon -d -x

但是我发现这个过程会创建一个.profile的文件,但是gdm却并没有读取命令。

之后我在home目录下发现了一个名叫.bash_profile的文件,你们没有看错,他们都有一个profile。

你们大概发觉了问题所在,没错,我们应该在这个文件.bash_profile添加那四条命令。

保存注销之后,不出意外,ibus就会随gdm启动了。

添加输入法就在gnome的语言设置那里添加,前提是下载好了输入法引擎。

其实主要作用的是这一条命令

   ibus-daemon -d -x

这条命令是用来重新启动ibus ,也可以写成ibus-daemon -rdx或者后面是-x -d

最近编辑记录 WINYHZ (2020-05-09 12:51:06)

离线

#2 2020-05-09 13:37:23

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,433
个人网站

Re: 解决gnome下安装ibus无法随gdm启动的问题

WINYHZ 说:

没错,我们应该在这个文件.bash_profile添加那四条命令。

错了。

man bash 说:

       When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and
       executes  commands  from  the file /etc/profile, if that file exists.  After reading that file, it looks for ~/.bash_profile,
       ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.

你之所以遇到问题,是因为你用了罕见的 .bash_profile 文件,所以 bash 不读 .profile 文件了而已。

离线

#3 2020-05-09 15:31:44

WINYHZ
会员
注册时间: 2020-05-06
帖子: 2

Re: 解决gnome下安装ibus无法随gdm启动的问题

原来是这样,谢谢大佬指出。

离线

页脚