3

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.

  • 1
    If there's no other way, maybe set up a VM with Kubuntu 19.04 minimal install option (so no office suite pre-installed) and install and use FreeOffice exclusively in the VM? – DK Bose Sep 23 '19 at 12:33
  • @DKBose I will consider that, if nothing with less overhead comes up. Thank you. – Bruni Sep 23 '19 at 12:37
  • I have the same Issue. Solution 1. : Right click → Select : Open with other → select LibreOfficeWriter ... and tick "Remember ..." . ( Works with some OS / KDE, not tested with Kubuntu 19.04 ) – Knud Larsen Sep 23 '19 at 13:06
  • Solution 2. : I once ( many years ago ) edited the MIME settings when using SoftMaker / FreeOffice. Don't remember how, will answer if I find the solution. – Knud Larsen Sep 23 '19 at 13:12
  • @KnudLarsen Solution 1, actually works on KDE too. Though I must confess I secretly hoped for something scriptable, so I do not need to do this for each MIME type (usually realizing the need to "open with" after the doubleclick". – Bruni Sep 23 '19 at 14:00
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
  • Thank you, this sounds very much, like what I was searching for. Two small questions: 1. If I wanted to just delete the Freeoffice file associations, would 'sed -i -e 's/textmaker-free18/libreoffice-writer/g' ~/.config/mimeapps.list' suffice? 2. How to make plasma aware of these changes without restarting? – Bruni Sep 24 '19 at 7:03
  • @Bruni 1. This would only change the TextMaker associations. If you want to change the associations for PlanMaker and Presentations too, you have to use the full command or you can do it with separate sed commands for each program. 2. In Xubuntu the changes are applied right away. No need for restarting. I'm pretty sure that the same goes for Plasma. – BeastOfCaerbannog Sep 24 '19 at 8:18
  • Regarding the first point, I intended this only as an example, but point taken..Regarding the second. Indeed, this is also the case in KDE. However, could you please clarify in your answer that at least for KDE both files (/usr/share/applications/defaults.list and ~/.config/mimeapps.list) must be modified. Thank you! – Bruni Sep 24 '19 at 9:26
1

SoftMaker FreeOffice :

Solution 1. : Right click the file to open → Select : Open with other → select LibreOfficeWriter ... and tick "Remember ..." .

( 2.) Example files, SoftMaker Office ( A 2016 version )

/usr/share/applications/defaults.list  // all lines are textmaker, planmaker etc. SoftMaker Office
/usr/share/office2016/mime/{softmaker-office-2016.mime, etc.}
/home/name/.softmaker/{files}
/home/name/.config/mimeapps.list  // no textmaker, planmaker etc. SoftMaker Office

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.