Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having a huge problem. Whenever i try to open a file gedit tries to open it. For example I download something with firefox, i click on the file to open it and gedit opens! Even in when I want to open a non-java file(images,pdfs,..) from my Eclipse explorer it gedit tries to open. More strangely, whenever, i try to open my home folder or any other folders such as Music, pictures,... from menu it happens! Can someone help me? Thx

share|improve this question

You might need to look in your nautilus and tell it on what to do to an executable file.

Open Nautilus -> Edit -> Preferences -> Behaviour -> Executable Text Files.

Files might not have default application when opening it.

Right Click on the file -> Properties -> Open with.

Set a default application of that file. If gedit is already selected and you want to change it just go over with your desired application.

share|improve this answer
didn't help. gedit still opens my home folder! – Hossein May 14 '12 at 7:36

Have a look at the contents of mimeapps.list with:

more ~/.local/share/applications/mimeapps.list

Somewhere in there you will have a settings that says it should open folders or specific files with gedit.

The heading with [default application] can be used to create a new/default mimeapps.list:

[Default Applications]

[Added Associations]
share|improve this answer

On Linux for some reason Firefox doesn't recognize real mimetype of binary files and treats them all as application/octet-stream. And it opens this mimetype (and thus .pdf, .doc and other files) in a default text editor - Gedit in my case. After long googling and messing with Linux and Firefox config files it turned out that the fix is to delete a line beginning with application/octet-stream in mimeapps.list.

On openSUSE 13.2 mimeapps.list was in ~/.config , but on some distros it's in ~/.local/share/applications/ or perhaps in some other place.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.