![]() |
Full linux distros on Sailfish OS
https://thumbs.gfycat.com/PoliticalD...restricted.gif
This topic is created to discuss any questions and thoughts regarding the harbour-containers. This app makes it possible to easily install full Linux distributions onto Sailfish OS and use that distro as any other Sailfish app. The harbour-containers and lxc-templates-desktop are Illyria's project and he was inspired by the work of Preflex' and Elros34 on chroot. More info (requirements, downloads and install instructions) is available here:(Note: Once the container is started you can close the command line, and the container will stay running.) Requirements:
Downloads:
=========================================== Mouse and cursor support: Important!: From SFOS4.4 qxcompositor with mouse cursor is not available. (The cursor support is in an experimental stage, however, that works fine in portrait mode) Add the -plugin evdevmouse parameter into "/var/lib/environment/compositor/droid-hal-device.conf" Then install the qxcompositor package. (An older build can be downloaded from here: qxcompositor-0.0.5+cursor_test2.20200817210502 but I do recommend to install it from the proper repo.) For SFOS4.4, the qxcompositor can be installed from Elros's repo. As root do the following:
Unfortunately, if you install Debian Sid fresh under SFOS4.4, the installation cannot build the Xwayland binary. If no window appears and on the console, you get this error: "/etc/X11/xinit/xserverrc: 4: exec: /opt/bin/Xwayland: not found", do the following:
Some useful scripts: (You can download and edit as you wish. :))
(Note2 03/11/2021: I've amended the scripts to handle if waydroid is also installed on the device. I also incorporated the landscape/portrait/auto-rotate modes into one script.) =========================================== If the GUI doesn't work (for some unofficial ports, this is the case), this can be done manually from a command line. Here are the steps:
Note: If you don't have the /mnt/guest/ folder within the container, try to use this content in the /var/lib/lxc/<container_name>/config: config In this config, there are some container-specific lines so we would like to copy them among the containers, we need to adjust these two lines accordingly: Code:
# Container specific configuration =========================================== V I D E O S: Kabouik has created some very useful and impressive videos on how to use LXC with desktop Linux distributions on Sailfish OS. Many thanks for him! :)
|
Re: Full linux distos on Sailfish OS
Will this work on the original jolla phone?
|
Re: Full linux distos on Sailfish OS
copied from the lxc instructions:
Code:
It is possible to check if your kernel support containers with: |
Re: Full linux distos on Sailfish OS
Quote:
https://itsfoss.com/lightweight-linux-beginners/ |
Re: Full linux distos on Sailfish OS
Quote:
So, it worth a try. |
Re: Full linux distos on Sailfish OS
I have updated the main post with adding a video to watch it in action.
|
Re: Full linux distos on Sailfish OS
As an alternative, is there a way to boot up a Linux distribution from a sd card?
|
Re: Full linux distos on Sailfish OS
Quote:
|
Re: Full linux distos on Sailfish OS
My question is how can I mount/attach folders outside of the container e.g. the phone's internal and external sd card, network drive, etc...?
|
Re: Full linux distos on Sailfish OS
hello guys,
i'm the app's developer, and a long time TMO lurker. I'm a bit surprised to see a topic here so early :D First of all, i'd like to point out that this project is heavily inspired on previous works done by preflex on "XWayland Victory!" and elros34 "sailfish_linux_chroot". As edp17 already stated, LXC and harbour-containers usually works out-of-the-box on XA2's generation devices (android base >=9), since AlienDalvik works within a container as well. Probably the wiki's requirements page needs some updates since community ports seems to require more than just "CONFIG_DEVPTS_MULTIPLE_INSTANCES" on kernel's defconfig, as i excepted. Unfortunately i don't own other sailfishos devices than my Pro1 to work on, i'm happy anyway to help porters to bring containers on community ports. :) |
Re: Full linux distos on Sailfish OS
So nice job
The geminipda kernel support it :) Do you provide rpm somewhere to test on this device ? Thanks Forget pkcon search lxc is my friend So test in progress But missing harbour-containers :) |
Re: Full linux distos on Sailfish OS
Quote:
I would like to get this work on all of my current (3) and planned future (3) ports. :) I have tried the mentioned works (preflex on "XWayland Victory!" and elros34 "sailfish_linux_chroot") but, for me at least, none of them was so simple and safe like your one. I have messed up my well configured SFOS installations so many times (probably because of my stupidity :)) that finally, I stopped experimenting with them. |
Re: Full linux distos on Sailfish OS
Quote:
|
Re: Full linux distos on Sailfish OS
Oups sorry ...
:) |
Re: Full linux distos on Sailfish OS
Quote:
|
Re: Full linux distos on Sailfish OS
Quote:
For me the GUI failed, to launch this script |
Re: Full linux distos on Sailfish OS
Quote:
I have created a script that runs the `/usr/bin/qxdisplay --wayland-socket-name "../../display/wayland-container-0" &` and then enters to the container (sudo lxc-attach -n Debian) then I can just enter the comman `/mnt/guest/start_desktop 0` in there. This way you do not need 2 command line session. |
Re: Full linux distos on Sailfish OS
Quote:
I'm happy to hear that :) Quote:
now "/usr/share/sailfish-containers" shouldn't exists anymore. Without GUI you'll need to add the mountpoint manually on container's config as follows: Code:
lxc.mount.entry = /usr/share/harbour-containers/scripts/guest mnt/guest none bind,create=dir,ro 0 0 Code:
lxc.mount.entry = /home/nemo/Desktop home/user/Desktop none bind 0 0 |
Re: Full linux distos on Sailfish OS
Great stuff!
I have debian sid running on my Proš. Impressive how good the desktop works with touch. I haven't expected that. I have not found out yet, if there is a way to use the hardware keyboard. I have a qwertz one. Anyone an Idea if that is possible? |
Re: Full linux distos on Sailfish OS
Qwerty works out of the box, that's for sure. You should be able to use a qwertz USB keyboard on a qwertz Proš too, but given the unusual qwertz xkb implementation on the Proš, I assume you would need to toggle between two different xkb layouts: one for builtin keyboard with the offset, one for external keyboard. Xfce4 as well as i3wm should have support for that.
Here's how to do it (I think). From SFOS terminal, copy the "pro1" xkb file to the container: Code:
devel-su cp -r /usr/share/X11/xkb/symbols/fxtec_vndr /home/.lxc/<containername>/usr/share/X11/xkb/symbols/fxtec_vndr Then, in your i3 configuration file, add: Code:
# Use layout for builtin keyboard as default The idea would be to use the layout for the builtin keyboard by default when the Desktop Environment is started, and the normal qwertz layout for USB keyboards when pressing Shift+Ctrl+Space. Ctrl+Space would revert to the builtin keyboard layout again. If you want to test first, just try running the commands manually in the container and please report back. For us-intl users, use just this if you want the variant with more dead keys in your i3 container and use Caps Lock as compose key: Code:
exec --no-startup-id setxkbmap -model fxtecpro1 -layout fxtec_vndr/pro1 -variant us2 -option -rules evdev lv3:ralt_switch,compose:caps Code:
dconf write /desktop/lipstick-jolla-home/layout \"fxtec_vndr/pro1\(us\),fxtec_vndr/pro1\(us2\)\" --- We have mouse support too (all buttons and scroll wheel work), but so far we haven't found a way to display the cursor icon, or to rotate the mouse into landscape orientation (xinput doesn't seem to work with xwayland, and Wayland doesn't offer as many customization options). HDMI out would be the next step, but Illyria doesn't know for sure yet if that would be doable. (I posted the same video and some pics in the Proš thread some weeks ago when I just finished configuring the container, no one noticed it! :O) -- Posted from Debian Sid i3. :> |
Re: Full linux distos on Sailfish OS
Edited the commands above, this should work with qwertz Prošs now, else please let me know.
|
Re: Full linux distos on Sailfish OS
Quote:
Code:
ls -lha /dev/pts/total 0drwxr-xr-x 2 root root 0 Dec 31 1969 .drwxr-xr-x 21 root root 7.1K Aug 6 13:30 ..crw------- 1 nemo tty 136, 0 Aug 614:59 0 |
Re: Full linux distos on Sailfish OS
Quote:
Code:
drwxr-xr-x 2 root root 0 Jan 1 1970 . |
Re: Full linux distos on Sailfish OS
Kabouik, illyria
I have a few questions: 1. I can manually attach the container, then when I am in, I can start a command. Is there a way that by a command-line script attaches the container, then automatically runs a command once the container is attached? 2. Sound 1. How can I get the sound working in the container? 3. Sound 2. If the container is attached the sound on the host is muted. And it remains muted even if the container stops. I need to reboot the phone to get the sound back. (Probably there is another way for this, but this solution was the quickest one for me.) 4. I have managed to move the Onboard so right to the screen that I cannot grab and move a bit to the left. Is there a way to change the position/size of the Onboard in a configuration file or something? Edit: On 1. I can answer to myself. :) Code:
lxc-attach -n container -- /path/to/command/to/run |
Re: Full linux distos on Sailfish OS
You should be able to do all that from the GUI too at some point, even though it doesn't work on your phone yet (works well on Proš)!
2. Sound works out of the box for me. Maybe I needed to install pactl/pavucontrol, I don't remember. Then the sound from some applications can be adjusted with the hardware volume rocker, while some others' sound is unaffected and can only be affected in pavucontrol. I cannot firmly confirm yet if it actually works this way in some apps and not the others, or this was the whole session that responded to the volume rocker some times and not others. 3. I never observed that, but don't attach often. I need to test if I can reproduce this. 4. You can export your Onboard settings using the dconf-cli package to run: Code:
dconf dump /org/onboard/ > onboard.conf Code:
dconf load /org/onboard/ < onboard.conf |
Re: Full linux distos on Sailfish OS
Quote:
BTW - I did notice that I have ptmx file in /dev, but /dev/pts/ directory is empty... |
Re: Full linux distos on Sailfish OS
Quote:
|
Re: Full linux distos on Sailfish OS
Quote:
|
Re: Full linux distos on Sailfish OS
Can I somehow use the camera in the e.g. firefox within the container desktop? If so, how?
|
Re: Full linux distos on Sailfish OS
Quote:
Thanks |
Re: Full linux distos on Sailfish OS
Quote:
|
Re: Full linux distos on Sailfish OS
Quote:
Code:
user@Debian-Sid-i3:/$ dconf dump /org/onboard/ > /tmp/test.conf |
Re: Full linux distos on Sailfish OS
Quote:
|
Re: Full linux distos on Sailfish OS
Quote:
The chat worked fine in Jami but the call (video/audio) didn't. With zoom, I was able to join a meeting and see the other party but wasn't able t switch the camera on, didn't hear any sound and the other party didn't hear any sound either. (The sound issue is probably the result of the previously mentioned problem.) I have also installed linphone but didn't have the chance to try it yet. If we can find a way to utilize the camera and speaker/mic the desktop distro will be good for even sip or video calls. (I understand that currently there is no hw acceleration but we may find a workaround for that. And on a powerful device, it might work fine.) |
Re: Full linux distos on Sailfish OS
I tried meet.jit.si (it's open source and requires no installation), but no microphone or camera detected either. Don't know if I would see others, but I assume that part would work since it's just a video stream in browser.
|
Re: Full linux distos on Sailfish OS
@edp17
Would you mind to edit your first post and change the title to 'distros, please? |
Re: Full linux distos on Sailfish OS
Quote:
|
Re: Full linux distros on Sailfish OS
Now that Illyria created an account on TMO, maybe also add a sentence stating harbour-containers and sailfish-lxc-templates are his project and were inspired by the work of Preflex' and Elros34 on chroot? You linked the repositories but now that he has an account here, it would make sense if people could associate his name to this.
|
Re: Full linux distros on Sailfish OS
Quote:
Edit: Until we find out how the maintenance of this topic can be transferred to the author, I have updated the first post with the info you mentioned. If you would like to add anything else in there, please let me know! |
Re: Full linux distros on Sailfish OS
I have no idea if that's possible, but my humble opinion is it's perfectly fine as is! Thanks!
|
All times are GMT. The time now is 17:02. |
vBulletin® Version 3.8.8