View Single Post
edp17's Avatar
Posts: 607 | Thanked: 736 times | Joined on Jul 2019 @ UK
#257
Here, I've put together a little guide about how to install Debian Bookworm SailfishOs 4.6. This guide covers both arm32 and aarch64 architectures. (Two examples for the aarch64 architecture: Motorola G7 Power (ocean) and Sony Xperia XA2.)
In this instruction the container name is: Debian

As all steps must be done in command line, I suggest to do it via ssh because typing all in Fingerterm on the device is very difficult and expose risk of typos.

1. Add chum repo and install Chum-gui app as root:
If you already have Chum-gui installed, you can skip this step.
Code:
ssu ar sailfishos-chum https://repo.sailfishos.org/obs/sailfishos:/chum/4.6.0.15_aarch64/
ssu ur
zypper ref
zypper in sailfishos-chum-gui

2. Install LXC, qxcompositor, containers app and some other as root:
Code:
zypper in qxcompositor lxc lxc-templates-desktop harbour-containers sudo

3.1. Create container and install debian as root:
When it pops up a few questions, answer to those with:
Distribution: debian
Release: bookworm
Architecture: arm64 (or armhf)
Code:
lxc-create -t sfos-download -n Debian

3.2. Add the following two lines into /var/lib/lxc/Debian/config file as root:
(Without this, there won't be /mnt/guest folder within the container!)
Code:
# mount guest additions readonly
lxc.mount.entry = /usr/share/harbour-containers/scripts/guest mnt/guest/ none bind,ro,create=dir 0 0

3.3. Start container as root:
Code:
lxc-start -n Debian

3.4. Attach container as root:
Code:
lxc-attach -n Debian

3.5 Now you should be within the Debian where execute two .sh scripts:
(this will take for a while and will ask to chose desktop environment (I used xfce) and root password. (When the script is finished it will quit and stop the container.)
Code:
/mnt/guest/setup_desktop.sh

3.6. Execute the next script which originally was meant to download & compile Xwayland binary. Unfortunately, that bit doesn't work anymore, so we will download the Xwayland binary in a different way. However, this script still should be executed.
Start and attach & attach the container, then execute the second .sh script as root:
(When the script is finished it will quit and stop the container.)
Code:
lxc-start -n Debian
lxc-attach -n Debian
/mnt/guest/setups/debian.sh

3.7. Download Xwayland.xxxxx.libc-2.29 .bin binary: Xwayland for armhf(32) or Xwayland for aarch64
Rename the downloaded file to Xwayland, then copy the Xwayland into the container as root:
(if bin folder doesn't exist there you'll need to create it)
Code:
cp Xwayland /home/.lxc/Debian/opt/bin/
then set it to be executable:
Code:
chmod +x /home/.lxc/Debian/opt/bin/Xwayland
3.8. Now you are good to go.

Start Debian

1. I wrote a .sh script to easily start the container from command line. It can be used in a .desktop file, so can be there as a native app. Download the debian-mouse.sh file Copy the debian-mouse.sh into your home and make it executable:
Code:
chmod +x debian-mouse.sh

2. For starting the container you just need to execute the script.
It has two parameters:
$1 - your container name (e.g Debian)
$2 - layout: p (portrait) or l (landscape) or a (auto-rotate)
Example:
Code:
debian-mouse.sh Debian p

3. The container should open as an app.

Update:
If you'd like to have an icon in your app grid and start your container as an app, please download lxc-debian.zip file, extract it and as root copy its content to the relevant folders on your Sailfish system.
This is how it looks on my XA2:

Last edited by edp17; 2024-10-10 at 13:44. Reason: Updated instruction
 

The Following 4 Users Say Thank You to edp17 For This Useful Post: