[lxc-users] Desktop Environment in LXD
brian mullan
bmullan.mail at gmail.com
Sat Jun 18 14:34:12 UTC 2016
I do this using 3 different methods.
using xnest
using xRDP & Guacamole
and using x2go.
For me the most easiest & most full featured approach is x2go.
Guacamole & xRDP works great & only requires an HTML5 bBrowser but there is
alot to the setup and some capabilities of Guacamole (cut & paste,
printing) are still a bit cumbersome to accomplish.
The following is going to assume Ubuntu 16.04 and x2go...
## Create an LXD container using say Ubuntu 16.04
## enter the container:
lxc exec container_name bash
## 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
sudo 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)
sudo 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
sudo 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
## adn when done configuring the container... reboot the container
>>> On the Host:
sudo apt install software-properties-common -y
## add the x2go repository
sudo add-apt-repository ppa:x2go/stable
sudo apt install x2goclient
= = = = = = =
Finally make sure you container is started & get its IP address
Start the x2go client (Click the DASH icon and type "x2go") then click on
the x2go icon that comes up
In the x2go client gui create a Profile (upper left corner icon of the x2go
gui) for the container
1. enter some Profile "name" at the top to ID what that profile is for
say "My Ubuntu-Mate Desktop)
2. input the container's HOST IP,
3. click the drop down menu and select which Desktop Environment (re
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.
Then execute that Profile by clicking on it & login using one of the login
ID's you created in the container.
Audio/Printing etc should also all just work.
If you can't login the usual problem are authentication is not setup right
(login ID + password vs key based) remember to do that in container.
Note:
Once you've created the 1st container like this you can just clone/copy it
to create more.
On the Host 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.
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160618/0ef5990d/attachment.html>
More information about the lxc-users
mailing list