| Prev |   2     3   4   5     6   | Next | Last
maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Full linux distros on Sailfish OS (https://talk.maemo.org/showthread.php?t=101080)

vaskas 2020-12-16 03:34

Re: Full linux distros on Sailfish OS
 
Hi guys, I am trying to get `debian.sh` to start from ShellEx - is there any way to work around the su requirement for lxc-attach apart from enabling passwordless execution for defaultuser in /etc/sudoers? I couldn't find an askpass program for SFOS either.

levone1 2020-12-16 10:18

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by vaskas (Post 1570505)
Hi guys, I am trying to get `debian.sh` to start from ShellEx - is there any way to work around the su requirement for lxc-attach apart from enabling passwordless execution for defaultuser in /etc/sudoers? I couldn't find an askpass program for SFOS either.

Try qCommand instead...

vaskas 2021-01-14 02:58

Re: Full linux distros on Sailfish OS
 
Has anyone been able to get the camera working in the LXC container? I bind-mounted all the video* devices and they are showing correctly in /dev but am having no luck with any applications.

levone1 2021-01-15 02:43

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by vaskas (Post 1570698)
Has anyone been able to get the camera working in the LXC container? I bind-mounted all the video* devices and they are showing correctly in /dev but am having no luck with any applications.

Which have you tried? I tried Cheese, Pinhole and Megapixels. Cheese starts and gives "no device found", Pinhole starts but gives error "viewfinder is not in ready state", and Megapixels won't start, shows error in terminal about "...no config file".

Can you tell me the proper mount command for video devices? Attempting 'ls -ltr /dev/video*' gives, "no such file or directory" ...

vaskas 2021-02-17 03:41

Re: Full linux distros on Sailfish OS
 
I added the following lines into my /var/lib/lxc/Debian/config:

lxc.cgroup.devices.allow = c 81:* rwm
lxc.mount.entry = /dev/video0 dev/video0 none bind,create=file 0 0
lxc.mount.entry = /dev/video1 dev/video1 none bind,create=file 0 0
lxc.mount.entry = /dev/video2 dev/video2 none bind,create=file 0 0
lxc.mount.entry = /dev/video32 dev/video32 none bind,create=file 0 0
lxc.mount.entry = /dev/video33 dev/video33 none bind,create=file 0 0

I can see the devices inside the container's /dev. But none of the apps seem to be able to work with them.

mibry 2021-03-10 20:27

Re: Full linux distros on Sailfish OS
 
Hi,

lurker of the forums here, I upgraded my phone 4.0.1.48, tried to use harbour-containers without success. The xwayland display failed to start. I have not tried to trouble start as of yet.

mosen 2021-03-11 01:14

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by mibry (Post 1571179)
Hi,

lurker of the forums here, I upgraded my phone 4.0.1.48, tried to use harbour-containers without success. The xwayland display failed to start. I have not tried to trouble start as of yet.

Welcome mibry!

Since you are in devel waters it is best to first ask Adam in person on Telegram how (and wether) to update at all ;)

@bundyo might have advise since he upgraded to 4.0.1 very early successfully. He needed to manually downgrade some packages afair.
Adams Proš related Telegram group again:
https://t.me/sfos_user_pro1

mibry 2021-03-11 04:41

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by mosen (Post 1571180)
Welcome mibry!

Since you are in devel waters it is best to first ask Adam in person on Telegram how (and wether) to update at all ;)

@bundyo might have advise since he upgraded to 4.0.1 very early successfully. He needed to manually downgrade some packages afair.
Adams Proš related Telegram group again:
https://t.me/sfos_user_pro1

Thanks, I reflashed my pro1 back to 3.4.

mibry 2021-03-19 22:51

Re: Full linux distros on Sailfish OS
 
Is there any plans to update for sailfish 4 without having to downgrade RPM's?

Thanks in advance.

Bundyo 2021-03-21 21:28

Re: Full linux distros on Sailfish OS
 
I didn't downgrade - just some packages changed naming, so I had to do that before upgrading. Not sure, but I think in testing there's no need to manually do that anymore. You can ask Adam in the Telegram chat.

levone1 2021-03-23 17:31

Re: Full linux distros on Sailfish OS
 
@edp17 - question ... I am finding that X session is not working in harbour-containers app. I heard on Telegram that it has been happening with 4.0 due to the change from nemo to defaultuser, and can be fixed by creating a defaultuser symlink, or rebuilding the app with a code change. I was going to work on that, but then I see that the default user on XZ2c is still nemo, not defaultuser. Any thoughts ?

rinigus 2021-03-23 18:23

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by levone1 (Post 1571306)
@edp17 - question ... I am finding that X session is not working in harbour-containers app. I heard on Telegram that it has been happening with 4.0 due to the change from nemo to defaultuser, and can be fixed by creating a defaultuser symlink, or rebuilding the app with a code change. I was going to work on that, but then I see that the default user on XZ2c is still nemo, not defaultuser. Any thoughts ?

On SFOS 4.0, default user would depend on whether you've got to 4.0 via OTA or fresh install. That should be for all official and on ports as Xperia Tama.

As a result: if you flash new 4.0 image -> defaultuser is used

if you come from earlier versions -> nemo is kept.

I don't remember when the user name switch happened. I have a feeling it was earlier than 4.0

levone1 2021-03-23 19:12

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1571308)
On SFOS 4.0, default user would depend on whether you've got to 4.0 via OTA or fresh install. That should be for all official and on ports as Xperia Tama.

As a result: if you flash new 4.0 image -> defaultuser is used

if you come from earlier versions -> nemo is kept.

I don't remember when the user name switch happened. I have a feeling it was earlier than 4.0

ok. So must be something else...

Fellfrosch 2021-03-23 21:54

Re: Full linux distros on Sailfish OS
 
the switch to defaultuser came with release 3.4. Since then I'm not able to start a containers on my Pro1. I fiddled around with symlinks and changes in the scripts. Even so I got X session to run, I haven't got a running container. I still hope there will be new packages which fixes these problems.

olf 2021-03-23 23:14

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1571308)
On SFOS 4.0, default user would depend on whether you've got to 4.0 via OTA or fresh install. That should be for all official and on ports as Xperia Tama.

As a result: if you flash new 4.0 image -> defaultuser is used

if you come from earlier versions -> nemo is kept.

I don't remember when the user name switch happened. I have a feeling it was earlier than 4.0

Yes, it was introduced with SFOS 3.4.0.

levone1 2021-03-25 00:54

Re: Full linux distros on Sailfish OS
 
started a new container from scratch (Debian Sid) and working fine now...

Fellfrosch 2021-03-25 16:38

Re: Full linux distros on Sailfish OS
 
What steps exactly have you done?
I'm still struggeling to get a running container on 3.4.

levone1 2021-03-25 20:16

Re: Full linux distros on Sailfish OS
 
1 Attachment(s)
Quote:

Originally Posted by Fellfrosch (Post 1571355)
What steps exactly have you done?
I'm still struggeling to get a running container on 3.4.

I've only gotten Xsession to work on Debian Sid and Devuan...
Start from scratch, open app and create new container, with "set up desktop" option checked. Let it go through the whole container setup, and also Xwayland build process. Don't lose internet connection and don't interrupt the process. The whole thing is 15-20 mins. Yhe terminal will close automatically whrn done. Then you can start the container and tap Xsession button, and should work.

I'm using XZ2compact ...

Fellfrosch 2021-03-26 06:16

Re: Full linux distros on Sailfish OS
 
So you have made no adpations in the scripts to the new username defaultuser???
:eek:

Bundyo 2021-03-26 09:25

Re: Full linux distros on Sailfish OS
 
Maybe he has a symlink from nemo to defaultuser.

Fellfrosch 2021-03-26 11:48

Re: Full linux distros on Sailfish OS
 
Well, I have that as well. I see, i have to make further tries on that side.

levone1 2021-03-26 13:26

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by Fellfrosch (Post 1571366)
So you have made no adpations in the scripts to the new username defaultuser???
:eek:

I have updated ota since 3.2, so still on nemo... (defaultuser gets written in on clean install)

Fellfrosch 2021-03-26 14:23

Re: Full linux distros on Sailfish OS
 
Thanx for clarification!

levone1 2021-05-19 15:09

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by Fellfrosch (Post 1571366)
So you have made no adpations in the scripts to the new username defaultuser???
:eek:

So I did a clean flash of 4.0, and decided to tinker with Containers for defaultuser, and it's actually pretty simple:
1 - download source
2 - make change to daemon.py file
3 - add %setup line to spec

Then just use rpmbuild to create rpm. Installs and runs normally ...

Kabouik 2021-05-21 08:24

Re: Full linux distros on Sailfish OS
 
We should raise a PR for that, but I have not found how to write it so that daemon.py would work with any user name, not just defaultuser. Maybe using `import os` and then `os.environ.get('USER')` would work?

Anyone willing to try with this commit/fork? I don't have a device ready to try and I'm not prepared to compromise my LXC install right now as I really depend on it, but if that works, I can submit the PR.

I am sorry I didn't read TMO lately but I see this is being discussed since March, while others had found the same the same temporary workaround at some earlier point on either the Telegram or Discord groups.

txus 2021-05-21 09:13

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by Kabouik (Post 1571826)
We should raise a PR for that, but I have not found how to write it so that daemon.py would work with any user name, not just defaultuser. Maybe using `import os` and then `os.environ.get('USER')` would work?

Anyone willing to try with this commit/fork? I don't have a device ready to try and I'm not prepared to compromise my LXC install right now as I really depend on it, but if that works, I can submit the PR.

I am sorry I didn't read TMO lately but I see this is being discussed since March, while others had found the same the same temporary workaround at some earlier point on either the Telegram or Discord groups.

I do not have any Sailfish devices currently, so I can't test it, but since you are on the quest of fixing the problem by removing coded in constants which are actually environment variables (ok for early test, no-go for release), you could try to also remove the fixed UID by using os.getuid(). :)

levone1 2021-05-21 10:39

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by Kabouik (Post 1571826)
We should raise a PR for that, but I have not found how to write it so that daemon.py would work with any user name, not just defaultuser. Maybe using `import os` and then `os.environ.get('USER')` would work?

Anyone willing to try with this commit/fork? I don't have a device ready to try and I'm not prepared to compromise my LXC install right now as I really depend on it, but if that works, I can submit the PR.

I am sorry I didn't read TMO lately but I see this is being discussed since March, while others had found the same the same temporary workaround at some earlier point on either the Telegram or Discord groups.

I built rpm using your daemon.py, and it is working fine. I already had Containers installed, and had a working Debian container, and I just uninstalled my Containers app, and installed the new build, so maybe not the best test... I can upload/link rpm if appropriate ....

Kabouik 2021-05-21 11:29

Re: Full linux distros on Sailfish OS
 
Thanks to both of you! I added `os.getuid()` too as you recommended txus. I'll try to get someone to test it on a device with no current installation of LXC and no existing container, in case that matters. I'll submit a PR if that works.

Fellfrosch 2021-05-22 15:06

Re: Full linux distros on Sailfish OS
 
I have currently no running containers. So I can test for you. So what do I have to do?
At first uninstall LXC if I got you right... And then? What rpms should I install?

Kabouik 2021-05-22 17:21

Re: Full linux distros on Sailfish OS
 
You could install the rpm that is already compiled on the Github repository, which you may already have.

Then kill the daemon: run "ps aux | grep daemon.py", then "kill -9 <daemon.py PID>".

And then replace your /usr/share/harbour-containers/service/daemon.py with the one in the fork above. Make sure you download the raw daemon.py and not the HTML view. And reboot.

One thing to keep in mind is you may have leftover configs in /var/lib/lxc. So if that doesn't work, it might be worth checking those and/or creating a new container, to make sure the configs are not still trying to use nemo.

Fellfrosch 2021-05-23 13:05

Re: Full linux distros on Sailfish OS
 
It doesn't work.
But that has nothing to do with your patch!

It seems like I have something destroyed with my fiddeling around on lxc. If i try to create a container. It there is the information that the container is running the setup, but after that the container wich was initially shown vanishes and that's it. (No matter if I use the original deamon.py or yours) So I have first to look what I have borked on my system.

I'm grateful for tipps. I have already deinstalled lxc many times and have searched for directories with the name lxc on my file system to empty them. Unfortunately with no success regarding the container setup. I have to dig deeper I fear....

Kabouik 2021-05-23 13:19

Re: Full linux distros on Sailfish OS
 
Hum, I'm not sure exactly where your issue comes from. Do you have files in the folders I mentioned in my previous post?

Thanks for trying anyway! Note that I forgot to mention this would be tried without nemo/defaultuser symlink, else LXC could work because of that and not because of the patch.

levone1 2021-05-23 13:53

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by Kabouik (Post 1571841)
You could install the rpm that is already compiled on the Github repository, which you may already have.

Then kill the daemon: run "ps aux | grep daemon.py", then "kill -9 <daemon.py PID>".

And then replace your /usr/share/harbour-containers/service/daemon.py with the one in the fork above. Make sure you download the raw daemon.py and not the HTML view. And reboot.

One thing to keep in mind is you may have leftover configs in /var/lib/lxc. So if that doesn't work, it might be worth checking those and/or creating a new container, to make sure the configs are not still trying to use nemo.

Question - I wanted to try this method out of curiosity, since I'm interested in learning more about dbus, etc... I assume from your post that the first command (grep) is for the purpose of getting the PID of daemon.py, to use for the second command, to kill the service. But, when I use the 2nd command with the number I get frim the output of the first command, I get "... no process with PID... " error.
Am I understanding wrong?
EDIT - never mind... I think my process was dead already...

