Ubuntu: How to set default program?


Can anyone help me on how to set the default program that I use? I have tried to open System Info --> Default Program -> change my program, but it won't work, Any idea? Or should I use the Terminal?

I want to replace the default movie player with VLC Media Player because the current movie player is useless to me.


There's yet another GUI solution, which might come handy for you ;)

Try opening the properties (right click -> Properties) of the file type you want to be always played by VLC.

Choose the Open with tab and either choose from a list or add one (by choosing from an extended program list or simply typing vlc as the command)


... and click on Set as default

enter image description here


If you're really desperate, just manually edit the file ~/.local/share/applications/mimeapps.list.



Just add this under the [Default Applications] section if you want it to be default, or under [Added Associations] if it shouldn't be default.


Use Ubuntu Tweak - it has a file association manager and you can choose which programs open which file types.

Instructions are on this site http://www.omgubuntu.co.uk/2011/12/new-version-of-ubuntu-tweak-released/

Best way to install is:

sudo add-apt-repository ppa:tualatrix/ppa  sudo apt-get update  sudo apt-get install ubuntu-tweak  

EDIT In newer versions of Ubuntu, follow Paulius's answer, the option has been added to the Properties -> Open With screen.


1. Choice number one: Open a terminal where your file is and do the folloing command

mimeopen -d your_video.avi  

there is the output:

Please choose a default application for files of type application/x-ms-dos-executable      1) vlc      2) ...      3) Other...  use application #3  use command: vlc %f  

Press 1 if you see vlc, if not, chose the Other solution (3 in that case) Then type the name of your application followed by %f.

2. Choise 2: Generic way

mimeopen .avi  

and then do the step above.


I was having a similar problem with PDFs; I had installed Adobe Reader, but I couldn't get it to open them as the default application - it didn't even show up on the lists!

I checked the mimeapps.list file listed above, and it was already listed as default there.

This is what worked for me finally:

  • I right clicked on a PDF and chose "Properties." I opened the "Open with" tab.
  • Still no Adobe Reader.
  • Clicking on the "Reset" button made Adobe appear as the default, and now it works.

I guess that "Reset" was necessary after the (rather inconventional) installation to register it as the default program.


Here's how I did it without using the Ubuntu Tweak tool. My guide includes file type associations, so that your app will be listed in the "Recommended Applications" when right-clicking the file to see the properties. Guide as follows (I'm using 13.10 Saucy):

When you see a command, run it in terminal, of course :)

  1. cd /usr/share/applications/

  2. cp similar_program.desktop name_of_your_program.desktop

  3. gedit name_of_your_program.desktop

    • leave the [Desktop Entry] as the top line
    • modify the type (unless it's the same)
    • modify the name (can have spaces)
    • if you want to add support for the name in other languages just add a new line that says for instance:

      Name[es]=PlayonLinux Cargador de programas de Windows  
    • modify the Exec (should just say yourprogram %f as long as it's a default install with the program in /usr/bin)

    • modify the MimeType (unless it's the same)
    • modify the Icon (again, if it's a default program installed to (/usr/bin) this should just say Icon=name_ of_your_program
    • NoDisplay=true
    • StartupNotify=true
  4. sudo gedit ~/.local/share/applications/mimeapps.list

    In my instance I wanted to add PlayonLinux to select as a program to open .exe files, instead of always using WINE. But I wanted Wine to show up too.

    In this case, you can leave the top section [Default Applications] alone. Then find the line under [Added Associations], and change it from, in my instance




    This way they both options will show up when I try to load a Windows .exe file.

If you right-click the properties on the file, and for instance say I eventually do want to make PlayonLinux the default for Windows .exe files, all I need to do is tell it to be set as default. And it will change. You can check the mimeapps.list ( ~/.local/share/applications/mimeapps.list ) to double-check and you'll now see it will have replaced WINE under [Default Applications].


If the System Info > Default Program doesn't work, then you could try right clicking on whatever video/movie file you want to play, then click Open With, and then select VLC.

If you want further details, this may help you: http://www.johannes-eva.net/change-the-default-application-ubuntu-linux


For Dolphin (KDE), right click the file to get a Properties window. Under Type is a button for File Type Options, where you can modify filename extensions. Add the application if it's not in the bottom list. To make it default, move the application you want to the top of the Application Preference Order list.

Screenshot from a more detailed guide:

enter image description here


System Settings -> Details -> Default Applications

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »