LO insists on opening text file with Calc

Hi,

There’s a .txt file that I want opened in Writer, but – as mentioned in the Subject – LO refuses to do so. How can I force Writer to open it?

What is your operating system, LO version, and what does the text file contain i.e., delimited content, HTML? A plain TXT file should open in Writer rather than Calc, even if via the right-click context menu.

Duh, sorry.
LO 4.1.2 on Xubuntu 13.04
The file contains a text that can easily be interpreted as numbers delimited by spaces.

What does $ file -bi <your_file.txt> return? It should show text/plain; charset=us-ascii but if it shows something else then the file may be getting interpreted as something other than text. If it does show “text/plain” then run this command:

$ xdg-mime query default text/plain

That will indicate the default application associated with that particular MIME type. You can change it by executing:

$ xdg-mime default writer.desktop text/plain

Do not do this as root.

$ file -bi x.txt
text/plain; charset=us-ascii

$ xdg-mime query default text/plain
mousepad.desktop

The file is the output from the command:
$ cal 2014 > x.txt

mousepad.desktop? That seems odd. Did the second command fix it? Right-click and selecting Writer certain opens up that type of text file under Crunchbang 11 here OK.

I run Xubuntu, so Mousepad is the default text editor. No, I haven’t tried that solution, because I still want mousepad to be the default text editor.

My question is, “How do I tell LO to open this text file with Writer instead of Calc?”