Installing latest LibreOffice on Trisquel - Appimage package

17 replies [Last post]
andyprough
Offline
Joined: 02/12/2015

This is a quick how-to about how you can run the latest official Appimage version of LibreOffice on Trisquel (for 64-bit systems). The advantages include:
a. you can run the Appimage version side by side with your normal version of LibreOffice that you installed from the Trisquel repos
b. you can use special features of Appimage to get Libreoffice to start and run very fast

Steps to take:
1. Create and use an appimage folder in your home directory
mkdir ~/appimage
cd ~/appimage

2. Download the latest "Fresh" official Appimage of Libreoffice from the Libreoffice server
wget https://libreoffice.soluzioniopen.com/stable/fresh/LibreOffice-fresh.basic-x86_64.AppImage

3. modify the Appimage to be executable
chmod +x LibreOffice-fresh.basic-x86_64.AppImage

4. The Appimage is actually a compressed series of folders and files - now we are going to de-compress it into its parts
./LibreOffice-fresh.basic-x86_64.AppImage --appimage-extract

5. This last step created a folder in your ~/appimage/ directory called squashfs-root/. cd into that folder, and look around at the files and folders
cd squashfs-root/
ls

6. You'll see that the squashfs-root/ folder contains a file called "AppRun", a .png icon for Libreoffice, a .desktop file, and that it has folders for "opt" and "usr" just like you have on the root directory of your own system. The AppRun file should already be executable. Try using it to open an instance of Libreoffice:
./AppRun

7. If Libreoffice opens, then check under Help-About to see if you are running a 7.2 or later version of Libreoffice. If Libreoffice did not open when you ran the './AppRun' command, then you need to make AppRun executable:
chmod +x AppRun

8. Next, we will link the AppRun file so that your Trisquel system can find it. On the system, I'll call it "libreoffice-fresh", to differentiate it from a version of Libreoffice that I installed from the Trisquel repos. When you run this linking command, make sure you type the FULL PATHS of the files - DO NOT use "~" to represent your home directory:
sudo ln -sf /home/[YOUR_USER_NAME_GOES_HERE]/appimage/squashfs-root/AppRun /usr/local/bin/libreoffice-fresh

9. Test it to see if the linking worked by running the following command from your terminal [if you did not name your link "libreoffice-fresh", then use the name that you chose]. This should start an instance of Libreoffice. Note how quickly Libreoffice opens up for you:
libreoffice-fresh

10. Next, we'll put libreoffice-fresh in your "Office" section of your Trisquel Mate Menu.

With your mouse, right-click on the Mate Menu start button. Select "Edit Menus". You'll get a menu editor program.

Go to the "Office" section, and select "New Item". This will pop up a small "Create Launcher" box.

Under "Name", I type "Libreoffice-fresh", under command, I put "libreoffice-fresh". I click on the icon picture button, and I navigate to /home/[YOUR_USER_NAME_GOES_HERE]/appimage/squashfs-root/ and select the "libreoffice7.2-startcenter.png" icon file, and click "Open".

Next click "OK" on the "Create Launcher" box, and then "Close" on the menu editor program.

Now, open your Mate Menu, navigate to the Office section, and you should find your "Libreoffice-fresh" icon there. Click it to start your Appimage version of the latest Libreoffice.

11. If you want separate menu entries for the different Libreoffice-fresh components such as Writer, Calc, Base, Draw, Impress, and Math, you can repeat the above "Edit Menu" steps and add menu items for the following commands:
libreoffice-fresh --writer
libreoffice-fresh --calc
libreoffice-fresh --impress
libreoffice-fresh --base
libreoffice-fresh --draw
libreoffice-fresh --math

The icons for these components can be found in /home/[YOUR_USER_NAME_GOES_HERE]/appimage/squashfs-root/usr/share/icons/hicolor/32x32/apps/

