This tutorial provides all the required steps to install Flatpak as well as downloading, installing, and running LibreOffice on Clear Linux.

Please visit the Flatpak website for more information about Flatpak and how to use it.

Before you begin

This tutorial assumes you have installed Clear Linux on your host system. For detailed instructions on installing Clear Linux on a bare metal system, visit our bare metal installation tutorial.

Install Flatpak on your host system

Flatpak is included as part of the bundle desktop. To install the application, log in to your user account and enter the following command:

$ sudo swupd bundle-add desktop

Install and run the LibreOffice Flatpak image

Application developers have the option to bundle their applications using Flatpak to allow the installation of a single distribution of their application on different distributions of Linux, including Clear Linux. Flatpak provides a list of applications available through Flatpak.

Download and install the Latest LibreOffice Flatpak

To get the latest version of the LibreOffice Flatpak repository, either download it here or you can enter the following command:

$ curl –O -L http://download.documentfoundation.org/libreoffice/flatpak/latest/LibreOffice.flatpak

The command downloads the latest LibreOffice.flatpak and saves it in your current directory.

Once the download is complete, the next step is to install LibreOffice along with the runtime environment LibreOffice needs to execute. As mentioned on the Flatpak website, with the release of Flatpak 0.8.0 and LibreOffice.flatpak 4.2.4, you no longer have to specifically install the runtime required to execute LibreOffice since it will automatically install the runtime referenced in the LibreOffice.flatpak file.

To install LibreOffice run the following command:

$ sudo flatpak install --bundle LibreOffice.flatpak

The output from this command will look similar to the following.

Note

You will be prompted to install the runtime environment if it is not already installed. Type y to allow this task to execute.

GLib-GIO-Message: Using the 'memory' GSettings backend.
Your settings will not be saved or shared with other applications.
This application depends on runtimes from:
http://sdk.gnome.org/repo/
Configure this as new remote 'gnome' [y/n]: y
Required runtime for org.libreoffice.LibreOffice/x86_64/fresh
(org.gnome.Platform/x86_64/3.20) is not installed, searching...
Found in remote gnome, do you want to install it? [y/n]: y
Installing: org.gnome.Platform/x86_64/3.20 from gnome

Receiving delta parts: 0/11 2.5 MB/s 4.9 MB/223.2 MB 1 minutes 28 seconds
remain
Receiving delta parts: 0/11 2.9 MB/s 8.7 MB/223.2 MB 1 minutes 13 seconds
remain
11 delta parts, 84 loose fetched; 218002 KiB transferred in 17 seconds
Installing: org.gnome.Platform.Locale/x86_64/3.20 from gnome

5 metadata, 1 content objects fetched; 13 KiB transferred in 1 seconds
Installing: org.libreoffice.LibreOffice/x86_64/fresh from bundle
LibreOffice.flatpak

Once the LibreOffice Flatpak application has been installed, you can launch LibreOffice with the following command from the command line:

$ flatpak run org.libreoffice.LibreOffice

Add LibreOffice to your Gnome desktop

A new icon will appear in your Gnome applications list titled LibreOffice. To execute the application, highlight the application and click on the LibreOffice icon. LibreOffice will start normally.

Gnome desktop

Figure 1: Select Gnome applications list