LXC containers in practical use on the desktop

Slashdot it! Delicious Share on Facebook Tweet! Digg!

Enjoying the View

You then start the X2goclient on the host and accept the session settings (Figure 5). You can pick the name of the session you want and you add the container's IP address (which you can get with lxc-ls --fancy ) in the Host field. Note that each container has its own IP address. Use lxc-info for additional details (Figure 6).

Figure 5: X2go preference settings.
Figure 6: Information from lxc-info.

The Login is the container's username (root if you haven't added any other users) and the Session type is the desktop environment. On the second tab, move the Connection type slider all the way to the right to LAN . On the Display tab, set the display size. You can now enter the graphical desktop (Figure 7). All changes you now make apply only to the container. Stopping the container requires that you run

$ sudo lxc-stop -n <container_name>

Replacing stop with destroy deletes the container. LXC has several other applications that are easy to find on the Internet. Ubuntu 14.10 has complete documentation for LXC [13].

Figure 7: X2go graphical display log in screen.

Docker and GUI

The difference between LXC containers and those on Docker is that Docker provides a lot more functionality. This includes features ranging from interfaces for apps for container orchestration in the cloud, to those for managing entire clusters. These functionalities, however, aren't as important for the end user. If you take into account that Docker until version 0.9 was based on LXC before in-house development deferred to Libcontainer [14], it's clear that LXC is better adapted for end users to export the X display from GUI applications (see Figure 8).

Figure 8: Logged into the X2go graphical display: LXDE running on Debian.

Other solutions are available instead of Docker, but they require more effort without necessarily adding value. The existing solutions depend on SSH, Xpra and Xephyr, and also X2go. As with LXC, the greatest effort is in the setup, after which containers can start in a matter of seconds. Several guides are available if you want to test these solutions for yourself.

Buy this article as PDF

Express-Checkout as PDF

Pages: 5

Price $0.99
(incl. VAT)

Buy Ubuntu User

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content