[HOWTO] Install Ubuntu, VDR and X11 within CE environment

Could you please try:

#!/bin/sh
UPATH='/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
systemctl stop kodi
chroot /storage/UBUNTU /bin/bash -c "PATH=$UPATH /storage/UBUNTU/user/vdrbyebye.sh"

as a script.

I tried this from ssh connection (like yours):

#!/bin/sh
UPATH='/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
systemctl stop kodi
/storage/ubuntu.sh
chroot /storage/UBUNTU /storage/UBUNTU/bin/bash -c "PATH=$UPATH /storage/UBUNTU/home/user/vdrbyebye.sh"

but at last, i used this from ssh connection:

#!/bin/bash
systemctl stop kodi && /storage/ubuntu.sh; chroot /storage/UBUNTU /storage/UBUNTU/bin/bash -c "/home/user/vdrbyebye.sh" && echo -e "\n"

They both work, but not when called from kodi addon. Looks like, it hangs where chroot is called.

One other thing, i checked webgl performance in android, where i got about 38 fps,
on this ubuntu changeroot in firefox i got working output, but only 1 fps.

So hardware 3d accelleration doesnā€™t really work very well.

You can try to use atd in chroot to execute command (at -f now). Maybe time to get back to Python is too long.
Regarding 3D you could test glmark2 (I havenā€™t tested it so far but it may work).

From Kodi addon you canā€™t run script directly to stop kodi service and then run some other commands because script is killed when kodi is stopped.

You need to call script with systemd-run command

systemd-run /path/to/stop_kodi_start_x11.sh

Thank you, @vpeter for the clarification. How will it behave, if I call the script from atd? Will also spawned sub-proceses be killed?

atd is itā€™s own process and would not be killed. But it is not needed to use it because systemd-run is exactly what is needed here.

This is the solution, addon works with this.
Strange thing is, i found it out just before i read your comment, after long try and error. ;-/

Because i found it was used in KODI Addon ā€œVirtual System Toolsā€ default.py.

script.stop_kodi_start_x11.zip (521.6 KB)
stop_kodi_start_x11.sh (150 Bytes)

however, my hardware (s905x3) is probably a bit too weak for Ubuntu, it runs a bit slow.
You also have to adapt a lot to your needs, even user directories / non-working (mounting) USB removable media etc. it is not a full-fledged Ubuntu system because it was created rather for other purposes. Sure, you could customize everything like in linux, but it requires a lot of fiddling.

My coreelec installation seems have developed a problem when I installed this. On every reboot, I end up with a black image on my TV, with it saying itā€™s receiving a 1920x2160p (not a typo) signal. Can somebody help?

Can you try (from ssh)

echo 1080p50 > /sys/class/display/mode

Instead 1080p50 set the resolution you want.

So, I think I forgot my password for ssh. How do I recover that? Sorry. I know this is a really dumb problem to have.

You can set a new one in CoreElec.

Thatā€™s the problem. I canā€™t get coreelec to display anything other than black screen.

Maybe you need to disable VDR service too, if not want to use it.

In this case ssh into the device and

systemctl stop vdr.service
systemctl unmask kodi
systemctl start kodi

but without knowing your ssh password it is difficult.

Wonā€™t it be stored in some file somewhere? Maybe I can browse it through the android environment

As an alternative you can update CoreElec with the same version you already have. You can use samba (hoefully enabled ;)?) to copy the .tar file into the .update directory.

Iā€™m able to browse the SD card coreelec is installed on, booted in android via x-plore, and the /.update/ folder is empty. What .tar file exactly do I need to copy here?

from CE main page ā†’ Downloads ā†’ ā€¦

Copied the ne .tar to /.update/, Iā€™m still stuck with a black screen and my TV still says 1920x2160p 60hz. Iā€™ll do a reinstall. :sob:

Update: I did a reinstall, instead of black screen, I am now stuck in the Coreelec new era boot logo. Nothing happens, itā€™s unresponsive to any input. I tried SSHing, vdrbyebye.sh line 3: killall: command not found.

Help again please?