1

Installing Sugar environment on Arch

I just installed a fresh Arch Linux just to run Sugar on it.

After downloading sugar from AUR using yaourt -S sugar I wanted to run Sugar using sugar-runner which was downloaded with yaourt as well.

Everything should be alright according to the tutorial from wiki.archlinux.org.

Note that I do everything from a terminal since I haven't got any graphical environment yet.

The logs

These are the logs I got after running 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

I've tried to solve it ...

I thought I could solve it by providing an additional line to the /usr/bin/sugar-runner according the solution from this website.

I could not solve it this way however.

If I write

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

I get NameError: name 'gi' is not defined

and if I write

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

I get NameError: name 'require_version' is not defined.

You can view the source code of sugar-runner on this repo.

Additionally, I don't know what is happening to the X server and why xinit is giving up.

Running sugar-runner as a root

Because Xorg.wrap shouted at me that

Only console users are allowed to run the X server

I decided to login as a root and then run sugar-runner. As a result I got this log messages:

/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.

Here is a link to my /var/log/Xorg.99.log file: http://pastebin.com/E8uWNdi1.

After installing xdg-user-dirs

Thanks to Wieland's suggestion I've installed the xdg-user-dirs package.

Subsequently, the logs written by sugar-runner have changed:

/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

The whole log file: http://pastebin.com/nU3scfYh
The video featuring the bug: https://www.youtube.com/watch?v=zdLMX0oUUTw


Have you got any idea how I can solve it?

Or maybe you know how to deploy Sugar on Arch the easy way?

1

1 Answer 1

1

Sugar tries to run xdg-user-dirs-update:

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

which you don't have. Install the package xdg-user-dirs which includes it.

/edit: For your new error message you'll have to wait until the Sugar guys fix that, they already have an open pull request for it.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.