We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

[Information Request] How does the new aliendalvik have internet access

asked 2019-05-19 18:03:55 +0200

mynameisnotimportant gravatar image

updated 2019-11-27 16:59:56 +0200

jiit gravatar image

Does anyone know how the new aliendalvik has networking access? I am trying to get archlinux to run in a container, and cannot figure out how to allow it to access the network.

lxc-net does not even seem to create a network device (checked with ifconfig) even after adding the relevant configuration to /etc/default/lxc-net, and trying to start a container with a lxc bridge enabled prevents it from starting.

Anything even remotely related to networking doesn't exist on Sailfish OS, and as it turns out even stopping lxc-net does not cause android applications to lose internet access, so it's not that.

So how on earth does aliendalvik have internet access? Even better, how could I give another container internet access too?

edit retag flag offensive close delete

Comments

its a good question of which i dont know the answer, but what i can say is that in sfos, theres connman handling all the network traffic. its probably talking to it via some unix domain socket.

tortoisedoc ( 2019-05-19 23:31:10 +0200 )edit

If only Jolla would shed some light on this :) I'd really love to be able to have arch run in background, and eventually have desktop shortcuts to launch certain applications (like chromium) seamlessly, kinda how you can launch android apps :D

mynameisnotimportant ( 2019-05-20 00:51:28 +0200 )edit

2 Answers

Sort by » oldest newest most voted
3

answered 2019-05-20 01:27:00 +0200

lethe gravatar image

In short: aliendalvik just uses the hosts network interfaces.

If you have a look at /var/lib/lxc/aliendalvik/config you'll find the line:

lxc.net.0.type = none

According to the lxc.container.conf manpage this means:

none: will cause the container to share the host's network namespace. This means
the host network devices are usable in the container. It also means that if both
the container and host have upstart as init, 'halt' in a container (for instance)
will shut down the host.
edit flag offensive delete publish link more

Comments

Thank you so much, I don't think I would have ever figured this out. I automatically assumed that none means no networking at all, it did not even occur to me to check whether it could mean something else.

mynameisnotimportant ( 2019-05-20 06:01:03 +0200 )edit
0

answered 2019-05-20 03:15:22 +0200

butler gravatar image

Try adding users that need internet to inet group, it may help. I can't tell if you need to sync uids/guids inside and outside of container though. You can also try using chroot instead of containerization. I have debian running in chroot, it works.

edit flag offensive delete publish link more

Comments

Thanks, unfortunately arch doesn't seem to have inet. I actually tried it with a chroot before switching to LXC (manually mounting stuff seemed so messy). Unfortunately no matter what I do, I cannot get it set up in such a way that non-root users can access the internet. Although I am not a big fan of it personally (for subjective reasons), I may have to try debian (or ubuntu, since that's somewhat similar) instead of arch.

mynameisnotimportant ( 2019-05-20 06:13:20 +0200 )edit

thanks for the inet tip. Making a new group called inet, giving it the same ID as the SFOS group by the same name and adding my chroot-ed user to it seems to have made the internet miraculously work for non-root users :D

mynameisnotimportant ( 2019-05-20 07:15:16 +0200 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2019-05-19 18:03:55 +0200

Seen: 499 times

Last updated: May 20 '19