Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

Currently Totem/Movie Player opens and plays any type of media files, be it audio or video - is there a way to change that run command?


I am already aware of properties option from right-click's context menu, but as I said, I want to change the run command for all items considered to be media files.

share|improve this question
up vote 3 down vote accepted
  • First Install Ubuntu Tweak from this site.

  • Launch it by searching for it from the dash .

  • Go to the System -> File Type Manager .

  • Select all formats of the category you want by pressing Ctrl + A .

  • Now click on the edit button and select the application you want to open the formats .

  • Done .
share|improve this answer
But of course! I completely forgot about Ubuntu Tweak! Thanks! – Oxwivi May 12 '11 at 12:04
Oh, and Ubuntu Tweak is not available in the Software Center, you either add PPA or download .deb file. – Oxwivi May 12 '11 at 12:07

A command to change file associations command style is mimeopen. This is an interaction though since it prompts for an answer while showing a list of possible options. Also this requires you to do this for every file association. There is not 1 command to change all media files to 1 application but you can work around this.

The users preferences are stored inside ~/.local/share/applications/mimeapps.list. The system wide file associations are stored in /usr/share/applications/defaults.list.

You can display all relations to video with this:

cat /usr/share/applications/defaults.list | grep video

You could use this to add all video references to the local version like so:

cat /usr/share/applications/defaults.list | grep video >> ~/.local/share/applications/mimeapps.list. (~/.local/share/applications/mimeapps.list probably has not got the right permission to change it so you will need to change it first).

After that you need to change all references in ~/.local/share/applications/mimeapps.list to =totem.desktop to ={yourprefferedapp}.dekstop. {yourprefferedapp} could be vlc or any other reference to a video playing utility.

(do not to forget to rest the permissions for ~/.local/share/applications/mimeapps.list (needs to be 755).

Same can be applied to 'audio' or any other file association.

Even so this still requires your system to have ALL media types present and I do not believe that is the case.

share|improve this answer

Right click on a file -> Properties -> Open With. There you can choose another default application for each media type.

share|improve this answer
ALL media files. – Oxwivi May 12 '11 at 8:21
@Oxwivi I do not think it is fair to -1 him when you are the one that did not mention this in your post. In chat you also asked for command line and I do not see you mentioning that in your post either. That does not mean Alautik's answer or user17392 answers are wrong. – Rinzwind May 12 '11 at 8:57
@Rinzwind, yes, I might have been unfair about it, but I was a little moody at that moment - I cannot change it since it's already been three hours. And about command line, I did not imply I will not use solutions anything other than commands. – Oxwivi May 12 '11 at 12:03

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.