Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

When ever I open an xml file in Ubuntu it opens with Firefox, how do I change the file association to open with gedit instead?

share|improve this question
up vote 10 down vote accepted

Change this way

  1. Right click on a xml file
  2. Choose "Properties"
  3. Click on the "Open With" tab
  4. Choose your new default editor

If you still face the issue Please have look on this page :

(or )

Change the default "Open with" program for a file type

  • In Nautilus, right click on the file and choose Properties from the menu that appears. The Properties dialog opens.

  • Click on the Open With tab. A list of applications appears.

  • Select the default application you want for the file type. If the application is not on the list, use the Add button to add the application to the list.

share|improve this answer
source on the second half of your post, please – Tom Grochowicz Aug 3 '09 at 15:12
The second method worked for me in Ubuntu 13.10 – Halil Özgür Dec 2 '13 at 13:16

open the defaults.list file

sudo subl /usr/share/applications/defaults.list

and search for the xml extension:


and replace it for example for the sublime text editor or your choice



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.