sailfish-containers / lxc-templates-desktop

LXC templates adapted to SailfishOS
GNU Lesser General Public License v2.1
9 stars 2 forks source link

Additional kernel requirements and various issues on lxc-sfos-download #3

Closed edp17 closed 4 years ago

edp17 commented 4 years ago

In the gui when I create a container, it doesn't complete the distro installation. After a while it goes to STOPPED. When I use the command 'devel-su lxc-create -t sfos-download -n sid', then I chose debian sid armhf, it gives me the 'You just created a Debian sid armhf container. To enable SSH, run: apt install openssh-server No default root or user password are set by LXC.'

The host is 3.3.0.16 where all requirements are met. On the host the openssh-server is installed. On the guest I cannot install this with apt as the guest cannot be accessed (or I just down't know how) at this point. This isssue is occurring on my three sfos ports: Samsung Galaxy Note 4 (treltexx) CM14.1 base, Lg Nexus 5 (hammerhead) CM12.1 base and Galaxy S2 (i9100) CM12.1 base.

r3vn commented 4 years ago

everything looks fine to me, seems like you managed to create a container both from gui and cli. "To enable SSH" message is shown by default on lxc-create, but in this case it is not a required step since we can use lxc-attach to get a shell. First container's status after creation should be "stopped", if you didn't flag "setup desktop" option before creation.

Now you should be able to start your containers both from the pulley menu on the container's view of the app or by using "lxc-start" from cli. Keep in mind that in order to start Xwayland on a container created from cli, you'll need to run "container init" first (when stopped) and then"xsession setup" (when started), both options can be found on "advanced" section of containers view

G.

edp17 commented 4 years ago

I have retried, and double checked. The 'Setup desktop' option was on, but the distro was not installed. Once the container created as 'Stopped', I tap on the 'init container config' under the 'advanced control' but didn't do anything. (That's why I tried to install in the command line but that also stopped at the openssh-server thingy.) In the gui both, the 'attach' and 'xsession' buttons are dimmed/not available. (I don't see why as on a Sony XA2, the installation went through smoothly.)

Edit: When I try to start in gui, it doesn't do anything. In the command line the lxc-start gives me 'No container config specified'. However as I said I have tap on the 'init container config'.

Edit2: In the lxc-checkcinfig the Ipc namespace and Pid namespace both are red and say Required. Is this can be the root cause?

r3vn commented 4 years ago

"init container config" is meant to silently add "/usr/share/harbour-containers/scripts/guest" as a read-only mountpoint on container's config file (if not present). If you can't start containers from gui there is definitely an issue with lxc first. Could you attach the log file generated from the command below?

lxc-start -n <container name> --logfile=/tmp/lxc.log 

G.

edp17 commented 4 years ago

Thanks. Here are some logs.

S2 (i9100) - the lxc-start command only works as root:

lxc-start sid 20200725060132.574 ERROR lxc_conf - conf.c:lxc_setup_devpts:1576 - Invalid argument - Failed to mount new devpts instance lxc-start sid 20200725060132.575 ERROR lxc_conf - conf.c:lxc_setup:3520 - Failed to setup new devpts instance lxc-start sid 20200725060132.575 ERROR lxc_start - start.c:do_start:1219 - Failed to setup container "sid" lxc-start sid 20200725060132.576 ERROR lxc_sync - sync.c:sync_wait:57 - An error occurred in another process (expected sequence number 5) lxc-start sid 20200725060132.577 ERROR lxc_container - lxccontainer.c:wait_on_daemonized_start:834 - Received container state "ABORTING" instead of "RUNNING" lxc-start sid 20200725060132.729 ERROR lxc_start - start.c:lxc_start:1887 - Failed to spawn container "sid"


Note 4 (treltexx) - the lxc-start command works as user:

lxc-start LinuxOnSailfish-Sid 20200725070203.935 ERROR lxc_cgfsng - cgroups/cgfsng.c:cg_legacy_set_data:2199 - Failed to setup limits for the "devices" controller. The controller seems to be unused by "cgfsng" cgroup driver or not enabled on the cgroup hierarchy lxc-start LinuxOnSailfish-Sid 20200725070203.935 ERROR lxc_start - start.c:lxc_spawn:1749 - Failed to setup legacy device cgroup controller limits lxc-start LinuxOnSailfish-Sid 20200725070203.935 ERROR lxc_container - lxccontainer.c:wait_on_daemonized_start:834 - Received container state "ABORTING" instead of "RUNNING" lxc-start LinuxOnSailfish-Sid 20200725070203.971 ERROR lxc_start - start.c:__lxc_start:1887 - Failed to spawn container "LinuxOnSailfish-Sid"


Nexus 5 (hammerhead) - the lxc-start command only works as root:

lxc-start Sid 20200725081308.192 ERROR lxc_cgfsng - cgroups/cgfsng.c:cg_hybrid_get_controllers:738 - Found hierarchy not under /sys/fs/cgroup: "/opt/alien/sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime master:8 - cgroup cgroup rw,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd " lxc-start Sid 20200725081308.192 ERROR lxc_cgfsng - cgroups/cgfsng.c:cg_hybrid_get_controllers:738 - Found hierarchy not under /sys/fs/cgroup: "/opt/alien/sys/fs/cgroup/cpu,cpuacct rw,nosuid,nodev,noexec,relatime master:11 - cgroup cgroup rw,cpuacct,cpu " lxc-start Sid 20200725081308.192 ERROR lxc_cgfsng - cgroups/cgfsng.c:cg_hybrid_get_controllers:738 - Found hierarchy not under /sys/fs/cgroup: "/opt/alien/sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime master:12 - cgroup cgroup rw,freezer " lxc-start Sid 20200725081308.192 ERROR lxc_cgfsng - cgroups/cgfsng.c:cg_hybrid_get_controllers:738 - Found hierarchy not under /sys/fs/cgroup: "/opt/alien/sys/fs/cgroup/debug rw,nosuid,nodev,noexec,relatime master:13 - cgroup cgroup rw,debug " lxc-start Sid 20200725081308.197 ERROR lxc_start - start.c:lxc_spawn:1634 - Invalid argument - Failed to clone a new set of namespaces lxc-start Sid 20200725081308.197 ERROR lxc_container - lxccontainer.c:wait_on_daemonized_start:834 - Received container state "ABORTING" instead of "RUNNING" lxc-start Sid 20200725081308.216 ERROR lxc_start - start.c:__lxc_start:1887 - Failed to spawn container "Sid"

r3vn commented 4 years ago

i moved the issue to "lxc-templates-desktop" since it seems related to additional requirements for lxc on "legacy" devices. From your S2's logs this line:

lxc-start sid 20200725060132.574 ERROR lxc_conf - conf.c:lxc_setup_devpts:1576 - Invalid argument - Failed to mount new devpts instance

made me think that it is missing CONFIG_DEVPTS_MULTIPLE_INSTANCES in kernel's defconfig, you can check it with the following command:

zcat /proc/config.gz | grep CONFIG_DEVPTS_MULTIPLE_INSTANCES

while hammerhead and treltexx seems to miss something related to cgroup/namespaces. According to gentoo's wiki, the following additional options need to be enabled in kernel for namespaces:

CONFIG_NAMESPACES / "Namespaces" ('General Setup -> Namespaces support')
CONFIG_UTS_NS / "Utsname namespace" ('General Setup -> Namespaces Support / UTS namespace')
CONFIG_IPC_NS / "Ipc namespace" ('General Setup -> Namespaces Support / IPC namesapce')
CONFIG_PID_NS / "Pid namespace" ('General Setup -> Namespaces Support / PID Namespaces')
CONFIG_NET_NS / "Network namespace" ('General Setup -> Namespaces Support -> Network namespace')

(except for CONFIG_USER_NS, it seems not enabled on my devices)

and for cgroup:

CONFIG_CGROUPS / "Cgroup" ('General Setup -> Control Group support')
CONFIG_CGROUP_DEVICE / "Cgroup device" ('General Setup -> Control Group support -> Device controller for cgroups') 
CONFIG_CPUSETS / "Cgroup cpuset"

in case something is missing, you may need to rebuild you kernels including these changes .

G.

edp17 commented 4 years ago

Thank you for looking into it! I have checked those flags and some of them were indeed missing from the kernel. In the i9100 and treltexx the CONFIG_CGROUP_DEVICE and CONFIG_CPUSETS were off. I have set them to y and rebuilt the kernel.

Now I experienced the following:

S2 (i9100): The container still cannot be created from the GUI. Command-line work, but then the container cannot be started either from GUI nor from command-line.

Note4 (treltexx): The container can be created from the GUI but even if the 'Setup desktop' is on, it doesn't do that. The container can be started from the GUI but when I tap on the 'setup xsession' or 'attach' or 'Xsession', nothing happens. From command line the lxc-attach command works. (I would much appreciate if you could let me know hot to configure the xsession from command line!)

If you let me know what logs can help you, I'll post them.

I have not tested the hammerhead, but I'll report that once I have rebuilt the kernel. Keep up the good work! :+1: I am very glad that you have created this app and once this works on my devices, an old dream of mine will come true! :-)

Kabouik commented 4 years ago

I reckon the answer is yes since you were the one reporting #5 on harbour-containers, but still worth asking: on the S2, you had device lock enabled, right?

For your issues on the Note 4, you might want to try adding symbolic links to /opt/bin/, which I think is something @r3vn added in the latest update to allow user customization since, else, the files were only in a read-only directory. Now I assume the GUI is trying to get the scripts from there:

ln -s /mnt/guest/kill_xwayland.sh /opt/bin/kill_xwayland.sh
ln -s /mnt/guest/start_desktop.sh /opt/bin/start_desktop.sh
ln -s /mnt/guest/start_onboard.sh /opt/bin/start_onboard.sh
ln -s /mnt/guest/setup_desktop.sh /opt/bin/setup_desktop.sh

Those are paths is in the container rootfs, so run the above after devel-su lxc-attach -n containername or prepend them with /home/.lxc/containername/ if you're running that from SFOS rootfs.

For manually configuring Xsession, have a look at /home/.lxc/containername/mnt/guest/setup_desktop.sh.

edp17 commented 4 years ago

I reckon the answer is yes since you were the one reporting #5 on harbour-containers, but still worth asking: on the S2, you had device lock enabled, right? As for manually configuring Xsession, have a look at /home/.lxc/containername/mnt/guest/setup_desktop.sh.

Yes, I have enabled the device lock on all devices. I had to, otherwise, the GUI didn't work. Thanks for the tip for the manual configuring. I'll look around in that location and will try those commands.

Kabouik commented 4 years ago

I've edited above to add something about your Note 4, hope it's not irrelevant.

edp17 commented 4 years ago

I've edited above to add something about your Note 4, hope it's not irrelevant.

Thank you. The issue on the Note4 is that I do not have the 'guest' folder in '/home/.lxc/containername/mnt/'. Therefore I do not have any of those scripts you mentioned above. I try to reinstall the harbour-containers app. However, I have found the 'setup_desktop.sh' script in the '/usr/share/harbour-containers/scripts/guest/' location! I'll try to use it from there.

(I have double-checked the installation on the XA2 where the whole thing works. In there I have the guest folder in that location, but that is empty. No scripts are there at all. If those are mandatory, then I am puzzled how the Debian Sid guest works on the XA2.)

edp17 commented 4 years ago

Sorry, this will be a long one.

I have added all necessary bits and bobs into the kernel on all three devices. All the following are turned on: CONFIG_DEVPTS_MULTIPLE_INSTANCES=y CONFIG_NAMESPACES=y CONFIG_UTS_NS=y CONFIG_IPC_NS=y CONFIG_PID_NS=y CONFIG_NET_NS=y CONFIG_CGROUPS=y CONFIG_CGROUP_DEVICE=y CONFIG_CPUSETS=y

On all three devices, once the container is created I manually copied the scripts from '/usr/share/harbour-containers/scripts/guest/' to '/home/.lxc/container_name/mnt/guest/'.

Nexus 5 (hammerhead) - doesn't work: The container can be created with GUI but it creates as Stopped even when the 'Setup desktop' option is on. When I try to start with GUI, it doesn't start. Manual start gives: 'The container failed to start'. Log: lxc-start Sid 20200726232322.562 ERROR lxc_cgfsng - cgroups/cgfsng.c:cg_hybrid_get_controllers:738 - Found hierarchy not under /sys/fs/cgroup: "/opt/alien/sys/fs/cgroup/systemd rw,nosuid,nodev,noexec,relatime master:8 - cgroup cgroup rw,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd " lxc-start Sid 20200726232322.563 ERROR lxc_cgfsng - cgroups/cgfsng.c:cg_hybrid_get_controllers:738 - Found hierarchy not under /sys/fs/cgroup: "/opt/alien/sys/fs/cgroup/cpu,cpuacct rw,nosuid,nodev,noexec,relatime master:11 - cgroup cgroup rw,cpuacct,cpu " lxc-start Sid 20200726232322.563 ERROR lxc_cgfsng - cgroups/cgfsng.c:cg_hybrid_get_controllers:738 - Found hierarchy not under /sys/fs/cgroup: "/opt/alien/sys/fs/cgroup/cpuset rw,nosuid,nodev,noexec,relatime master:12 - cgroup cgroup rw,cpuset " lxc-start Sid 20200726232322.563 ERROR lxc_cgfsng - cgroups/cgfsng.c:cg_hybrid_get_controllers:738 - Found hierarchy not under /sys/fs/cgroup: "/opt/alien/sys/fs/cgroup/debug rw,nosuid,nodev,noexec,relatime master:13 - cgroup cgroup rw,debug " lxc-start Sid 20200726232322.564 ERROR lxc_cgfsng - cgroups/cgfsng.c:cg_hybrid_get_controllers:738 - Found hierarchy not under /sys/fs/cgroup: "/opt/alien/sys/fs/cgroup/devices rw,nosuid,nodev,noexec,relatime master:14 - cgroup cgroup rw,devices " lxc-start Sid 20200726232322.564 ERROR lxc_cgfsng - cgroups/cgfsng.c:cg_hybrid_get_controllers:738 - Found hierarchy not under /sys/fs/cgroup: "/opt/alien/sys/fs/cgroup/freezer rw,nosuid,nodev,noexec,relatime master:15 - cgroup cgroup rw,freezer " lxc-start Sid 20200726232322.132 ERROR lxc_start - start.c:start:1976 - Exec format error - Failed to exec "/sbin/init" lxc-start Sid 20200726232322.133 ERROR lxc_sync - sync.c:sync_wait:57 - An error occurred in another process (expected sequence number 7) lxc-start Sid 20200726232322.133 ERROR lxc_container - lxccontainer.c:wait_on_daemonized_start:834 - Received container state "ABORTING" instead of "RUNNING" lxc-start Sid 20200726232322.263 ERROR lxc_start - start.c:lxc_start:1887 - Failed to spawn container "Sid"

When the container is created from the command line, it can be started from the GUI, but a few seconds later it stops again.


Note4 (treltexx) - nearly there: The container can be created with GUI but it creates as Stopped even when the 'Setup desktop' option is on. When I try to start with GUI, it doesn't start. Manual start gives: 'The container failed to start'. Log: lxc-start Sid 20200726232937.758 ERROR lxc_cgfsng - cgroups/cgfsng.c:cg_hybrid_get_controllers:738 - Found hierarchy not under /sys/fs/cgroup: "/dev/cpuset rw,relatime shared:22 - cgroup none rw,cpuset " lxc-start Sid 20200726232937.849 ERROR lxc_start - start.c:start:1976 - Exec format error - Failed to exec "/sbin/init" lxc-start Sid 20200726232937.850 ERROR lxc_sync - sync.c:sync_wait:57 - An error occurred in another process (expected sequence number 7) lxc-start Sid 20200726232937.850 ERROR lxc_container - lxccontainer.c:wait_on_daemonized_start:834 - Received container state "ABORTING" instead of "RUNNING" lxc-start Sid 20200726232937.893 ERROR lxc_start - start.c:lxc_start:1887 - Failed to spawn container "Sid"

When the container is created from command line, it can be started from the GUI, but none of the 'attach', 'setup xsession' or 'Xsession' buttons do anything. (When I tap on the 'setup xsession' button, it requires me to enter the password, but then it does nothing.) Once closed and reopened the GUI, I cannot see the container (which is running) until I stop it in the command line.

However in the command line I can attach the container and then can start the copied script from '/home/.lxc/container_name/mnt/guest/setup_desktop.sh' Then it seems the desktop is configured, but I don't what parameters I need to pass to the '/home/.lxc/container_name/mnt/guest/start_desktop.sh' command to start an xfce4-session.


S2 (i9100) - doesn't work: The container can NOT be created with GUI. Manually running the lxc-create command it creates the container. When I try to start from the GUI, it doesn't start. Manual start gives: 'The container failed to start'. Log: lxc-start sid 20200727000859.914 ERROR lxc_conf - conf.c:lxc_setup_devpts:1576 - Invalid argument - Failed to mount new devpts instance lxc-start sid 20200727000859.914 ERROR lxc_conf - conf.c:lxc_setup:3520 - Failed to setup new devpts instance lxc-start sid 20200727000859.914 ERROR lxc_start - start.c:do_start:1219 - Failed to setup container "sid" lxc-start sid 20200727000859.915 ERROR lxc_sync - sync.c:sync_wait:57 - An error occurred in another process (expected sequence number 5) lxc-start sid 20200727000859.916 ERROR lxc_container - lxccontainer.c:wait_on_daemonized_start:834 - Received container state "ABORTING" instead of "RUNNING" lxc-start sid 20200727000900.832 ERROR lxc_start - start.c:lxc_start:1887 - Failed to spawn container "sid"

The container cannot be destroyed from the GUI only from the command line.

Kabouik commented 4 years ago

(I have double-checked the installation on the XA2 where the whole thing works. In there I have the guest folder in that location, but that is empty. No scripts are there at all. If those are mandatory, then I am puzzled how the Debian Sid guest works on the XA2.)

And they are not in /opt/bin either? I assume manually sylinking is needed only for containers created before these lines were added to the install script, but in any case it seems the scripts should still be in /mnt/guest/.

I don't know if this is still valid with the current version, but it is worth a try: in one terminal session, run /usr/bin/qxdisplay --wayland-socket-name "../../display/wayland-container-0" as nemo, then open another terminal, run devel-su lxc-attach -n containername and ./mnt/guest/start_desktop.sh. I don't quite remember if the script should be run as root or not, try both I guess. Make sure you have no other XWayland windows open at the same time (other failed attempts to open Xsession, or Supertux, sailfish_linux_chroot, etc.).

Unfortunately I can't answer your other comments, but I'm sure @r3vn will pick them up.

r3vn commented 4 years ago

Keep up the good work! +1 I am very glad that you have created this app and once this works on my devices, an old dream of mine will come true! :-)

