I have strange behaviour on my Xubuntu installation when opening text files from the File manager by double click.

Many text files with the extension .txt from a SMB share do not react on a double click. Same if I copy them to a local drive. When I create a new file in the file manager and name it "text.txt" it will open upon double click.

I found many posts about defining the default editor in /use/share/application/defaults.list or .local/share/application/with some override settings and references to the MIME Editor. I tried them and all have text/plain set to gedit which is what I need.

I can not understand why it just does not work with all text files. I can not rule out that the affected files have been created in Windows.

Any ideas what is causing that and how I can fix that? Currently workaround is to open every file with right mouse click and select gedit manually from 'Open with Other Application...'.

In case it matters, I am using Xubunut/xfce 16.04. I have the same with Thunar and Nemo file managers

Added info: I copied a non working text file to my local drive, opened it with "Open with Other Application.." and edited it a bit with gedit and saved it again. I wanted to make sure the format is a valid gedit writable format. I got no errors. Still the file does not open by double click.

  • have you tried right click ---> open with other then select gedit and check make default?
    – ravery
    Jul 19, 2017 at 10:10
  • yes, first thing I did. My issue is that it works only for some files, for other not.
    – CatMan
    Jul 19, 2017 at 10:12
  • When you make it default of some file, then all files of the same type will have the new default as well. Other types won't. Repeat as much you need to make it default for all file types you want.
    – user692175
    Jul 23, 2017 at 21:47
  • @MichaelBay Sorry I was unclear. Example: I made ".txt" default to open with gedit. As a result I have some .txt text files that open with gedit and at the same time I have other .txt text files that do nothing. That means I double click on them and nothing happens. I need to right click them, select "open with another application" and select gedit to open them. Only then they display fine and show no artifacts. My issue is that I do not understand why those 2 files are not handled the same way. I can not tell any difference between those (except that of course they contain different texts).
    – CatMan
    Jul 24, 2017 at 10:01

1 Answer 1


Same issue with Mint Mate 18.1, text files created on this computer open normally with a double click. Text files copied from another computer when double clicked do nothing. Only way I've found to make it work right is to do a save as to the desktop, then overwrite the old file with the new one.

  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review Aug 3, 2017 at 9:37
  • @Henning Kockerbeck I can not see why it would not qualify as an answer. It gives a workaround to the same issue - even when on another distro.
    – CatMan
    Aug 3, 2017 at 10:52
  • @Scott Good idea, but unfortunately it does not work in my case. I opened the file without double click in gedit and saved it from there with the same name. Gave me the same result.
    – CatMan
    Aug 3, 2017 at 10:52
  • @Scott Correction, your suggestion does work as work around, indeed. However, it requires that I save the file under a temorary name, delete the old file and change the temp name to the original one. Checked with gedit. So I give that an up vote as a valid workaround, but I hope there is a better way. I have no idea why the above procedure works and save as with the same name and saying 'OK' to replace file does not.
    – CatMan
    Aug 3, 2017 at 11:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .