How to fix file association in Ubuntu?

I’ve just recently installed Libreoffice 4.4.5 in my laptop (running Ubuntu 14.04.2).

The application is running well. However, it does not automatically open related files (.odt, .doc, .xls, etc.). Manual fix is to open the file with the appropriate Libreoffice application, right? That works.

However, now I notice that everytime I open a document of the same file extension (e.g. .odt), it will open first the first file I manually opened through the said method. It seems like the file extension has been associated to that first document, not the actual application used to open documents of that type.

Ex: I found that essay.odt does not open with LO Writer. So I did the manual method. It opened.
I wanted to open essay2.odt. After double-clicking the file, essay.odt opens first, then essay2.odt.

Also, I don’t want to do this to all document file types. So how do I properly fix the file associations?

EDIT:

So I did a purge, then removal of a file in ~/.local/share/applications, and the first problem doesn’t seem to come up anymore.

However, I still have a problem with the file type association, i.e. I still have to manually assign each file type to the appropriate LO program. The question still stands: how do I fix this? (Or is there a way to fix the all related associations automatically?)

Hi yorro

AFAIK this is OS-specific rather than LO-specific.

Here is a link that should help:

If this helps then please tick the answer (:heavy_check_mark:)

…and/or show you like it with an uptick ()