Libertine: install and manage desktop applications
Introduction
Libertine is a tool to install and manage standard desktop applications in Ubuntu Touch.
Background
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. Therefore the root filesystem is read only. Libertine provides a container with a read-write filesystem to allow the installation of regular Linux desktop applications.
Desktop Apps Scope
To display and launch applications with Libertine you need the Desktop Apps Scope which is available in the Canonical App Store.
Manage containers
Create a container
The first step is to create a new container where applications can be installed:
libertine-container-manager create -i container-identifier
You can add extra options such as:
-n name name is a more user friendly name of the container
-t type 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 hunded 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:
ssh localhost
List containers
To list all containers created run:
libertine-container-manager list
Destroy a container
libertine-container-manager destroy -i container-identifier
Manage applications
Once a container is set up, you can manage applications:
libertine-container-manager list-apps -i container-identifier Lists installed applications
libertine-container-manage install-package -i container-identifier -p package-name install a package
libertine-container-manager remove-package -i container-identifier -p package-name remove a package
Other useful commands
To execute any arbitrary command inside the container run:
libertine-container-manager exec -i container-identifier -c "command you want to execute"
To have a shell you can run bash:
libertine-container-manager exec -i container-identifier -c /bin/bash
Note
When you launch bash in this way you will not get any specific feedback to confirm that you are not 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.