Xubuntu 20.04 Thunar archive bug

By charm, 8 February, 2021

Xubuntu 20.04 doesn't display 'create archive' when you right click on a LibreOffice document

There is a bug in the archive plugin for the XFCE-based file manager Thunar in Xubuntu 20.04 and Linux Mint 20.1. The bug appears when you right click on any LibreOffice file. Normally you should be able to "create archive" when you right click on a file in Thunar, this is the case for most files, but not LibreOffice files (.ods, .odt, etc.). This appears to be because the program thunar-archive-plugin contains a bug preventing this from happening. This might have been a conscious decision by someone, but I checked Fedora 33 XFCE spin, and it correctly allows "create archive" when you right click on a LibreOffice file.

If you right click on most other types of files (or folders) Xubuntu does display "create archive." So far I've only noticed the issue with LibreOffice documents.

While LibreOffice documents are a type of archive (if you right click and open them with Engrampa you'll see the various parts making up an .odt file) right clicking and choosing 'create archive' on a LibreOffice file in the Fedora 33 XFCE spin does work. I checked Linux Mint XFCE 20.1 and it has the same behaviour as Xubuntu (which makes sense since they probably share the same code base). I haven't checked Debian yet (wondering if someone running the latest version of Debian and has LibreOffice installed can confirm this on Debian?).

This has been fixed, but not in Xubuntu 20.04

There is a bug report on gitlab for this issue that was created about 1 year ago here (and a patch):


Since the source code isn't installed on the computers I'm trying to patch I thought I'd try cloning the thunar-archive-plugin repository and making the plugin (with the hope it would patch the issue on the Xubuntu system). Here are the steps I took (both git and build-essential are installed on the systems):

sudo apt install xfce4-dev-tools libthunarx-3-dev libexo-2-dev
git clone https://gitlab.xfce.org/thunar-plugins/thunar-archive-plugin.git
cd thunar-archive-plugin/
sudo make install

Make and make install appear to have worked, but the plugin still doesn't appear to show 'create archive' when I right click on an .odt file.

I looked into the thunar-archive-plugin directory and found that the config.log shows thunar-archive-plugin 0.4.0git-5a58aa0. This numbering appears to be older than the installed package:

dpkg -l | grep thunar-archive

Which shows 0.4.0-2. I'm guessing it's just Canonical's point release that's actually older. Does the version I compiled not overwrite the existing one? How can I tell? I know with apt I can look at /var/log/apt, but I compiled this from source.

Create an archive of LibreOffice documents (workaround)

Until Canonical fix this bug you can create archives of LibreOffice documents by creating a new archive using Engrampa, the archive program in Xubuntu 20.04, and adding the LibreOffice documents by dragging them to the newly created archive. By default Engrampa saves the archive in whatever extension you choose (supported types include: .7z, .ar, .a, .ear, .jar, .odp, .otp, .ods, .ots, .odt, .ott, .exe, .tar.7z, .tar.bz2, .tar.bz, .tbz, .tar.gz, .tgz, .tar.lzma, .tzma, .tar.xz, .txz, .tar, .war, .cbz, and .zip), normally this would be something like filename.zip. Once you've dragged the LibreOffice file to the newly created archive in Engrampa it will automatically be added to the archive (no need to save as).

The simplest method (command line)

I started with the graphical method above because I feel it's important that Xubuntu be as friendly to new users as possible. While some might argue that 'create archive' shouldn't be active for LibreOffice documents because they are archives, as someone who supports a lot of people without strong computer skills I disagree. Consistency matters. That said, given the thunar-archive-plugin bug the simplest way to create an archive is through the command line/terminal. Open a terminal session and type:

zip <archive>.zip <document>.odt

Substitute the name you want to give your archive for in archive.zip and the name of your document in document.odt. Of course your document needs to be in the same directory.