12. Updating to a newer version of the Libreoffice Fresh Appimage:
a. When Libreoffice releases a new "Fresh" version, they will usually take a few days or even weeks to create the Appimage version. You can check here to see if a more recent version is available:
https://libreoffice.soluzioniopen.com/stable/fresh/

b. If a more recent version is available and you want to update to it, first close any running instance of libreoffice-fresh on your computer. Then, navigate to your ~/appimage folder and delete the LibreOffice-fresh.basic-x86_64.AppImage file and the squashfs-root/ folder:
cd ~/appimage
rm LibreOffice-fresh.basic-x86_64.AppImage
sudo rm -r squashfs-root/

c. Download the new Appimage:
wget https://libreoffice.soluzioniopen.com/stable/fresh/LibreOffice-fresh.basic-x86_64.AppImage

d. Make the Appimage executable
chmod +x LibreOffice-fresh.basic-x86_64.AppImage

e. De-compress the appimage:
./LibreOffice-fresh.basic-x86_64.AppImage --appimage-extract

f. Link the new "AppRun" file to update your system (remember to use FULL PATHS in the linking command):
cd squashfs-root/
sudo ln -sf /home/[YOUR_USER_NAME_GOES_HERE]/appimage/squashfs-root/AppRun /usr/local/bin/libreoffice-fresh

g. Now your Appimage of Libreoffice-fresh should be updated to the latest version. Your Mate Menu entries should still work as before.

Let me know in the replies if you run into any trouble.

andyprough
Offline
Joined: 02/12/2015

Here's a screenshot of my Trisquel desktop, with LibreOffice 6.0.7.3 from the Trisquel repos and LibreOffice 7.2.0.4 from the Appimage running side by side.

The Appimage version starts about 3 times as fast, and uses about 25% less memory. The second screenshot shows that Libreoffice 6.0.7.3, process ID # 14407, uses 4.5% of the memory on a 4gb system, while Libreoffice 7.2.0.4, process ID # 14766, uses 3.3% of the memory.

trisquel-LO-LOFresh.jpg Trisquel-LO-Fresh-ii.jpg
nadebula.1984
Offline
Joined: 05/01/2018

This is because the performance optimization introduced in latest versions. (And this partially explains why I always want a rolling distribution.)

Fortunately, LO 7.x has been backported to Trisquel, so you no longer have to rely on containers. And this could make LO start even faster.

andyprough
Offline
Joined: 02/12/2015

Oh that's good, I had not been exploring backports. And the backports version is one version more current than the Appimage version (as of today).

The backports .deb installation is still just as much slower loading and still uses ~25% more memory than the Appimage version when first started. So there's something about the Appimage that improves speed and resource usage.

lanun
Offline
Joined: 04/01/2021

> you can use special features of Appimage to get Libreoffice to start and run very fast

This reminds me of my flatpak adventures (or was it a dream?). These used to pull massive amounts of dependencies, which in turn made the process itself look leaner once launched.

The appimage might also use sub-processes that make the main process look lighter on resources. Could you possibly check that?

andyprough
Offline
Joined: 02/12/2015

>"These used to pull massive amounts of dependencies, which in turn made the process itself look leaner once launched."

Appimage is not like Flatpak, I know what you are referring to. The Appimage download is about the same size as the regular .deb file download.

>"The appimage might also use sub-processes that make the main process look lighter on resources. Could you possibly check that?"

No, I'd much rather leave us all in a state of mystery and disbelief.

lanun
Offline
Joined: 04/01/2021

> No, I'd much rather leave us all in a state of mystery and disbelief.

Do you mean we'll now have to do our own research on the LibreOffice Appimage?

That is a daunting task, I might crawl back to my pond instead, if I can find it again after such an emotional shock.

EDIT: thanks for the detailed stats and illuminating conclusion. What a relief, I eventually managed to find my usual pond.

andyprough
Offline
Joined: 02/12/2015

I almost changed my name to naAppImageula.1984 before I saw the final results.

lanun
Offline
Joined: 04/01/2021

