Changing default applications

In Ubuntu 8.04 it’s surprisingly hard to change default applications to something of your liking.

Sure you can right-click a mp3 file and set it to be open with the player of your choice, but that’s not enough.

What if you want dvd’s to be opened with vlc instead of totem? What if you want cd’s to be opened with exaile instead of rythmbox? If you search for files mp3’s get opened with totem,  … all these things can’t be changed with the provided GUI nor with “gconf-editor”.

I hope this will be “fixed” in the next Ubuntu release this October.

It’s been said that Ubuntu and Gnome tend to simplify things, and most of the time this is a good thing, just not this time.

The “preferred application” dialog is too basic and pretty useless, they should be able to do better in the next release.

I’m pointing out the obvious by saying Ubuntu is still Linux, and you can pretty much change every behavior the OS has as default.

Enough ranting, let’s see how to do it.

You’ll need to fire up the terminal (Applications -> Accessories) and copy/paste this code

gksudo gedit /etc/gnome/defaults.list

A prompt will ask for your password.

Gedit (a text editor) will open and you’ll see a lot of lines.

If you want to change what types of files should be opened with a application you prefer, look for these lines:


I haven’t actually done this, but it should be as easy as replacing “ooo-calc” with the program you prefer. Let’s say you like gnumeric better, the line should read like this


The same logic can be applied to all other lines as well.

I’ll give some other examples (that I did test).

Letting a dvd open with vlc by default.

Change this line:


to this


Let a mp3 file open with exaile (also when you search for them, …)

Change this line:




Open a cd with exaile by default

Change this line


to this


After you saved that file, go to “system -> preferences -> main menu”, expand sound and video, and on right side right click on vlc -> properties. Change the launcher command to

vlc %m

I don’t know exactly why this is needed (if you know, leave a comment) but exaile didn’t have %U after it and I didn’t put %m after it and it still worked.

It could be that this is needed for some programs.


  1. Thank you. I also hope that they will make it more accessibly in the next version of Ubuntu 🙂

    • chvnx
    • June 2nd, 2008

    Thanks a lot. This was rather useful.


    • Angelo
    • June 14th, 2008

    im not agree with your guide mate, you make it too difficult, just go to an mp3 application (for example) and go on properties, than you’ll have to go on Open with TAB and it will make you choose forever how to open the filetype

    beware: what i said its not just a “open with”

    ps: i did the same to my external hd to change permission by root owner to my principal user.

    this ubuntu seems to be much easier than normal, so that it was a little difficult to figure out how stupid settings are going to be done.

    cya mate, nice blog

      • Lukasz
      • April 11th, 2011

      THANK YOU.. exactly what I needed!

  2. Eh?

    Why don’t you just go into preferences in Nautilus and select the right most Tab and then you can set default programs for Camera/DVD/etc.

    • linuxowns
    • June 19th, 2008

    Because the preferences in nautilus are waaay to limited and don’t work properly.

    The mp3 and dvd instructions were just so people would know how to change things.

    There are hundreds of file types you can set default programs for.

  3. @angelo: you don’t understand what he is trying to fix. read up.

    @the author: has this actually worked for you?
    I am experiencing problems with Firefox 3 (in Ubuntu8.04). When double clicking on a PDF in the Downloads window (after it has been downloaded) it automatically opens in evince.
    The funny thing is that my mime.types file and default.lists file already contain the AdobeReader.desktop section for application/pdf, so everything should be ok. The command xdg-mime query default application/pdf confirms it when outputting “/opt/Adobe/Reader8/Resource/Support/AdobeReader.desktop”. Don’t know of anything else I can do…

    As to you solution, it could be improved somewhat. You are changing this on a system wide basis, which really isn’t necessary. You also have per-user versions of the defaults.list file in .local/share/applications/defaults.list. Just the same. And strictly speaking you should use the xdg-mime command to change the settings. That way they will work in both KDE and Gnome (which that tool takes care of).

    But since (in my case) Firefox doesn’t respect these settings it really doesn’t matter …

    • linuxowns
    • August 25th, 2008

    @ Carl-Erik:

    Yes it worked for me.

    Well, the ones I tried.

    You have a point about the system wide settings.

    About the xdg-mime, I didn’t know that.


    • kmiernik
    • February 3rd, 2009

    I belive you could do all this using GUI. Just go to Nautilus:
    Edit -> Preferences -> Media (tab)

    Now you can choose some default options (like Totem, Rythmbox and so on) or use “Open With other application” (to choose your favorite one) or go for even a “Custom command” to do more complex stuff.

    • s2n6
    • April 24th, 2009

    Using jaunty, tried to link pdf’s to acrobat reader instead of evince:

    – right click a pdf file
    – select ‘properties’
    – open ‘open with’ tab
    – select adobe acrobat

    from now on all pdf’s are opened with my preferred application. Guess this works the same for other applications/formats. Not sure if this is jaunty specific.

  4. The Samsung 50 Inch HDMI is one of the hottest gifts this Christmas, they’re selling out fast. I found mine at

  5. I encounterd hard time reading your blog with safari browser, you would better update your blog

    • msrdo20
    • September 24th, 2010

    Perfect Guide. Incredibly helpful. I wish that I had found this an hour ago. Thank you.

  6. I wish I’d have noticed your post earlier. I hat to figure it out by myself… but my solution is very near to yours:

    How to change default programs on Ubuntu

    Hope it makes it easier!

  7. An outstanding share! I have just forwarded this onto a
    colleague who was conducting a little research on this.
    And he actuaslly bought me dinner due to the
    fact that I found it forr him… lol. So llet me reword this….
    Thanks for the meal!! Buut yeah, thanx for spending time to talk
    about thius matter here on your web site.

  8. wonderful insight. Really enjoyed reading this blog.
    Keep up the good work and to everyone keep on tweeting!

    • Clark Devalk
    • March 31st, 2018

    This site is just gret. I’ve ask these info a whole lot and I realised that is good written, easy to understand.
    I congratulate you because of this article that I’ll recommend to prospects around.
    I request you to recommend the site where each pupil or
    scholar can find results gpa rating. Success!

  1. June 1st, 2008
    Trackback from : Sacada… « Expressionando
  2. June 5th, 2008
  3. June 26th, 2008

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: