When I used to work on Sugar Activities I made use of sugar-runner (then
called sugar-emulator) and I was disappointed to find out it was not
included in Fedora 39 and was no longer maintained.

I have been fooling with this and while I haven't got it working yet I feel
like I've made some progress, which I'd like to share with you.

The code is in this repo:


To build it you need to do autogen.sh, then make, then sudo make install.
There is a directory "scripts" which has four Python scripts (although the
files do not end in .py) and you need to convert them from Python 2 to
Python 3. There is an online utility to do this which can be used as a
starting point.

There is also a "lib" directory containing C code. I believe that this code
and the Makefile that builds and installs it does not need to be modified.
However, when you do sudo make install it will put the files in /usr/local
directories which Python 3 will need help to find:

export GI_TYPELIB_PATH=/usr/local/lib/girepository-1.0
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

These two commands run before sugar-runner seem to do the trick.

You will also need to install Xephyr:

sudo dnf install Xephyr

After you do this, sugar-runner will report a few places where your Python
2 code needs to be changed to Python 3. One of these is a complaint that
you are using strings when you should be using bytes. This is caused by a
difference in the way that Python reads files. Python 2 reads bytes by
default, Python 3 reads UTF-8 strings.

You can fix this by opening files as 'rb' and converting strings to bytes
using the .decode() method.  I'm pretty sure about the first one, not as
much about the second.

After all this when you run sugar-runner you get this:

WARNING: Running setxkbmap against an Xwayland server

The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Could not resolve keysym XF86CameraAccessEnable
> Warning:          Could not resolve keysym XF86CameraAccessDisable
> Warning:          Could not resolve keysym XF86CameraAccessToggle
> Warning:          Could not resolve keysym XF86NextElement

.. a bunch of warnings ...

No symbols defined for <I217> (keycode 217)
No symbols defined for <I219> (keycode 219)
No symbols defined for <I222> (keycode 222)
No symbols defined for <I230> (keycode 230)
No symbols defined for <I248> (keycode 248)
discover_other_daemon: 1xinit: connection to X server lost

waiting for X server to shut down

The screen goes black for a moment and then you're back to the terminal. So
it looks like Xephyr is at least trying to start.

If someone wants to try this out I could post a branch with my changes to
GitHub if I was given needed permissions to do so.

For now, I'm stuck.

James Simmons
Sugar-devel mailing list

Reply via email to