OnlyOffice and Gthumb not associated as default application

Manjaro ships with OnlyOffice DesktopEditors and I think that is a very nice office suite. For most people, it does everything you need. However, I do need LibreOffice available as backup, not as default associated suite.
Unfortunately, After installing LibreOffice Fresh (via pacman or pamac), LibreOffice automatically becomes the default for most Office files. That was not my goal.

To make sure OnlyOffice is the default again for all filetypes supported by OnlyOffice, I uninstalled OnlyOffice, then installed it again.
Even after reinstalling OnlyOffice DesktopEditors, it is still not the default application! It is second to LibreOffice in /usr/share/applications/mimeinfo.cache.

I did the same for gThumb, after installing GIMP, GIMP steals the default system file associations and the only way to fix this is manually for current user (via xdg-mime) or manually per file via context menu.
Even if I pamac remove gthumb and pamac install gthumb, GIMP stays associated as default!

I know I can manually (via context menu) change the default app. But I don’t want to do that for each and every filetype. That is A LOT of manual work. I also know I can run

xdg-mime default onlyoffice.desktopeditors text/rtf

for every filetype. Again, enormous hassle to figure out all mimetypes. Also this would only apply to the current user.

I filed a bug with OnlyOffice, but they say the pamac package is not an official package:
OnlyOffice does not assiociate itself as the primary office app · Issue #879 · ONLYOFFICE/DesktopEditors · GitHub but then I saw it is also happening for Gthumb!

Is this something the package maintainer: Software Center can solve?

unrelated issue with xdg-mime (solved after initial post)

The xdg-mime command together with update-desktop-database ~/.local/share/applications/ has no effect, for example

xdg-mime default onlyoffice.desktopeditors.desktop text/rtf

It does add entries to $HOME/.config/mimeapps.list but nothing changes.
EDIT: I missed “org.” The xdg-mime command does work correctly.

Can you post the ~/.config/mimeapps.list file content?

Hi Omano, I should not have made that point, I prefer to focus this topic on the actual issue instead of my failing attempts to workaround.

The actual issue is with the Manjaro package not properly associating OnlyOffice during pamac or pacman installation. @Yochanan could you have a look at the above? Because OnlyOffice maintainers point me to the Manjaro package maintainer:
OnlyOffice does not assiociate itself as the primary office app · Issue #879 · ONLYOFFICE/DesktopEditors · GitHub

Regarding the workaround, I looked up each and every mimetype associated with OnlyOffice in /usr/share/applications/mimeinfo.cache, copied it to a file and turned each into xdg-mime default commands. I just had to use org.onlyoffice.desktopeditors.desktop instead of onlyoffice.desktopeditors.desktop. The resulting ~/.config/mimeapps.list.

But it took a lot of time gathering all those mime types. Obviously, it should not be this hard to associate OnlyOffice and gThumb as the default office suite or default image viewer when you have another office suite already running.

According to the OnlyOffice dev that replied via the Github link I shared, associations work properly for the Ubuntu package that they maintain themselves.

OK have fun troubleshooting, no help for you. It could have been a great help even if you think not.

Huh, I don’t understand how my reply could have possibly offended you?
I confirmed the workaround works. You have seen the effort I made to create this workaround (searching for each line in mimeinfo.cache that contains OnlyOffice and copying each mimetype!), clearly I forgot “org.”. So that works.

Then I get a reply from OnlyOffice maintainer on GitHub, who says I should contact the Manjaro package maintainer.

I don’t understand your expectations. What is left to troubleshoot here? We have 1) confirmation the issue is not with OnlyOffice and Manjaro-specific (see the GitHub reply) and 2) me finding, fixing and confirming my mistake with regards to xdg-mime.

Why should I be offended? You refuse to answer, I’m telling you how it is. That’s all.

I answered that via mimeapps.list, the file you requested, it works. I have updated my 2nd post, included a link to the file (it is a bit long) to answer your question.

That’s not for that I ask for this file. But as said, no help for you now :).

That is exactly what you asked. Why are you spamming this forum? Please go do something useful.

keyword.

From the PKGBUILD, it seems the desktop file correctly lists the MimeType: org.onlyoffice.desktopeditors.desktop · master · Packages / Community / onlyoffice-desktopeditors · GitLab

The mimetypes in our package are now identical to the Debian package. We were only missing x-scheme-handler/oo-office;text/docxf;text/oform; at the end.

-MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;text/spreadsheet;application/csv;application/excel;application/x-excel;application/x-msexcel;application/x-ms-excel;text/comma-separated-values;text/tab-separated-values;text/x-comma-separated-values;text/x-csv;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.slide;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;
+MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;text/rtf;application/vnd.wordperfect;application/wordperfect;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-word.document.macroenabled.12;application/vnd.openxmlformats-officedocument.wordprocessingml.template;application/vnd.ms-word.template.macroenabled.12;application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/msexcel;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel.sheet.macroenabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.template;application/vnd.ms-excel.template.macroenabled.12;application/vnd.ms-excel.sheet.binary.macroenabled.12;text/csv;text/spreadsheet;application/csv;application/excel;application/x-excel;application/x-msexcel;application/x-ms-excel;text/comma-separated-values;text/tab-separated-values;text/x-comma-separated-values;text/x-csv;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/mspowerpoint;application/vnd.ms-powerpoint;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint.presentation.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.template;application/vnd.ms-powerpoint.template.macroenabled.12;application/vnd.openxmlformats-officedocument.presentationml.slide;application/vnd.openxmlformats-officedocument.presentationml.slideshow;application/vnd.ms-powerpoint.slideshow.macroEnabled.12;x-scheme-handler/oo-office;text/docxf;text/oform;

onlyoffice-desktopeditors 7.0.1-2 will be coming along shortly.

Thanks!

Does this mean the issue is elsewhere?
Why is LibreOffice capable of setting itself as the first application in mimeinfo.cache, but OnlyOffice is not?

There doesn’t seem to be any documented mechanism how to do that, yet both GIMP, DarkTable and LibreOffice always set themselves as the very first application, even if you install for example GThumb and OnlyOffice afterwards, GIMP, DarkTable and LibreOffice remain the first application.

How is that possible?