default application to open text file in Thunar under Awesome WM

10,265

Solution 1

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.

Solution 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.

Solution 3

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.

Solution 4

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.

Share:
10,265

Related videos on Youtube

hrzhu
Author by

hrzhu

Updated on September 18, 2022

Comments

  • hrzhu
    hrzhu over 1 year

    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
    hrzhu about 11 years
    Thanks for your quick response, @MakisH. This works but I have to setting up for all types of text file which is unreasonable. Since it works as I expected in Xfce session, I guess there is something wrong that I'm not aware of.
  • hrzhu
    hrzhu about 11 years
    It's fine with html file, it opens in Firefox. But most other text files ain't. txt files should open with editor, py/rb file(w/o +x permission) should also open with editor. But they all open with Abi Word. The problem doesn't exist if I log into Xfce. I've had no luck with the mimeapps.list file, I move it to mimeapps.list.bak and then re-log, the problem remains and no new mimeapps.list appears.
  • hrzhu
    hrzhu over 10 years
    Thanks for your answer. In MIME Type Editor, I see text/x-python is set to open with text editor, but anyhow when I'm in awesome session it still opens with abiword. I don't remember how and when I mess this up. I don't have the same problem with my laptop running the same software. Anyway, I'll just bear with it. I'm a terminal guy so the problem doesn't bother me very often and I plan to reinstall Xubuntu when next LTS is released.