Thank you, i'm happy to hear you liked it! Unfortunately LXC on older devices is not always that simple tho :p Anyway from your treltexx and hammerhead, i spotted this log's line:

ERROR lxc_start - start.c:start:1976 - Exec format error - Failed to exec "/sbin/init"

are you trying to start an arm64 container on an armhf kernel maybe?

The issue on the Note4 is that I do not have the 'guest' folder in '/home/.lxc/containername/mnt/'. It is normal for this directory to be empty in case the container is not running, the directory "/usr/share/harbour-containers/scripts/guest/'" is mounted inside the container on startup.

If you can't find xsession's scripts inside container's /mnt/guest/ directory, take a look at container's config file. The "guest" mountpoint should be added on config by "init container config" button and it should look like this:

lxc.mount.entry = /usr/share/harbour-containers/scripts/guest mnt/guest none bind,create=dir,ro 0 0

(container's config file is located under /var/lib/lxc/< container name >/config )

G.

edp17 commented 4 years ago

@r3vn, @Kabouik, Thank you for your responses! I leave the hammerhead and i9100 alone for a while. Once it works on the treltexx, I'll come back to them with the gained knowledge. :)

Yes, it seems that on the treltexx I installed an arm64 version rather than the armhf. Therefore,I have deleted everything and restarted fresh. This time I installed the armhf version and magically I got the scripts in place within the /mnt/guest folder! So this issue is solved.

Unfortunately from the GUI, the desktop cannot be setup or started. (I can start the container.) However, from the command line I was able to install/configure the desktop (with doing a "sudo lxc-attach -n " then "sudo lxc-attach -n ", then "/mnt/guest/setup_desktop.sh").

After these, I tried what @Kabouik suggested. So, started the container in the GUI, then in a command line I did the qxdisplay --wayland-socket-name "../../display/wayland-container-0". This then started a window where it said "Waiting Xwayland window..." So after this in an another command line I did "sudo lxc-attach -n Sid" and then "/mnt/guest/start_desktop.sh :0" and I got:

root@Sid:/# /mnt/guest/start_desktop.sh :0
/opt/bin/Xwayland: line 1: Not: command not found
/usr/bin/startxfce4: X server already running on display :0
xrdb: Network is unreachable
xrdb: Can't open display ':0'
dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
Unable to init server: Could not connect: Connection refused
xfce4-session: Cannot open display: .
Type 'xfce4-session --help' for usage.

I have tried "/mnt/guest/start_desktop.sh 0" and I got

root@Sid:/# /mnt/guest/start_desktop.sh 0
/opt/bin/Xwayland: line 1: Not: command not found
/usr/bin/startxfce4: X server already running on display :0
xrdb: Network is unreachable
xrdb: Can't open display ':0'
dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.freedesktop.systemd1 exited with status 1
(xfce4-session:193): Gdk-WARNING **: 10:51:26.326: The Wayland compositor does not provide any supported shell interface, not using Wayland display
Unable to init server: Could not connect: Connection refused
xfce4-session: Cannot open display: .
Type 'xfce4-session --help' for usage.

then I tried "/mnt/guest/start_desktop.sh" and I got: "[+] usage: /mnt/guest/start_desktop.sh [wayland-display-id]"

Plus, from the GUI, either the 'X session' or the 'setup xsession' buttons still do not work.

edp17 commented 4 years ago
lxc.mount.entry = /usr/share/**harbour**-containers/scripts/guest mnt/guest none bind,create=dir,ro 0 0

(container's config file is located under /var/lib/lxc/< container name >/config )

This is a bit of a problem as on treltexx in the /var/lib/lxc/< container name >/config I have this: lxc.mount.entry = /usr/share/sailfish-containers/guest mnt/guest/ none bind,ro,create=dir 0 0

r3vn commented 4 years ago

Something is really wrong here :D Directory "/usr/share/sailfish-containers" is from old development builds of "sailfish-containers" package and it shouldn't be here anymore, since everything is now included in harbour-containers package.

did you try development versions of the app some time ago? :) I assume you are still running an old daemon's version, keep in mind that setup desktop's process changed a lot from early versions, and the new one could take some time more since Xwayland is now built during the process.

EDIT: take a look at lxc-templates-desktop version too since mountpoints could come from early versions of this package as well

G.

edp17 commented 4 years ago

I have downloaded/installed only this version harbour-containers-0.4-1.armv7hl.rpm. I didn't have access to any older packages. Plus, I have deleted the reinstalled the app. Although true, I didn't check the config files after when I deleted the app. Odd. The lxc-templates-desktop and the qxdisplay were installed before the app became available and when I tried to install the app, it warned me to install newer version of lxc-templates-desktop and qxdisplay. I have done that but it can be that something left over from the previous installation. Now I remove all these three, re-install and try again. Then will come back to report. Thank you! :)

r3vn commented 4 years ago

I have downloaded/installed only this version harbour-containers-0.4-1.armv7hl.rpm. I didn't have access to any older packages. Plus, I have deleted the reinstalled the app. Although true, I didn't check the config files after when I deleted the app. Odd. The lxc-templates-desktop and the qxdisplay were installed before the app became available and when I tried to install the app, it warned me to install newer version of lxc-templates-desktop and qxdisplay. I have done that but it can be that something left over from the previous installation. Now I remove all these three, re-install and try again. Then will come back to report. Thank you! :)

you are right! the current lxc-templates-desktop release seems not updated (my fault :p ), you can still try to replace /usr/share/lxc/templates/lxc-sfos-download file manually with this https://github.com/sailfish-containers/lxc-templates-desktop/blob/master/templates/lxc-sfos-download As an alternative you can still fix an existent container by replacing the lxc.mount.entry with "/usr/share/harbour-containers/scripts/guest"

I'll update the release package as soon as i can, thanks for letting me know :)

G.

edp17 commented 4 years ago

you are right! the current lxc-templates-desktop release seems not updated (my fault :p ) ... I'll update the release package as soon as i can, thanks for letting me know :)

No worries, I just have reinstalled everything and created a new container (I used a different name to stay on the safe side) and I still have '/usr/share/sailfish-containers/guest' in the config. I'll follow the manual workaround that you suggested.

Just make me wonder why and how this works on the XA2 then? Shouldn't be the same issue in there? (I am glad that there is no issues, and works just fine. I just don't understand why.)

edp17 commented 4 years ago

Cool, I have updated the script (/usr/share/lxc/templates/lxc-sfos-download) and after that the container stuck in the creation status. What I have spotted is the guest folder is not in the /mnt/. (So this issue came back.) I think I put back the original lxc-sfos-download script and then will fix the config manually. I'll keep you posted.

r3vn commented 4 years ago

Cool, I have updated the script (/usr/share/lxc/templates/lxc-sfos-download) and after that the container stuck in the creation status. What I have spotted is the guest folder is not in the /mnt/. (So this issue came back.) I think I put back the original lxc-sfos-download script and then will fix the config manually. I'll keep you posted.

chmod +x /usr/share/lxc/templates/lxc-sfos-download

should fix this ;)

Just make me wonder why and how this works on the XA2 then? Shouldn't be the same issue in there? (I am glad that there is no issues, and works just fine. I just don't understand why.)

this is why i didn't notice the issue, it seems to work correctly anyway on my device. This is probably because new mountpoint overwrite the old one once "init container config" is executed.

G.

edp17 commented 4 years ago
chmod +x /usr/share/lxc/templates/lxc-sfos-download

should fix this ;)

I used MC to update the content, so it kept the permission. ;) (However, that might be the problem that MC didn't write something correctly from the clipboard.) I'll play with this a bit anyway. Thank you.

edp17 commented 4 years ago

Good news!

Finally, on the Note 4 (treltexx), I got the desktop configured and started. However, it only starts from the command line. If somebody else is having a similar problem, here are the steps how it works from me. (Oh, and I put back the original /usr/share/lxc/templates/lxc-sfos-download file.):

  1. Manually create a container in a command line: sudo lxc-create -t sfos-download -n <container-name>
  2. Once it is created, start it with the GUI (unfortunately on that device nothing else worked from the GUI after this point)
  3. Manually change the the /usr/share/sailfish-containers/guest to /usr/share/harbour-containers/scripts/guest in the /var/lib/lxc/< container name >/config
  4. Manually install the desktop in a command line:
    • sudo lxc-attach -n <container-name>
    • /mnt/guest/setup_desktop.sh
    • /mnt/guest/setups/debian.sh
    • in here if you need you can install extra packages with 'apt install '
  5. Once I have the container and desktop configured, I can start the desktop GUI:
    • Start 2! command line and in one of them issue this as nemo: /usr/bin/qxdisplay --wayland-socket-name "../../display/wayland-container-0"
    • In the other command-line attach the container then within there issue the following command /mnt/guest/start_desktop 0
  6. Done, go back to Desktop distro window and start experimenting.

Now I'll try to do this on my other two devices (hammerhead and i9100)

I think this issue can be considered as fixed, and therefore can be closed now. If required I would open a new one for a specific device.

@r3vn and @Kabouik Many thanks for your support!!

Kabouik commented 4 years ago

Awesome! It might be difficult to configure Onboard properly if you don't have a physical keyboard in the first place. We have a working "base" configuration that you can use if you want, attached here. Download it and run this in the container:

onboard-default.txt

sudo apt install dconf-cli && dconf load /org/onboard/ < /path/to/onboard-default.txt

Another issue could be open as a reminder that there are some problems in the scripts or mountpoints, since we really didn't need all those manual steps on the Pro¹. Ideally it should be the same on other devices.

In any case, thanks a lot for your continued patience and for investigating @edp17!

edp17 commented 4 years ago

@Kabouik : Yeah, some settings are not easy to set in the xfce4. Especially when a dropdown is involved. When I tap on it, the dropdown opens but immediately closes before I can select any options. (This is not limited to the onboard setup but for anything else e.g. setting the tree pane icon size of File Manager is a mission impossible task. :) The Onboard works fine for me, I set up to auto display it when I am in an input box. So far I was able to resize too, in the GUI, but will save your file and the command for the future. I think we should open a separate issue for anything outstanding, stating if something is low priority. (I have just done for the other two devices.) This way we can perfect the app and make it available for a wide audience on any ported device! :)