由于 PyGIWarning 无法在 Arch Linux 上运行 Sugar

由于 PyGIWarning 无法在 Arch Linux 上运行 Sugar

在Arch上安装Sugar环境

我刚刚安装了一个新的 Arch Linux 只是为了运行在上面。

下载后sugar尿素尿率usingyaourt -S sugar我想运行 Sugar using ,它也是sugar-runner用它下载的。yaourt

一切都应该没问题来自 wiki.archlinux.org 的教程

请注意,我从终端执行所有操作,因为我还没有任何图形环境。

日志

这些是我运行后得到的日志sugar-runner

/usr/bin/sugar-runner:28: PyGIWarning: SugarRunner was imported without specifying a version first. Use gi.require_version('SugarRunner', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import SugarRunner

# The terminal wasn't printing for a few seconds here.

/usr/lib/xorg-server/Xorg.wrap: Only console users are allowed to run the X server
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error

我已经尝试解决它...

我想我可以通过提供一条额外的线来解决这个/usr/bin/sugar-runner问题来自这个网站的解决方案

然而我无法用这种方式解决它。

如果我写

gi.require_version('SugarRunner', '1.0')
from gi.repository import SugarRunner

我明白了NameError: name 'gi' is not defined

如果我写

require_version('SugarRunner', '1.0')
from gi.repository import SugarRunner

我明白了NameError: name 'require_version' is not defined

sugar-runner可以查看on的源码这个仓库

此外,我不知道发生了什么X server以及为什么xinit会发生放弃

sugar-runner以 root 身份运行

因为Xorg.wrap对我大喊

仅允许控制台用户运行 X 服务器

我决定以 root 身份登录,然后运行sugar-runner​​.结果我收到了以下日志消息:

/usr/bin/sugar-runner:28: PyGIWarning: SugarRunner was imported without specifying a version first. Use gi.require_version('SugarRunner', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import SugarRunner


X.Org X Server 1.18.0
Release Date: 2015-11-09
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.2.3-1-ARCH i686 
Current Operating System: Linux haejzer 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:28:41 CET 2015 i686
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=c296b0f7-dc8b-426d-9bc6-fc72db4c4673 rw quiet
Build Date: 18 November 2015  08:09:07AM

Current version of pixman: 0.32.8
    Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.99.log", Time: Sat Nov 28 20:01:34 2015
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
/usr/libexec/sugar-runner/xinitrc:25: PyGIWarning: SugarRunner was imported without specifying a version first. Use gi.require_version('SugarRunner', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import SugarRunner
Traceback (most recent call last):
  File "/usr/libexec/sugar-runner/xinitrc", line 81, in <module>
    _setup_xdg_user_dirs()
  File "/usr/libexec/sugar-runner/xinitrc", line 77, in _setup_xdg_user_dirs
    subprocess.check_call("xdg-user-dirs-update")
  File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1335, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
xinit: connection to X server lost

waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.

这是我的文件的链接/var/log/Xorg.99.loghttp://pastebin.com/E8uWNdi1

安装后xdg-user-dirs

谢谢维兰德的建议我已经安装了该xdg-user-dirs软件包。

随后,写入的日志sugar-runner发生了变化:

/usr/libexec/sugar-runner/xinitrc:25: PyGIWarning: SugarRunner was imported without specifying a version first. Use gi.require_version('SugarRunner', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import SugarRunner
Traceback (most recent call last):
  File "/usr/libexec/sugar-runner/xinitrc", line 89, in <module>
    os.kill(int(os.environ["GNOME_KEYRING_PID"]), signal.SIGTERM)
  File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
    raise KeyError(key)
KeyError: 'GNOME_KEYRING_PID'
xinit: connection to X server lost

整个日志文件:http://pastebin.com/nU3scfYh
该错误的视频:https://www.youtube.com/watch?v=zdLMX0oUUTw


你知道我该如何解决吗?

或者您知道如何以简单的方式在 Arch 上部署 Sugar?

答案1

Sugar 尝试运行xdg-user-dirs-update

File "/usr/libexec/sugar-runner/xinitrc", line 77, in _setup_xdg_user_dirs
  subprocess.check_call("xdg-user-dirs-update")

你没有。安装xdg-user-dirs包含它的软件包。

/编辑:对于你的新错误消息,你必须等到糖人解决这个问题,他们已经有一个开放的拉取请求为了它。

相关内容