levone1 2021-05-23 13:54

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by Fellfrosch (Post 1571842)
It doesn't work.
But that has nothing to do with your patch!

It seems like I have something destroyed with my fiddeling around on lxc. If i try to create a container. It there is the information that the container is running the setup, but after that the container wich was initially shown vanishes and that's it. (No matter if I use the original deamon.py or yours) So I have first to look what I have borked on my system.

I'm grateful for tipps. I have already deinstalled lxc many times and have searched for directories with the name lxc on my file system to empty them. Unfortunately with no success regarding the container setup. I have to dig deeper I fear....

Maybe try Mashka to delete any lingering data/configs from previous installations, and even search filesystem for traces of "harbour-containers" and delete everything...

Kabouik 2021-05-23 21:44

Re: Full linux distros on Sailfish OS
 
Maybe the PID you saw and tried to kill was that of `grep daemon.py` itself levone1, if the daemon was already stopped in your case.

spoofykid 2021-05-24 03:13

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by Kabouik (Post 1571841)
You could install the rpm that is already compiled on the Github repository, which you may already have.

Then kill the daemon: run "ps aux | grep daemon.py", then "kill -9 <daemon.py PID>".

And then replace your /usr/share/harbour-containers/service/daemon.py with the one in the fork above. Make sure you download the raw daemon.py and not the HTML view. And reboot.

One thing to keep in mind is you may have leftover configs in /var/lib/lxc. So if that doesn't work, it might be worth checking those and/or creating a new container, to make sure the configs are not still trying to use nemo.

Hi. I thought to give this a go, as I do not have nemo as my username. This is a fresh install. I went through the guide to install everything, and then followed your guide to replace daemon.py. I also had the "... no process with PID... " error when killing the service. I then used terminal to remove the old daemon.py file and copy the new one over. I then rebooted.

But now, when I open the container, there is nothing there. It doesn't not show Alien Dalvik or the option to create a new container. It only shows the menu of Freeze/Stop all, and about.

Any suggestions?
Thank you.

spoofykid 2021-05-24 10:56

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by levone1 (Post 1571845)
Maybe try Mashka to delete any lingering data/configs from previous installations, and even search filesystem for traces of "harbour-containers" and delete everything...

Would someone mind writing a description of how to uninstall harbour-containers please? After attempting to install a distro, the container stopped showing anything, and I don't know how to restart it to get working again. Any help for a noob would be awesome. Thanks.

mosen 2021-05-24 12:18

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by spoofykid (Post 1571852)
Would someone mind writing a description of how to uninstall harbour-containers please? After attempting to install a distro, the container stopped showing anything, and I don't know how to restart it to get working again. Any help for a noob would be awesome. Thanks.

You could first of all look which containers exist with
Code:

lxc-ls
It will show aliendalvik if installed and additional containers you set up.

Then delete the one that failed to set up with
Code:

lxc-destroy <CONTAINERNAME>
Use brackets if your container name has spaces like "debian sid".
harbour-containers did then start up again in my case.

I am on 4.0.1.48 on Proš and in process to figure out how to set up debian so Kabouik can finally move to 4.0 from 3.3 :D

It would be great if someone could post instuctions how to create and setup a debian container from CLI. That way i could supply the logs here. I figure the ones from first post are outdated?

mosen 2021-05-24 13:02

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by levone1 (Post 1571821)
So I did a clean flash of 4.0...

Sorry for spotting this only just now.
Your wording implies one of the Proš 4.0 images actually worked?
Or did you flash 3.4 and then OTA to 4.0?

I tried to flash all of the 4.0 images listed in the gitlab artifacts and they did not work for me.
Adam would be quite relieved to hear they actually work and it was my error they did not!

spoofykid 2021-05-24 19:44

Re: Full linux distros on Sailfish OS
 
Quote:

Originally Posted by mosen (Post 1571853)
...
Then delete the one that failed to set up with
Code:

lxc-destroy <CONTAINERNAME>
...

Thank you! So easy. It brought my harbour-containers back to life.

Quote:

Originally Posted by Kabouik (Post 1571841)
...
And then replace your /usr/share/harbour-containers/service/daemon.py with the one in the fork above.
...

Thanks - this worked for me. It might be worth noting (for people like me) that you need to make the copied file executable
Code:

chmod +x daemon.py
otherwise the container application opens with nothing in it.


| Prev |   2     3   4   5     6   | Next | Last
All times are GMT. The time now is 13:01.

vBulletin® Version 3.8.8