Not so long ago, I was considering switching to naguixula.1984. Guix being far too bourgeois and intolerably tolerant about PiPY, I chose not to.

naflatpakula.1984 sounds too much like an inflatable vampire for a serious profile.

andyprough
Offline
Joined: 02/12/2015

From a cold boot, 'free -h' shows 360mb of used memory when starting Trisquel and logging into the Mate desktop. Starting the backports version of Libreoffice 7.2 Startcenter from a cold start takes approximately 9 seconds. 'free -h' shows 457mb of used memory once the Libreoffice Startcenter is up and running. So that was 97mb in use to get LO opened. Closing Libreoffice Startcenter returns the used ram to 365mb. Restarting the libreoffice Startcenter now takes approximately 3 seconds. Used ram is now 463mb, so about 98mb used for LO. Starting a blank Writer document takes it up to 513mb, so about 148mb of ram used for LO Writer.

Rebooting the system, 'free -h' now shows 362mb of used memory when logging into the Mate desktop. Starting the Appimage version of Libreoffice 7.2 Startcenter from a cold start also takes approximately 9 seconds. 'free -h' shows 410mb of used memory once the Libreoffice Startcenter is up and running. So the Appimage version is has 48mb of ram in use to get LO opened. Closing Libreoffice Startcenter returns the used ram to 367mb. Restarting the Libreoffice Startcenter now takes approximately 3 seconds. Used ram went up to 413mb, so still 47mb-48mb of ram in use. Starting a blank Writer document takes it up to 519mb of ram used, so about 152mb of total ram used for LO.

================================

In summary, they were tied for speed of opening the program, but the Appimage version took about 1/2 the used ram in order to get the LO Startcenter up and running.

However, when each version started an instance of LO Writer, they both used close to 150mb of ram. So the memory advantage of Appimage for LO seems to fade out as soon as you start using it for work.

So, overall, no advantage for Appimage. And the Trisquel backports version is one version more up to date right now. So, use the backports version and ignore this silly thread.

Malsasa
Offline
Joined: 12/01/2016

Thank you andy for making the tutorial to run LibreOffice 7 on Trisquel with AppImage. Years using AppImages I love it.

Sincerely,

Malsasa

andyprough
Offline
Joined: 02/12/2015

Yes, I love Appimages also. I can run large programs like LibreOffice ithout pulling in lots of different dependencies.

lanun
Offline
Joined: 04/01/2021

Just found this weird comment about AppImage: "the AppImage repository demands more improvement to make it versatile and enormous." Sounds like automated writing. Could be replaced by "the tiny monkey demands more shields to make it blue and happy" without loss of generality.

I did not know about any repo for AppImage, I would normally get it from the source provider.

How would you call the recommended install for the Tor Browser? Is that supposed to be a "portable version"?

jahoti
Offline
Joined: 07/31/2021

"Portable version" is indeed what most projects seem to call it.

lanun
Offline
Joined: 04/01/2021

Ah thanks, I thought maybe "portable" was only for something you could use from a removable device, but then you can also transfer the portable app through such a removable device.

Anyway, I need to do more research on that topic. Until now I was just happy to be able to install the Tor Browser easily (in fact, without really having to install anything) but I did not inquire further. I have become more curious about alternatives to the apt system, especially when it come to improving sandboxing.

Legimet
Online
Joined: 12/10/2013

Apparently there is one. It's called AppImageHub. I was not aware of it either.

andyprough
Offline
Joined: 02/12/2015

You can apparently set up a repo and using zsync packages and the AppImageUpdater tool, you can update your AppImages in a similar way to updating .deb or .rpm packages. I haven't dug into it enough to fully understand the tech, but some projects like LibreWolf publish the zsync packages for the auto-updating.

lanun
Offline
Joined: 04/01/2021

That would indeed make AppImage an even simpler way of getting latest versions.

The existing things (like appimagehub, but there are others too) look more like catalogues, not sure who is maintaining the content.