Skip to content

UseOtherRepositorys

Adam Boardman edited this page Mar 11, 2019 · 13 revisions

KDE Neon

KDE Neon tracks the latest KDE software and builds upon the latest Ubuntu LTS.

linux containers - lxc

Basic ubuntu + a couple of neon apps will use 2.5GB of disk.

Install lxc and dnsmasq:

sudo apt-get install lxc dnsmasq

Create /etc/default/lxc-net with the following:

USE_LXC_BRIDGE="true"
LXC_BRIDGE="lxcbr0"
LXC_ADDR="10.0.3.1"
LXC_NETMASK="255.255.255.0"
LXC_NETWORK="10.0.3.0/24"
LXC_DHCP_RANGE="10.0.3.2,10.0.3.254"
LXC_DHCP_MAX="253"
LXC_DHCP_CONFILE=""
LXC_DOMAIN=""

Enable and start the lxc networking component:

sudo systemctl enable lxc-net
sudo systemctl start lxc-net

Create a container for it:

sudo lxc-create --name neon -t download

Answers to its questions (for local pc testing, for on device will need neon support rumoured to be coming soon arm64):
ubuntu - xenial - amd64

This will have made your container in:

/var/lib/lxc/neon/

You'll need to edit the config:

sudo nano /var/lib/lxc/neon/config

Add:

lxc.aa_allow_incomplete = 1

Some useful commands to check things are all good:

sudo lxc-ls
sudo lxc-info --name neon

Start the container:

sudo lxc-start --name neon --logfile /home/[USER]/lxc_neon.log --logpriority DEBUG

Enter the container:

sudo lxc-attach --name neon

Install some packages:

root@neon:/# apt-get install nano dbus-x11 openssh-client

Then add to /etc/apt/sources.list

deb http://archive.neon.kde.org/user xenial main

Add the public key:

wget http://archive.neon.kde.org/public.key
sudo apt-key add public.key

Then:

sudo apt-get update

Now you can install apps as you desire.

To make x apps work

Need to add root:1000:1 to subuid and subgid (on host system):

echo "root:$UID:1" | sudo tee -a /etc/subuid /etc/subgid

Update /var/lib/lxc/neon/config to add mount points for X (on host system):

lxc.mount.entry =/tmp/.X11-unix/X0 tmp/.X11-unix/X0 none rw,bind,create=file 0 0
lxc.mount.entry =/home/[USER]/.Xauthority home/[USER]/.Xauthority none rw,bind,create=file 0 0

Restart container:

sudo lxc-stop --name neon
sudo lxc-start --name neon --logfile /home/[USER]/lxc_neon.log --logpriority DEBUG

Re enter container:

sudo lxc-attach --name neon

Switch to user ubuntu:

su ubuntu

You should now be able to run neon apps.

docker

Install docker:

apt-get install apt-transport-https dirmngr

Add 'deb https://apt.dockerproject.org/repo debian-stretch main' to /etc/apt/sources.list

Install the apt key:

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

Update:

apt-get update
apt-get install docker-engine

Can then run full kdeneon within a window, or a single app.

Full KDENeon inside docker

Run Xephyr x in x system (picked half native size for testing on a desktop):

Xephyr -screen 1080x540 :1 &

Run neon in docker talking to the Xephyr x (Takes another +1GB of downloads):

sudo docker run -v /tmp/.X11-unix:/tmp/.X11-unix kdeneon/plasma:user

(this will actually install the image and container)

You can then login to the neon and use it as if you'd installed neon natively.

Run single application from KDENeon inside docker

Run konsole from inside docker:

docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=:0 kdeneon/plasma:user konsole

This maps the internal and external X11's together and as long as the internal/external userid's are the same you don't need to run xhost + to open up access.