The first step is to create a container where applications can be installed:

libertine-container-managercreate-iCONTAINER-IDENTIFIER

You can add extra options such as:

-nname name is a more user friendly name of the container

-ttype type can be either chroot or lxc. Default is chroot and is compatible with every device. If the kernel of your device supports it then lxc is suggested.

The creating process can take some time, due to the size of the container (some hundred of megabytes).

Note

The create command shown above cannot be run directly in the terminal app, due apparmor restrictions. You can run it from another device using either adb or ssh connection. Alternatively, you can run it from the terminal app using a loopback ssh connection running this command: sshlocalhost.

The first option is based on libertine-container-managerexec. It lets you run your commands as root. The drawback is that the container is not completely set up. So far we know that the folders mentioned above (Documents, Music, …) are not mounted i.e., the /home/phablet/ directory is empty. Likewise the directory referenced in TMPDIR is not available what may lead to problems with software that tries to create temporary files or directories.
You may use this option e.g., for installing packages.

The second option is based on libertine-launch. It will execute your commands as user phablet in a completely set up container. So you may use this option to modify your files using installed packages.

To execute a command you can use the following pattern:

libertine-launch-iCONTAINER-IDENTIFIERCOMMAND-LINE

For example run:

libertine-launch-iCONTAINER-IDENTIFIERls-a

To get a shell as user phablet run:

DISPLAY=libertine-launch-iCONTAINER-IDENTIFIER/bin/bash

Note

When you launch bash in this way you will not get any specific feedback to confirm that you are now inside the container. You can check ls/ to confirm for yourself that you are inside the container. The listing of ls/ will be different inside and outside of the container.

A display server coordinates input and output of an operating system. Most Linux distributions today use the X server. Ubuntu Touch does not use X, but a new display server called Mir. This means that standard X applications are not directly compatible with Ubuntu Touch. A compatibility layer called XMir resolves this. Libertine relies on XMir to display desktop applications.

Another challenge is that Ubuntu Touch system updates are released as OTA images. A consequence of this is that the root filesystem is read only. Libertine provides a container with a read-write filesystem to allow the installation of regular Linux desktop applications.