您尚未登录。

#1 2015-11-02 10:34:31

Archnew
会员
注册时间: 2015-09-20
帖子: 147

archlinux login

archlinux本来可以使用startx登录,但是更新后,无法使用startx登录


使用startx登录是为了解决输入法无法正常切换的问题,因为直接startxfce4可以进入桌面系统,但是无法正常切换输入法,所以改用startx,本来使用一切 正常,但是最近更新后,发现startx无法进入系统,使用startxfce4可以进入,但是输入法又不能正常切换了


懒是一切的原罪

离线

#2 2015-11-02 12:56:24

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

Re: archlinux login

输入法不正常那是没有设置好相关的环境变量吧。

「无法使用startx登录」是个什么情况呢?

离线

#3 2015-11-02 16:33:18

泉夏禾
会员
注册时间: 2014-03-01
帖子: 38

Re: archlinux login

把xinitrc贴出来,不然别人没法儿知道哪里出错了。
fcitx-diagnose输出也应一同贴出。

还有,一般都(推荐)使用startx,而非startxfce4进入,因为有些预置的项(/etc/X11/xinit/xinitrc.d/*)startxfce4似乎不会处理。而如何为startxfce4设置clientrc(即xinitrc)是undocumented的。


The community-maintained ArchWiki is the primary resource that should be consulted if issues arise.

离线

#4 2015-11-03 07:36:21

Archnew
会员
注册时间: 2015-09-20
帖子: 147

Re: archlinux login

cjxgm 说:

    Archnew 说:

        百合仙子 说:

            Archnew 说:

                普通用户下的和root用户下的~/.xinitrc都是这三行,我使用的命令 是nano ~/.xinitrc

                export GTK_IM_MODULE=fcitx
                export QT_IM_MODULE=fcitx
                export XMODIFIERS="@im=fcitx"

            哦这样。

            我把 startxfce4 找来看了一下,startxfce4 并不使用这个文件的…………看文件末尾,它使用的是自己的一份,所以你得去改它……

        好的,非常感谢你的时间和专业,也就是说这个文件里的这三行可以删除了

    或者在 xinitrc 里最后加一个 startxfce4,然后用 startx 开
    或者装个登录管理器

谢谢,好的,我试试,这个方法可行谢谢







ps:这是之前通过startx代替startxfce4登录解决输入法问题的,配置应该都正确,
原地址http://bbs.archlinuxcn.org/viewtopic.php?id=3726

最近编辑记录 Archnew (2015-11-03 07:38:52)


懒是一切的原罪

离线

#5 2015-11-03 07:47:07

Archnew
会员
注册时间: 2015-09-20
帖子: 147

Re: archlinux login

泉夏禾 说:

把xinitrc贴出来,不然别人没法儿知道哪里出错了。
fcitx-diagnose输出也应一同贴出。

还有,一般都(推荐)使用startx,而非startxfce4进入,因为有些预置的项(/etc/X11/xinit/xinitrc.d/*)startxfce4似乎不会处理。而如何为startxfce4设置clientrc(即xinitrc)是undocumented的。

xinitrc

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
startxfce4

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login
exec openbox-session

fcitx-diagnose

[xiaoming@Arch ~]$ fcitx-diagnose
# 系统信息:
1.  `uname -a`:

        Linux Arch 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:28:41 CET 2015 i686 GNU/Linux

2.  `lsb_release`:

    `lsb_release` 未找到.

3.  `/etc/lsb-release`:

    `/etc/lsb-release` 未找到.

4.  `/etc/os-release`:

        NAME="Arch Linux"
        ID=arch
        PRETTY_NAME="Arch Linux"
        ANSI_COLOR="0;36"
        HOME_URL="https://www.archlinux.org/"
        SUPPORT_URL="https://bbs.archlinux.org/"
        BUG_REPORT_URL="https://bugs.archlinux.org/"

5.  桌面环境:

    桌面环境为 `xfce`。

6.  Bash Version:

        BASH_VERSION='4.3.42(1)-release'

# 环境:
1.  DISPLAY:

        DISPLAY=':0.0'

2.  键盘布局:

    1.  `setxkbmap`:

            xkb_keymap {
            	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
            	xkb_types     { include "complete"	};
            	xkb_compat    { include "complete"	};
            	xkb_symbols   { include "pc+us+inet(evdev)"	};
            	xkb_geometry  { include "pc(pc104)"	};
            };

    2.  `xprop`:

            _XKB_RULES_NAMES(STRING) = "evdev", "pc104", "us", "", ""

3.  Locale:

    1.  全部可用 locale:

            C
            en_US.utf8
            POSIX
            zh_CN
            zh_CN.gb18030
            zh_CN.gb2312
            zh_CN.gbk
            zh_CN.utf8

    2.  当前 locale:

            LANG=zh_CN.UTF-8
            LC_CTYPE="zh_CN.UTF-8"
            LC_NUMERIC="zh_CN.UTF-8"
            LC_TIME="zh_CN.UTF-8"
            LC_COLLATE="zh_CN.UTF-8"
            LC_MONETARY="zh_CN.UTF-8"
            LC_MESSAGES="zh_CN.UTF-8"
            LC_PAPER="zh_CN.UTF-8"
            LC_NAME="zh_CN.UTF-8"
            LC_ADDRESS="zh_CN.UTF-8"
            LC_TELEPHONE="zh_CN.UTF-8"
            LC_MEASUREMENT="zh_CN.UTF-8"
            LC_IDENTIFICATION="zh_CN.UTF-8"
            LC_ALL=

4.  目录:

    1.  主目录:

            /home/xiaowen

    2.  `${XDG_CONFIG_HOME}`:

        环境变量 `XDG_CONFIG_HOME` 没有设定。

        `XDG_CONFIG_HOME` 的当前值是 `~/.config` (`/home/xiaowen/.config`)。

    3.  Fcitx 设置目录:

        当前 fcitx 设置目录是 `~/.config/fcitx` (`/home/xiaowen/.config/fcitx`)。

5.  当前用户:

    脚本作为 xiaowen (1000) 运行。

# Fcitx 状态:
1.  可执行文件:

    在 `/usr/bin/fcitx` 找到了 fcitx.

2.  版本:

    Fcitx 版本: `4.2.9`

3.  进程:

    找到了 2 个 fcitx 进程:

          638 fcitx
          665 fcitx-dbus-watc

4.  `fcitx-remote`:

    `fcitx-remote` 工作正常.

# Fcitx 配置界面:
1.  配置工具封装:

    在 `/usr/bin/fcitx-configtool` 找到了 fcitx-configtool。

2.  用于 GTK+-2.0 的配置界面:

    **未找到 gtk2 的配置界面.**

3.  用于 GTK+-3.0 的配置界面:

    在 `/usr/bin/fcitx-config-gtk3` 找到了 `fcitx-config-gtk3`。

4.  KDE 的配置界面:

    **`kcmshell4` 未找到.**

# 前端设置:
## Xim:
1.  `${XMODIFIERS}`:

    **XMODIFIERS 没有设置**

    **请使用您发行版提供的工具将环境变量 XMODIFIERS 设为 "@im=fcitx" 或者将 `export XMODIFIERS=@im=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: XMODIFIERS](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#XMODIFIERS).**
    从环境变量中获取的 Xim 服务名称为 fcitx.

2.  根窗口上的 XIM_SERVERS:

    Xim 服务的名称与环境变量中设置的相同.

## Qt:
1.  qt4 - `${QT4_IM_MODULE}`:

    **请使用您发行版提供的工具将环境变量 QT_IM_MODULE 设为 "fcitx" 或者将 `export QT_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#QT_IM_MODULE).**

2.  qt5 - `${QT_IM_MODULE}`:

    **请使用您发行版提供的工具将环境变量 QT_IM_MODULE 设为 "fcitx" 或者将 `export QT_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#QT_IM_MODULE).**

3.  Qt 输入法模块文件:
    找到了 Qt4 的输入法模块: `/usr/lib/qt4/plugins/inputmethods/qtim-fcitx.so`.
    找到了 fcitx 的 qt 模块: `/usr/lib/fcitx/qt/libfcitx-quickphrase-editor.so`.
    **无法找到 Qt5 的 fcitx 输入法模块.**

## Gtk:
1.  gtk - `${GTK_IM_MODULE}`:

    **请使用您发行版提供的工具将环境变量 GTK_IM_MODULE 设为 "fcitx" 或者将 `export GTK_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: GTK_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#GTK_IM_MODULE).**

2.  `gtk-query-immodules`:

    1.  gtk 2:

        在 `/usr/bin/gtk-query-immodules-2.0` 找到了 gtk `2.24.28` 的 `gtk-query-immodules`.
        版本行:

            # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.28

        已找到 gtk `2.24.28` 的 fcitx 输入法模块.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

    2.  gtk 3:

        在 `/usr/bin/gtk-query-immodules-3.0` 找到了 gtk `3.18.2` 的 `gtk-query-immodules`.
        版本行:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.18.2

        已找到 gtk `3.18.2` 的 fcitx 输入法模块.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

3.  Gtk 输入法模块缓存:

    1.  gtk 2:

        在 `/usr/lib/gtk-2.0/2.10.0/immodules.cache` 找到了 gtk `2.24.28` 的输入法模块缓存.
        版本行:

            # Created by usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.28

        已找到 gtk `2.24.28` 的 fcitx 输入法模块.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

    2.  gtk 3:

        在 `/usr/lib/gtk-3.0/3.0.0/immodules.cache` 找到了 gtk `3.18.2` 的输入法模块缓存.
        版本行:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.18.2

        已找到 gtk `3.18.2` 的 fcitx 输入法模块.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

4.  Gtk 输入法模块文件:

    1.  gtk 2:

        找到的全部 Gtk 2 输入法模块文件均存在.

    2.  gtk 3:

        找到的全部 Gtk 3 输入法模块文件均存在.

# 配置:
## Fcitx 插件:
1.  插件配置文件目录:

    找到了 fcitx 插件配置目录: `/usr/share/fcitx/addon`.

2.  插件列表:

    1.  找到了 26 个已启用的插件:

            fcitx-autoeng
            fcitx-chttrans
            fcitx-classic-ui
            fcitx-clipboard
            fcitx-dbus
            fcitx-freedesktop-notify
            fcitx-fullwidth-char
            fcitx-googlepinyin
            fcitx-imselector
            fcitx-ipc
            fcitx-keyboard
            fcitx-kimpanel-ui
            fcitx-notificationitem
            fcitx-pinyin
            fcitx-pinyin-enhance
            fcitx-punc
            fcitx-quickphrase
            fcitx-remote
            fcitx-spell
            fcitx-table
            fcitx-unicode
            fcitx-vk
            fcitx-x11
            fcitx-xim
            fcitx-xkb
            fcitx-xkbdbus

    2.  找到了 1 个被禁用的插件:

            fcitx-qw

3.  插件库: 

    所有插件所需的库都被找到。

4.  用户界面:

    找到了 2 个已启用的用户界面插件:

        fcitx-classic-ui
        fcitx-kimpanel-ui

## 输入法:
1.  找到了 2 个启用的输入法:

        fcitx-keyboard-us
        googlepinyin

2.  默认输入法:

    您已经正确的将一个键盘输入法 "fcitx-keyboard-us" 设为默认.

# 日志:
1.  `date`:

        2015年 11月 03日 星期二 07:45:59 CST

2.  `~/.config/fcitx/log/`:

        总用量 4
        -rw-r--r-- 1 xiaowen users 44 10月 21 10:01 crash.log

3.  `~/.config/fcitx/log/crash.log`:

        fcitx: BadWindow (invalid Window parameter)

[xiaoming@Arch ~]$ 

最近编辑记录 Archnew (2015-11-03 07:52:47)


懒是一切的原罪

离线

#6 2015-11-03 07:48:15

Archnew
会员
注册时间: 2015-09-20
帖子: 147

Re: archlinux login

依云 说:

输入法不正常那是没有设置好相关的环境变量吧。

「无法使用startx登录」是个什么情况呢?

cjxgm 说:

    Archnew 说:

        百合仙子 说:

            Archnew 说:

                普通用户下的和root用户下的~/.xinitrc都是这三行,我使用的命令 是nano ~/.xinitrc

                export GTK_IM_MODULE=fcitx
                export QT_IM_MODULE=fcitx
                export XMODIFIERS="@im=fcitx"

            哦这样。

            我把 startxfce4 找来看了一下,startxfce4 并不使用这个文件的…………看文件末尾,它使用的是自己的一份,所以你得去改它……

        好的,非常感谢你的时间和专业,也就是说这个文件里的这三行可以删除了

    或者在 xinitrc 里最后加一个 startxfce4,然后用 startx 开
    或者装个登录管理器

谢谢,好的,我试试,这个方法可行谢谢






ps:这是之前通过startx代替startxfce4登录解决输入法问题的,配置应该都正确,
原地址http://bbs.archlinuxcn.org/viewtopic.php?id=3726


懒是一切的原罪

离线

#7 2015-11-03 07:49:53

Archnew
会员
注册时间: 2015-09-20
帖子: 147

Re: archlinux login

依云 说:

输入法不正常那是没有设置好相关的环境变量吧。

「无法使用startx登录」是个什么情况呢?

在没更新系统的时候,startx使用一切正常,更新后,startx进不了系统


懒是一切的原罪

离线

#8 2015-11-03 10:40:57

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

Re: archlinux login

Archnew 说:
依云 说:

输入法不正常那是没有设置好相关的环境变量吧。

「无法使用startx登录」是个什么情况呢?

在没更新系统的时候,startx使用一切正常,更新后,startx进不了系统

环境变量没有被正确设置,因为 startxfce4 没有读取 ~/.xinitrc。

「进不了系统」是个什么情况呢?报错退出?卡住?黑屏?蓝屏?异常关机/断电?

离线

#9 2015-11-04 10:35:21

泉夏禾
会员
注册时间: 2014-03-01
帖子: 38

Re: archlinux login

Archnew 说:
泉夏禾 说:

把xinitrc贴出来,不然别人没法儿知道哪里出错了。
fcitx-diagnose输出也应一同贴出。

还有,一般都(推荐)使用startx,而非startxfce4进入,因为有些预置的项(/etc/X11/xinit/xinitrc.d/*)startxfce4似乎不会处理。而如何为startxfce4设置clientrc(即xinitrc)是undocumented的。

xinitrc

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
startxfce4

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login
exec openbox-session

fcitx-diagnose

[xiaoming@Arch ~]$ fcitx-diagnose
# 系统信息:
1.  `uname -a`:

        Linux Arch 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:28:41 CET 2015 i686 GNU/Linux

2.  `lsb_release`:

    `lsb_release` 未找到.

3.  `/etc/lsb-release`:

    `/etc/lsb-release` 未找到.

4.  `/etc/os-release`:

        NAME="Arch Linux"
        ID=arch
        PRETTY_NAME="Arch Linux"
        ANSI_COLOR="0;36"
        HOME_URL="https://www.archlinux.org/"
        SUPPORT_URL="https://bbs.archlinux.org/"
        BUG_REPORT_URL="https://bugs.archlinux.org/"

5.  桌面环境:

    桌面环境为 `xfce`。

6.  Bash Version:

        BASH_VERSION='4.3.42(1)-release'

# 环境:
1.  DISPLAY:

        DISPLAY=':0.0'

2.  键盘布局:

    1.  `setxkbmap`:

            xkb_keymap {
            	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
            	xkb_types     { include "complete"	};
            	xkb_compat    { include "complete"	};
            	xkb_symbols   { include "pc+us+inet(evdev)"	};
            	xkb_geometry  { include "pc(pc104)"	};
            };

    2.  `xprop`:

            _XKB_RULES_NAMES(STRING) = "evdev", "pc104", "us", "", ""

3.  Locale:

    1.  全部可用 locale:

            C
            en_US.utf8
            POSIX
            zh_CN
            zh_CN.gb18030
            zh_CN.gb2312
            zh_CN.gbk
            zh_CN.utf8

    2.  当前 locale:

            LANG=zh_CN.UTF-8
            LC_CTYPE="zh_CN.UTF-8"
            LC_NUMERIC="zh_CN.UTF-8"
            LC_TIME="zh_CN.UTF-8"
            LC_COLLATE="zh_CN.UTF-8"
            LC_MONETARY="zh_CN.UTF-8"
            LC_MESSAGES="zh_CN.UTF-8"
            LC_PAPER="zh_CN.UTF-8"
            LC_NAME="zh_CN.UTF-8"
            LC_ADDRESS="zh_CN.UTF-8"
            LC_TELEPHONE="zh_CN.UTF-8"
            LC_MEASUREMENT="zh_CN.UTF-8"
            LC_IDENTIFICATION="zh_CN.UTF-8"
            LC_ALL=

4.  目录:

    1.  主目录:

            /home/xiaowen

    2.  `${XDG_CONFIG_HOME}`:

        环境变量 `XDG_CONFIG_HOME` 没有设定。

        `XDG_CONFIG_HOME` 的当前值是 `~/.config` (`/home/xiaowen/.config`)。

    3.  Fcitx 设置目录:

        当前 fcitx 设置目录是 `~/.config/fcitx` (`/home/xiaowen/.config/fcitx`)。

5.  当前用户:

    脚本作为 xiaowen (1000) 运行。

# Fcitx 状态:
1.  可执行文件:

    在 `/usr/bin/fcitx` 找到了 fcitx.

2.  版本:

    Fcitx 版本: `4.2.9`

3.  进程:

    找到了 2 个 fcitx 进程:

          638 fcitx
          665 fcitx-dbus-watc

4.  `fcitx-remote`:

    `fcitx-remote` 工作正常.

# Fcitx 配置界面:
1.  配置工具封装:

    在 `/usr/bin/fcitx-configtool` 找到了 fcitx-configtool。

2.  用于 GTK+-2.0 的配置界面:

    **未找到 gtk2 的配置界面.**

3.  用于 GTK+-3.0 的配置界面:

    在 `/usr/bin/fcitx-config-gtk3` 找到了 `fcitx-config-gtk3`。

4.  KDE 的配置界面:

    **`kcmshell4` 未找到.**

# 前端设置:
## Xim:
1.  `${XMODIFIERS}`:

    **XMODIFIERS 没有设置**

    **请使用您发行版提供的工具将环境变量 XMODIFIERS 设为 "@im=fcitx" 或者将 `export XMODIFIERS=@im=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: XMODIFIERS](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#XMODIFIERS).**
    从环境变量中获取的 Xim 服务名称为 fcitx.

2.  根窗口上的 XIM_SERVERS:

    Xim 服务的名称与环境变量中设置的相同.

## Qt:
1.  qt4 - `${QT4_IM_MODULE}`:

    **请使用您发行版提供的工具将环境变量 QT_IM_MODULE 设为 "fcitx" 或者将 `export QT_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#QT_IM_MODULE).**

2.  qt5 - `${QT_IM_MODULE}`:

    **请使用您发行版提供的工具将环境变量 QT_IM_MODULE 设为 "fcitx" 或者将 `export QT_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#QT_IM_MODULE).**

3.  Qt 输入法模块文件:
    找到了 Qt4 的输入法模块: `/usr/lib/qt4/plugins/inputmethods/qtim-fcitx.so`.
    找到了 fcitx 的 qt 模块: `/usr/lib/fcitx/qt/libfcitx-quickphrase-editor.so`.
    **无法找到 Qt5 的 fcitx 输入法模块.**

## Gtk:
1.  gtk - `${GTK_IM_MODULE}`:

    **请使用您发行版提供的工具将环境变量 GTK_IM_MODULE 设为 "fcitx" 或者将 `export GTK_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: GTK_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#GTK_IM_MODULE).**

2.  `gtk-query-immodules`:

    1.  gtk 2:

        在 `/usr/bin/gtk-query-immodules-2.0` 找到了 gtk `2.24.28` 的 `gtk-query-immodules`.
        版本行:

            # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.28

        已找到 gtk `2.24.28` 的 fcitx 输入法模块.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

    2.  gtk 3:

        在 `/usr/bin/gtk-query-immodules-3.0` 找到了 gtk `3.18.2` 的 `gtk-query-immodules`.
        版本行:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.18.2

        已找到 gtk `3.18.2` 的 fcitx 输入法模块.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

3.  Gtk 输入法模块缓存:

    1.  gtk 2:

        在 `/usr/lib/gtk-2.0/2.10.0/immodules.cache` 找到了 gtk `2.24.28` 的输入法模块缓存.
        版本行:

            # Created by usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.28

        已找到 gtk `2.24.28` 的 fcitx 输入法模块.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

    2.  gtk 3:

        在 `/usr/lib/gtk-3.0/3.0.0/immodules.cache` 找到了 gtk `3.18.2` 的输入法模块缓存.
        版本行:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.18.2

        已找到 gtk `3.18.2` 的 fcitx 输入法模块.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

4.  Gtk 输入法模块文件:

    1.  gtk 2:

        找到的全部 Gtk 2 输入法模块文件均存在.

    2.  gtk 3:

        找到的全部 Gtk 3 输入法模块文件均存在.

# 配置:
## Fcitx 插件:
1.  插件配置文件目录:

    找到了 fcitx 插件配置目录: `/usr/share/fcitx/addon`.

2.  插件列表:

    1.  找到了 26 个已启用的插件:

            fcitx-autoeng
            fcitx-chttrans
            fcitx-classic-ui
            fcitx-clipboard
            fcitx-dbus
            fcitx-freedesktop-notify
            fcitx-fullwidth-char
            fcitx-googlepinyin
            fcitx-imselector
            fcitx-ipc
            fcitx-keyboard
            fcitx-kimpanel-ui
            fcitx-notificationitem
            fcitx-pinyin
            fcitx-pinyin-enhance
            fcitx-punc
            fcitx-quickphrase
            fcitx-remote
            fcitx-spell
            fcitx-table
            fcitx-unicode
            fcitx-vk
            fcitx-x11
            fcitx-xim
            fcitx-xkb
            fcitx-xkbdbus

    2.  找到了 1 个被禁用的插件:

            fcitx-qw

3.  插件库: 

    所有插件所需的库都被找到。

4.  用户界面:

    找到了 2 个已启用的用户界面插件:

        fcitx-classic-ui
        fcitx-kimpanel-ui

## 输入法:
1.  找到了 2 个启用的输入法:

        fcitx-keyboard-us
        googlepinyin

2.  默认输入法:

    您已经正确的将一个键盘输入法 "fcitx-keyboard-us" 设为默认.

# 日志:
1.  `date`:

        2015年 11月 03日 星期二 07:45:59 CST

2.  `~/.config/fcitx/log/`:

        总用量 4
        -rw-r--r-- 1 xiaowen users 44 10月 21 10:01 crash.log

3.  `~/.config/fcitx/log/crash.log`:

        fcitx: BadWindow (invalid Window parameter)

[xiaoming@Arch ~]$ 

我觉得问题在于~/.xinitrc配置不得当,既然是xfce4,为什么还会有exec openbox-session?即便是混搭也不应该这么用

startxfce4 in ~/.xinitrc:
https://wiki.archlinux.org/index.php/Xfce#Starting_Xfce

混搭相关:
https://wiki.archlinux.org/index.php/Xf … ow_manager

#!/bin/bash
##
## ~/.xinitrc
##
## Executed by startx (run your window manager from here)

if [[ -d /etc/X11/xinit/xinitrc.d ]];then
        for f in /etc/X11/xinit/xinitrc.d/*;do
                [[ -x "${f}" ]] && . "${f}"
        done
        unset f
fi

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
export LANG=zh_CN.UTF-8
export LANGUAGE=zh_CN:zh:en

[[ -f ~/.Xresources ]] && xrdb -merge ${HOME}/.Xresources
#[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
#xrandr --output VGA-1 --auto --output LVDS-1 --off

exec startxfce4

最近编辑记录 泉夏禾 (2015-11-04 10:47:01)


The community-maintained ArchWiki is the primary resource that should be consulted if issues arise.

离线

#10 2015-11-04 13:38:21

Archnew
会员
注册时间: 2015-09-20
帖子: 147

Re: archlinux login

依云 说:
Archnew 说:
依云 说:

输入法不正常那是没有设置好相关的环境变量吧。

「无法使用startx登录」是个什么情况呢?

在没更新系统的时候,startx使用一切正常,更新后,startx进不了系统

环境变量没有被正确设置,因为 startxfce4 没有读取 ~/.xinitrc。

「进不了系统」是个什么情况呢?报错退出?卡住?黑屏?蓝屏?异常关机/断电?


我去重新试了下,会出现以下几种情况,然后所有文字都消失,这应 该算是arch的黑屏还是蓝屏

1.

[xiaoming@Arch]$ startx
Xauth: /home/xiaoming/.Xauthority not writable, change will be ignored.
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith



//屏就没有字了,然后就只能看到一个光标

2.

[xiaoming@Arch]$ startx
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith



//屏就没有字了,然后就只能看到一个光标

最近编辑记录 Archnew (2015-11-04 13:39:27)


懒是一切的原罪

离线

#11 2015-11-04 13:40:48

Archnew
会员
注册时间: 2015-09-20
帖子: 147

Re: archlinux login

泉夏禾 说:
Archnew 说:
泉夏禾 说:

把xinitrc贴出来,不然别人没法儿知道哪里出错了。
fcitx-diagnose输出也应一同贴出。

还有,一般都(推荐)使用startx,而非startxfce4进入,因为有些预置的项(/etc/X11/xinit/xinitrc.d/*)startxfce4似乎不会处理。而如何为startxfce4设置clientrc(即xinitrc)是undocumented的。

xinitrc

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
startxfce4

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login
exec openbox-session

fcitx-diagnose

[xiaoming@Arch ~]$ fcitx-diagnose
# 系统信息:
1.  `uname -a`:

        Linux Arch 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:28:41 CET 2015 i686 GNU/Linux

2.  `lsb_release`:

    `lsb_release` 未找到.

3.  `/etc/lsb-release`:

    `/etc/lsb-release` 未找到.

4.  `/etc/os-release`:

        NAME="Arch Linux"
        ID=arch
        PRETTY_NAME="Arch Linux"
        ANSI_COLOR="0;36"
        HOME_URL="https://www.archlinux.org/"
        SUPPORT_URL="https://bbs.archlinux.org/"
        BUG_REPORT_URL="https://bugs.archlinux.org/"

5.  桌面环境:

    桌面环境为 `xfce`。

6.  Bash Version:

        BASH_VERSION='4.3.42(1)-release'

# 环境:
1.  DISPLAY:

        DISPLAY=':0.0'

2.  键盘布局:

    1.  `setxkbmap`:

            xkb_keymap {
            	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
            	xkb_types     { include "complete"	};
            	xkb_compat    { include "complete"	};
            	xkb_symbols   { include "pc+us+inet(evdev)"	};
            	xkb_geometry  { include "pc(pc104)"	};
            };

    2.  `xprop`:

            _XKB_RULES_NAMES(STRING) = "evdev", "pc104", "us", "", ""

3.  Locale:

    1.  全部可用 locale:

            C
            en_US.utf8
            POSIX
            zh_CN
            zh_CN.gb18030
            zh_CN.gb2312
            zh_CN.gbk
            zh_CN.utf8

    2.  当前 locale:

            LANG=zh_CN.UTF-8
            LC_CTYPE="zh_CN.UTF-8"
            LC_NUMERIC="zh_CN.UTF-8"
            LC_TIME="zh_CN.UTF-8"
            LC_COLLATE="zh_CN.UTF-8"
            LC_MONETARY="zh_CN.UTF-8"
            LC_MESSAGES="zh_CN.UTF-8"
            LC_PAPER="zh_CN.UTF-8"
            LC_NAME="zh_CN.UTF-8"
            LC_ADDRESS="zh_CN.UTF-8"
            LC_TELEPHONE="zh_CN.UTF-8"
            LC_MEASUREMENT="zh_CN.UTF-8"
            LC_IDENTIFICATION="zh_CN.UTF-8"
            LC_ALL=

4.  目录:

    1.  主目录:

            /home/xiaowen

    2.  `${XDG_CONFIG_HOME}`:

        环境变量 `XDG_CONFIG_HOME` 没有设定。

        `XDG_CONFIG_HOME` 的当前值是 `~/.config` (`/home/xiaowen/.config`)。

    3.  Fcitx 设置目录:

        当前 fcitx 设置目录是 `~/.config/fcitx` (`/home/xiaowen/.config/fcitx`)。

5.  当前用户:

    脚本作为 xiaowen (1000) 运行。

# Fcitx 状态:
1.  可执行文件:

    在 `/usr/bin/fcitx` 找到了 fcitx.

2.  版本:

    Fcitx 版本: `4.2.9`

3.  进程:

    找到了 2 个 fcitx 进程:

          638 fcitx
          665 fcitx-dbus-watc

4.  `fcitx-remote`:

    `fcitx-remote` 工作正常.

# Fcitx 配置界面:
1.  配置工具封装:

    在 `/usr/bin/fcitx-configtool` 找到了 fcitx-configtool。

2.  用于 GTK+-2.0 的配置界面:

    **未找到 gtk2 的配置界面.**

3.  用于 GTK+-3.0 的配置界面:

    在 `/usr/bin/fcitx-config-gtk3` 找到了 `fcitx-config-gtk3`。

4.  KDE 的配置界面:

    **`kcmshell4` 未找到.**

# 前端设置:
## Xim:
1.  `${XMODIFIERS}`:

    **XMODIFIERS 没有设置**

    **请使用您发行版提供的工具将环境变量 XMODIFIERS 设为 "@im=fcitx" 或者将 `export XMODIFIERS=@im=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: XMODIFIERS](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#XMODIFIERS).**
    从环境变量中获取的 Xim 服务名称为 fcitx.

2.  根窗口上的 XIM_SERVERS:

    Xim 服务的名称与环境变量中设置的相同.

## Qt:
1.  qt4 - `${QT4_IM_MODULE}`:

    **请使用您发行版提供的工具将环境变量 QT_IM_MODULE 设为 "fcitx" 或者将 `export QT_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#QT_IM_MODULE).**

2.  qt5 - `${QT_IM_MODULE}`:

    **请使用您发行版提供的工具将环境变量 QT_IM_MODULE 设为 "fcitx" 或者将 `export QT_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#QT_IM_MODULE).**

3.  Qt 输入法模块文件:
    找到了 Qt4 的输入法模块: `/usr/lib/qt4/plugins/inputmethods/qtim-fcitx.so`.
    找到了 fcitx 的 qt 模块: `/usr/lib/fcitx/qt/libfcitx-quickphrase-editor.so`.
    **无法找到 Qt5 的 fcitx 输入法模块.**

## Gtk:
1.  gtk - `${GTK_IM_MODULE}`:

    **请使用您发行版提供的工具将环境变量 GTK_IM_MODULE 设为 "fcitx" 或者将 `export GTK_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: GTK_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#GTK_IM_MODULE).**

2.  `gtk-query-immodules`:

    1.  gtk 2:

        在 `/usr/bin/gtk-query-immodules-2.0` 找到了 gtk `2.24.28` 的 `gtk-query-immodules`.
        版本行:

            # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.28

        已找到 gtk `2.24.28` 的 fcitx 输入法模块.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

    2.  gtk 3:

        在 `/usr/bin/gtk-query-immodules-3.0` 找到了 gtk `3.18.2` 的 `gtk-query-immodules`.
        版本行:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.18.2

        已找到 gtk `3.18.2` 的 fcitx 输入法模块.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

3.  Gtk 输入法模块缓存:

    1.  gtk 2:

        在 `/usr/lib/gtk-2.0/2.10.0/immodules.cache` 找到了 gtk `2.24.28` 的输入法模块缓存.
        版本行:

            # Created by usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.28

        已找到 gtk `2.24.28` 的 fcitx 输入法模块.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

    2.  gtk 3:

        在 `/usr/lib/gtk-3.0/3.0.0/immodules.cache` 找到了 gtk `3.18.2` 的输入法模块缓存.
        版本行:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.18.2

        已找到 gtk `3.18.2` 的 fcitx 输入法模块.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

4.  Gtk 输入法模块文件:

    1.  gtk 2:

        找到的全部 Gtk 2 输入法模块文件均存在.

    2.  gtk 3:

        找到的全部 Gtk 3 输入法模块文件均存在.

# 配置:
## Fcitx 插件:
1.  插件配置文件目录:

    找到了 fcitx 插件配置目录: `/usr/share/fcitx/addon`.

2.  插件列表:

    1.  找到了 26 个已启用的插件:

            fcitx-autoeng
            fcitx-chttrans
            fcitx-classic-ui
            fcitx-clipboard
            fcitx-dbus
            fcitx-freedesktop-notify
            fcitx-fullwidth-char
            fcitx-googlepinyin
            fcitx-imselector
            fcitx-ipc
            fcitx-keyboard
            fcitx-kimpanel-ui
            fcitx-notificationitem
            fcitx-pinyin
            fcitx-pinyin-enhance
            fcitx-punc
            fcitx-quickphrase
            fcitx-remote
            fcitx-spell
            fcitx-table
            fcitx-unicode
            fcitx-vk
            fcitx-x11
            fcitx-xim
            fcitx-xkb
            fcitx-xkbdbus

    2.  找到了 1 个被禁用的插件:

            fcitx-qw

3.  插件库: 

    所有插件所需的库都被找到。

4.  用户界面:

    找到了 2 个已启用的用户界面插件:

        fcitx-classic-ui
        fcitx-kimpanel-ui

## 输入法:
1.  找到了 2 个启用的输入法:

        fcitx-keyboard-us
        googlepinyin

2.  默认输入法:

    您已经正确的将一个键盘输入法 "fcitx-keyboard-us" 设为默认.

# 日志:
1.  `date`:

        2015年 11月 03日 星期二 07:45:59 CST

2.  `~/.config/fcitx/log/`:

        总用量 4
        -rw-r--r-- 1 xiaowen users 44 10月 21 10:01 crash.log

3.  `~/.config/fcitx/log/crash.log`:

        fcitx: BadWindow (invalid Window parameter)

[xiaoming@Arch ~]$ 

我觉得问题在于~/.xinitrc配置不得当,既然是xfce4,为什么还会有exec openbox-session?即便是混搭也不应该这么用

startxfce4 in ~/.xinitrc:
https://wiki.archlinux.org/index.php/Xfce#Starting_Xfce

混搭相关:
https://wiki.archlinux.org/index.php/Xf … ow_manager

#!/bin/bash
##
## ~/.xinitrc
##
## Executed by startx (run your window manager from here)

if [[ -d /etc/X11/xinit/xinitrc.d ]];then
        for f in /etc/X11/xinit/xinitrc.d/*;do
                [[ -x "${f}" ]] && . "${f}"
        done
        unset f
fi

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
export LANG=zh_CN.UTF-8
export LANGUAGE=zh_CN:zh:en

[[ -f ~/.Xresources ]] && xrdb -merge ${HOME}/.Xresources
#[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
#xrandr --output VGA-1 --auto --output LVDS-1 --off

exec startxfce4

谢谢你的时间,我曾经安装过openbox,后来删除了


懒是一切的原罪

离线

#12 2015-11-04 14:22:05

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

Re: archlinux login

Archnew 说:
依云 说:
Archnew 说:
依云 说:

输入法不正常那是没有设置好相关的环境变量吧。

「无法使用startx登录」是个什么情况呢?

在没更新系统的时候,startx使用一切正常,更新后,startx进不了系统

环境变量没有被正确设置,因为 startxfce4 没有读取 ~/.xinitrc。

「进不了系统」是个什么情况呢?报错退出?卡住?黑屏?蓝屏?异常关机/断电?


我去重新试了下,会出现以下几种情况,然后所有文字都消失,这应 该算是arch的黑屏还是蓝屏

1.

[xiaoming@Arch]$ startx
Xauth: /home/xiaoming/.Xauthority not writable, change will be ignored.
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith



//屏就没有字了,然后就只能看到一个光标

2.

[xiaoming@Arch]$ startx
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith



//屏就没有字了,然后就只能看到一个光标

ls -l /home/xiaoming/.Xauthorith

应该能看到它的权限不正确。你是不是滥用过 sudo?删除这个文件就好。
另外看看 ls -ld /home/xiaoming 看看权限正确不?

最近编辑记录 依云 (2015-11-04 14:22:51)

离线

#13 2015-11-04 14:30:06

Archnew
会员
注册时间: 2015-09-20
帖子: 147

Re: archlinux login

依云 说:
Archnew 说:
依云 说:
Archnew 说:
依云 说:

输入法不正常那是没有设置好相关的环境变量吧。

「无法使用startx登录」是个什么情况呢?

在没更新系统的时候,startx使用一切正常,更新后,startx进不了系统

环境变量没有被正确设置,因为 startxfce4 没有读取 ~/.xinitrc。

「进不了系统」是个什么情况呢?报错退出?卡住?黑屏?蓝屏?异常关机/断电?


我去重新试了下,会出现以下几种情况,然后所有文字都消失,这应 该算是arch的黑屏还是蓝屏

1.

[xiaoming@Arch]$ startx
Xauth: /home/xiaoming/.Xauthority not writable, change will be ignored.
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith



//屏就没有字了,然后就只能看到一个光标

2.

[xiaoming@Arch]$ startx
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith



//屏就没有字了,然后就只能看到一个光标

ls -l /home/xiaoming/.Xauthorith

应该能看到它的权限不正确。你是不是滥用过 sudo?删除这个文件就好。
另外看看 ls -ld /home/xiaoming 看看权限正确不?

[xiaoming@Arch ~]$ ls -l /home/xiaoming/.Xauthority
-rw------- 1 root root 49 11月  1 17:38 /home/xiaoming/.Xauthority
[xiaoming@Arch ~]$ ls -ld /home/xiaoming
drwx------ 40 xiaoming users 4096 11月  4 13:31 /home/xiaoming
[xiaoming@Arch ~]$ 

曾经使用过sudo的权限,
刚看到你打错一个单词Xauthorith----》Xauthority

最近编辑记录 Archnew (2015-11-04 14:36:14)


懒是一切的原罪

离线

#14 2015-11-04 14:45:55

Archnew
会员
注册时间: 2015-09-20
帖子: 147

Re: archlinux login

依云 说:
Archnew 说:
依云 说:
Archnew 说:
依云 说:

输入法不正常那是没有设置好相关的环境变量吧。

「无法使用startx登录」是个什么情况呢?

在没更新系统的时候,startx使用一切正常,更新后,startx进不了系统

环境变量没有被正确设置,因为 startxfce4 没有读取 ~/.xinitrc。

「进不了系统」是个什么情况呢?报错退出?卡住?黑屏?蓝屏?异常关机/断电?


我去重新试了下,会出现以下几种情况,然后所有文字都消失,这应 该算是arch的黑屏还是蓝屏

1.

[xiaoming@Arch]$ startx
Xauth: /home/xiaoming/.Xauthority not writable, change will be ignored.
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith



//屏就没有字了,然后就只能看到一个光标

2.

[xiaoming@Arch]$ startx
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith
Xauth: timeout in locking authority file. /home/xiaoming/.Xauthorith



//屏就没有字了,然后就只能看到一个光标

ls -l /home/xiaoming/.Xauthorith

应该能看到它的权限不正确。你是不是滥用过 sudo?删除这个文件就好。
另外看看 ls -ld /home/xiaoming 看看权限正确不?



非常非常感谢你, 已经成功搞定,虽然我不知道这个是啥东东,你太厉害了,我会做好笔记,谢谢你的时间和赐教

我刚了解了下这个文件:Xauthorith
startx脚本记录文件
Xserver 启动时,读文件~/.Xauthority,读入对应其display的记录.当一个需要显示的客户程序启动调用XOpenDisplay()也读这个文 件,并把找到的magic code 发送给Xserver.当Xserver验证这个magic code正确以后,就同意连接啦.
        观察startx脚本也可以看到,每次startx运行,都在调用xinit以前使用了xauth的add命令添加了一个新的记录到~/.Xauthority,用来这次运行X使用认证

最近编辑记录 Archnew (2015-11-04 15:08:09)


懒是一切的原罪

离线

#15 2015-11-04 14:51:35

Archnew
会员
注册时间: 2015-09-20
帖子: 147

Re: archlinux login

泉夏禾 说:
Archnew 说:
泉夏禾 说:

把xinitrc贴出来,不然别人没法儿知道哪里出错了。
fcitx-diagnose输出也应一同贴出。

还有,一般都(推荐)使用startx,而非startxfce4进入,因为有些预置的项(/etc/X11/xinit/xinitrc.d/*)startxfce4似乎不会处理。而如何为startxfce4设置clientrc(即xinitrc)是undocumented的。

xinitrc

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
startxfce4

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login
exec openbox-session

fcitx-diagnose

[xiaoming@Arch ~]$ fcitx-diagnose
# 系统信息:
1.  `uname -a`:

        Linux Arch 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:28:41 CET 2015 i686 GNU/Linux

2.  `lsb_release`:

    `lsb_release` 未找到.

3.  `/etc/lsb-release`:

    `/etc/lsb-release` 未找到.

4.  `/etc/os-release`:

        NAME="Arch Linux"
        ID=arch
        PRETTY_NAME="Arch Linux"
        ANSI_COLOR="0;36"
        HOME_URL="https://www.archlinux.org/"
        SUPPORT_URL="https://bbs.archlinux.org/"
        BUG_REPORT_URL="https://bugs.archlinux.org/"

5.  桌面环境:

    桌面环境为 `xfce`。

6.  Bash Version:

        BASH_VERSION='4.3.42(1)-release'

# 环境:
1.  DISPLAY:

        DISPLAY=':0.0'

2.  键盘布局:

    1.  `setxkbmap`:

            xkb_keymap {
            	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
            	xkb_types     { include "complete"	};
            	xkb_compat    { include "complete"	};
            	xkb_symbols   { include "pc+us+inet(evdev)"	};
            	xkb_geometry  { include "pc(pc104)"	};
            };

    2.  `xprop`:

            _XKB_RULES_NAMES(STRING) = "evdev", "pc104", "us", "", ""

3.  Locale:

    1.  全部可用 locale:

            C
            en_US.utf8
            POSIX
            zh_CN
            zh_CN.gb18030
            zh_CN.gb2312
            zh_CN.gbk
            zh_CN.utf8

    2.  当前 locale:

            LANG=zh_CN.UTF-8
            LC_CTYPE="zh_CN.UTF-8"
            LC_NUMERIC="zh_CN.UTF-8"
            LC_TIME="zh_CN.UTF-8"
            LC_COLLATE="zh_CN.UTF-8"
            LC_MONETARY="zh_CN.UTF-8"
            LC_MESSAGES="zh_CN.UTF-8"
            LC_PAPER="zh_CN.UTF-8"
            LC_NAME="zh_CN.UTF-8"
            LC_ADDRESS="zh_CN.UTF-8"
            LC_TELEPHONE="zh_CN.UTF-8"
            LC_MEASUREMENT="zh_CN.UTF-8"
            LC_IDENTIFICATION="zh_CN.UTF-8"
            LC_ALL=

4.  目录:

    1.  主目录:

            /home/xiaowen

    2.  `${XDG_CONFIG_HOME}`:

        环境变量 `XDG_CONFIG_HOME` 没有设定。

        `XDG_CONFIG_HOME` 的当前值是 `~/.config` (`/home/xiaowen/.config`)。

    3.  Fcitx 设置目录:

        当前 fcitx 设置目录是 `~/.config/fcitx` (`/home/xiaowen/.config/fcitx`)。

5.  当前用户:

    脚本作为 xiaowen (1000) 运行。

# Fcitx 状态:
1.  可执行文件:

    在 `/usr/bin/fcitx` 找到了 fcitx.

2.  版本:

    Fcitx 版本: `4.2.9`

3.  进程:

    找到了 2 个 fcitx 进程:

          638 fcitx
          665 fcitx-dbus-watc

4.  `fcitx-remote`:

    `fcitx-remote` 工作正常.

# Fcitx 配置界面:
1.  配置工具封装:

    在 `/usr/bin/fcitx-configtool` 找到了 fcitx-configtool。

2.  用于 GTK+-2.0 的配置界面:

    **未找到 gtk2 的配置界面.**

3.  用于 GTK+-3.0 的配置界面:

    在 `/usr/bin/fcitx-config-gtk3` 找到了 `fcitx-config-gtk3`。

4.  KDE 的配置界面:

    **`kcmshell4` 未找到.**

# 前端设置:
## Xim:
1.  `${XMODIFIERS}`:

    **XMODIFIERS 没有设置**

    **请使用您发行版提供的工具将环境变量 XMODIFIERS 设为 "@im=fcitx" 或者将 `export XMODIFIERS=@im=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: XMODIFIERS](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#XMODIFIERS).**
    从环境变量中获取的 Xim 服务名称为 fcitx.

2.  根窗口上的 XIM_SERVERS:

    Xim 服务的名称与环境变量中设置的相同.

## Qt:
1.  qt4 - `${QT4_IM_MODULE}`:

    **请使用您发行版提供的工具将环境变量 QT_IM_MODULE 设为 "fcitx" 或者将 `export QT_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#QT_IM_MODULE).**

2.  qt5 - `${QT_IM_MODULE}`:

    **请使用您发行版提供的工具将环境变量 QT_IM_MODULE 设为 "fcitx" 或者将 `export QT_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: QT_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#QT_IM_MODULE).**

3.  Qt 输入法模块文件:
    找到了 Qt4 的输入法模块: `/usr/lib/qt4/plugins/inputmethods/qtim-fcitx.so`.
    找到了 fcitx 的 qt 模块: `/usr/lib/fcitx/qt/libfcitx-quickphrase-editor.so`.
    **无法找到 Qt5 的 fcitx 输入法模块.**

## Gtk:
1.  gtk - `${GTK_IM_MODULE}`:

    **请使用您发行版提供的工具将环境变量 GTK_IM_MODULE 设为 "fcitx" 或者将 `export GTK_IM_MODULE=fcitx` 添加到您的 `~/.xprofile` 中. 参见 [输入法相关的环境变量: GTK_IM_MODULE](http://fcitx-im.org/wiki/Input_method_related_environment_variables/zh-cn#GTK_IM_MODULE).**

2.  `gtk-query-immodules`:

    1.  gtk 2:

        在 `/usr/bin/gtk-query-immodules-2.0` 找到了 gtk `2.24.28` 的 `gtk-query-immodules`.
        版本行:

            # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.28

        已找到 gtk `2.24.28` 的 fcitx 输入法模块.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

    2.  gtk 3:

        在 `/usr/bin/gtk-query-immodules-3.0` 找到了 gtk `3.18.2` 的 `gtk-query-immodules`.
        版本行:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.18.2

        已找到 gtk `3.18.2` 的 fcitx 输入法模块.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

3.  Gtk 输入法模块缓存:

    1.  gtk 2:

        在 `/usr/lib/gtk-2.0/2.10.0/immodules.cache` 找到了 gtk `2.24.28` 的输入法模块缓存.
        版本行:

            # Created by usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.28

        已找到 gtk `2.24.28` 的 fcitx 输入法模块.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

    2.  gtk 3:

        在 `/usr/lib/gtk-3.0/3.0.0/immodules.cache` 找到了 gtk `3.18.2` 的输入法模块缓存.
        版本行:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.18.2

        已找到 gtk `3.18.2` 的 fcitx 输入法模块.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx.so" 
            "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "ja:ko:zh:*" 

4.  Gtk 输入法模块文件:

    1.  gtk 2:

        找到的全部 Gtk 2 输入法模块文件均存在.

    2.  gtk 3:

        找到的全部 Gtk 3 输入法模块文件均存在.

# 配置:
## Fcitx 插件:
1.  插件配置文件目录:

    找到了 fcitx 插件配置目录: `/usr/share/fcitx/addon`.

2.  插件列表:

    1.  找到了 26 个已启用的插件:

            fcitx-autoeng
            fcitx-chttrans
            fcitx-classic-ui
            fcitx-clipboard
            fcitx-dbus
            fcitx-freedesktop-notify
            fcitx-fullwidth-char
            fcitx-googlepinyin
            fcitx-imselector
            fcitx-ipc
            fcitx-keyboard
            fcitx-kimpanel-ui
            fcitx-notificationitem
            fcitx-pinyin
            fcitx-pinyin-enhance
            fcitx-punc
            fcitx-quickphrase
            fcitx-remote
            fcitx-spell
            fcitx-table
            fcitx-unicode
            fcitx-vk
            fcitx-x11
            fcitx-xim
            fcitx-xkb
            fcitx-xkbdbus

    2.  找到了 1 个被禁用的插件:

            fcitx-qw

3.  插件库: 

    所有插件所需的库都被找到。

4.  用户界面:

    找到了 2 个已启用的用户界面插件:

        fcitx-classic-ui
        fcitx-kimpanel-ui

## 输入法:
1.  找到了 2 个启用的输入法:

        fcitx-keyboard-us
        googlepinyin

2.  默认输入法:

    您已经正确的将一个键盘输入法 "fcitx-keyboard-us" 设为默认.

# 日志:
1.  `date`:

        2015年 11月 03日 星期二 07:45:59 CST

2.  `~/.config/fcitx/log/`:

        总用量 4
        -rw-r--r-- 1 xiaowen users 44 10月 21 10:01 crash.log

3.  `~/.config/fcitx/log/crash.log`:

        fcitx: BadWindow (invalid Window parameter)

[xiaoming@Arch ~]$ 

我觉得问题在于~/.xinitrc配置不得当,既然是xfce4,为什么还会有exec openbox-session?即便是混搭也不应该这么用

startxfce4 in ~/.xinitrc:
https://wiki.archlinux.org/index.php/Xfce#Starting_Xfce

混搭相关:
https://wiki.archlinux.org/index.php/Xf … ow_manager

#!/bin/bash
##
## ~/.xinitrc
##
## Executed by startx (run your window manager from here)

if [[ -d /etc/X11/xinit/xinitrc.d ]];then
        for f in /etc/X11/xinit/xinitrc.d/*;do
                [[ -x "${f}" ]] && . "${f}"
        done
        unset f
fi

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
export LANG=zh_CN.UTF-8
export LANGUAGE=zh_CN:zh:en

[[ -f ~/.Xresources ]] && xrdb -merge ${HOME}/.Xresources
#[[ -f ~/.Xmodmap ]] && xmodmap ~/.Xmodmap
#xrandr --output VGA-1 --auto --output LVDS-1 --off

exec startxfce4

我的问题已经解决,我想给你提供几点参考,是我在遇到问题时,在请教大家的时候,大家给我提出的,我想会对你有所帮助

1.关于配置输入法的几点建议,这是某位老师告诉我的,原话奉上
虽然结果是 fcitx 能用了……
但是很多东西都没做对

LC_ALL=zh_CN.UTF-8
LANG=zh_CN.UTF-8

这一类 locale 相关的东西不应该放 /etc/environment 里,也不应该放 ~/.profile 里,而应该放在 /etc/locale.conf 里
另外 LC_ALL 是不需要的,这个变量是为了调试而存在的

XMODIFIERS=@im=fcitx

不应该放在 /etc/environment 里,应该放且只放在 ~/.xprofile 或 ~/.xinitrc 里(而不是 ~/.profile)(当然前面要加 export)

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx

应该放且只放在 ~/.xprofile 或 ~/.xinitrc 里(而不是 ~/.profile)

2.关于startxfce4放置位置问题

xinitrc

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
startxfce4

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login

上面startxfce4放的位置可以直接进入xfce4桌面系统

xinitrc

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then
xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"

twm &
xclock -geometry 50x50-1+1 &
xterm -geometry 80x50+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login
exec startxfce4

放在这个位置,直接进入的不是xfce4的桌面,而是带有终端的命令行桌面

最近编辑记录 Archnew (2015-11-04 14:54:52)


懒是一切的原罪

离线

页脚