Cloud Desktop with LXC
The following is going to assume Ubuntu 16.04
Create an LXC container using Ubuntu 16.04
add some repositories for xenial (re 16.04)
echo "deb http://archive.canonical.com/ubuntu xenial partner" | sudo tee -a /etc/apt/sources.list echo "deb-src http://archive.canonical.com/ubuntu xenial partner" | sudo tee -a /etc/apt/sources.list
echo "deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list apt install software-properties-common -y
add the ubuntu-mate repository
add-apt-repository ppa:ubuntu-mate-dev/xenial-mate -y
add the x2go repository add-apt-repository ppa:x2go/stable
update & upgrade the container apt update && apt upgrade -y
install ubuntu-mate dekstop or xubuntu-desktop or lubuntu-desktop (this will take upto 30 min or more depending on PC/HD etc)
apt install lightdm ubuntu-mate-core ubuntu-mate-desktop -y
set things up so all future user accounts you create in this container default to the Ubuntu-Mate desktop
update-alternatives --set x-session-manager /usr/bin/mate-session
install the x2go server side software
apt install x2goserver x2goserver-xsession
create user accounts for your “users” as you normally would then depending on whether you want to use login/password or a key based login edit the /etc/ssh/sshd_config and set it up appropriately
when done configuring the container… reboot
On you client machine(s):
apt install software-properties-common -y
add the x2go repository
apt install x2goclient
Finally, make sure you container is started & get its IP address
Start the x2go client
In the x2go client gui create a Profile (upper left corner icon of the x2go gui)
1. enter a Profile “name” at the top, for example “My Ubuntu-Mate Desktop”
2. input the container’s HOST IP,
3. click the drop down menu and select which Desktop Environment (Session Type) you installed (Mate in the case)
4. Save that profile.
You will see that there will appear a new square icon on the right side of the x2go GUI. Execute that Profile by clicking on it & login using one of the logins you created in the container.
Audio/Printing etc should also all just work. If you can’t login the some problems are:
- authentication is not setup right (username + password vs key based) remember to do that in container.
- the .profile is not correct. I had to replace
mesg n || true
tty -s && mesg n
This should get you to a nice new Ubuntu Mate desktop running at near native speeds. Further testing needs to be done to see how fast the thing is!
Note: Once you’ve created the 1st container you can just clone/copy it to create more. On the Client just create a different x2go Login Profile for each container/IP & give each Profile a different Title. You can also have diff containers with different desktops (xubuntu, lubuntu, ubuntu-mate etc)
If you leave the x2go Profile LOGIN field empty any valid user can click on the Profile Icon and just fill in their ID and Password in order to log into the container.