Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 2632  / 1 Year ago, wed, may 31, 2023, 12:32:12

I have installed a closed source office suite called Freeoffice. Generally, I use Libreoffice for all my work and need Freeoffice only as a backup to check if there are any inconsistencies in formatting when i need to edit collaborative docx documents and send them to MSOffice using clients.



My problem is, that each time I update Freeoffice it sets itself as the default application for all office related document formats. I then have to manually change each of them, which I often forget as there is a ton of related Mime types.



Is there a way to find all MimeTypes that are associated with Freeoffice and decrease its rank, so that it is no longer the default?



PS: I use Kubuntu 19.04 and am in search of a KDE solution.


More From » kubuntu

 Answers
4

FreeOffice sets its file associations in ~/.config/mimeapps.list (also in /usr/share/applications/defaults.list but they get overriden by ~/.config/mimeapps.list).



You can use the following sed command to replace the FreeOffice entries with the respective LibreOffice ones in ~/.config/mimeapps.list:



sed -i -e 's/textmaker-free18/libreoffice-writer/g' -e 's/planmaker-free18/libreoffice-calc/g' -e 's/presentations-free18/libreoffice-impress/g' ~/.config/mimeapps.list


The above apply to all Ubuntu desktop environments, not only KDE.






Edit



In OP's case ~/.config/mimeapps.list does not override /usr/share/applications/defaults.list. In this case one has to run the same sed command for the /usr/share/applications/defaults.list file:



sed -i -e 's/textmaker-free18/libreoffice-writer/g' -e 's/planmaker-free18/libreoffice-calc/g' -e 's/presentations-free18/libreoffice-impress/g' /usr/share/applications/defaults.list

[#4875] Wednesday, May 31, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rialhirt

Total Points: 422
Total Questions: 113
Total Answers: 120

Location: France
Member since Sun, May 15, 2022
2 Years ago
;