2

I'm on Xubuntu 12.04 and using Awesome WM. In Awesome session, If I double click a plain text file(txt, asc, rb, py etc.) in Thunar, it opens with Abi Word. But I want it to open with a text editor not a word processor. In Xubuntu/Xfce session, it does open with text editor(Leafpad). How could I fix it without setting it for various text files?

hrzhu
  • 776

5 Answers5

4

If you're using Xfce 4.10, then you can Settings > MIME Type Editor, then set text/plain to whatever text editor you want. I'm not sure if this will take care of all possible file extensions associated with plain text files, but my hunch is that it should help.

landroni
  • 6,011
2

On Ubuntu the default applications are set in /usr/share/applications/defaults.list (root access) and override by ~/.local/share/applications/mimeapps.list (user access).

I would suggest editing the second file unless you intend to make your change permanent on several sessions.

Jean
  • 151
1

Right click on a text file > Properties > Open With: > (whatever application you want)

or

Right click on a text file > Open With: > Open With Other Application... > (select and check "Use as default for this kind of file"

You use Awesome WM but I hope it is only a Thunar's affair, so the solution may be the above.

MakisH
  • 1,120
1

I couldn't find the default application in ~/.local/share/applications/mimeapps.list noted in other answers, instead mine was in ~/.config/mimeapps.list as indicated in this answer. Per the comments, there are also other possible locations.

Ben
  • 832
0

I haven't used Awesome WM and don't understand why you're seeing what you're seeing. To my mind, a window manager shouldn't cause changes to which application opens which file type (or file extension).

You also wrote (emphasis mine): "... If I double click a plain text file (txt, asc, rb, py, html etc.) in Thunar, it opens with AbiWord. But I want it to open with a text editor not a word processor. In Xubuntu/Xfce session, it does open with text editor (Leafpad). How could I fix it without setting it for various text files?"

To my mind, when most of us, irrespective of operating systems, double-click on an .html file, the file opens in our chosen browser and not in a text editor.


Anyway, one possibility is that your ~/.local/share/applications/mimeapps.list is corrupted. Make a backup of this file and then delete the existing one. Log out and log back in. The file you've deleted will be recreated and populated as you open files. If you wish, you can always revert to the previous mimeapps.list by deleting the current one and restoring the backup.