
How to change the default application for a type of file on Linux
Last updated on October 10, 2022
This howto explains how to change the default program to open all files with a given extension on Linux Mint, Ubuntu, Debian, and most Linux distributions. It also details how to change the default application for a batch of filetypes, for example all audio files or all video files.
Set the default program for a given filetype
1. In Nemo / Nautilus / Caja, right-click on any file with the desired file type or extension, choose “Properties” from the context menu.
2. The “Properties” dialog appears. Click on the “Open With” tab.
3. Select the desired application for the given filetype. All files with the same extension will now be opened with this program by default.

On Linux Mint, replace step one and two choosing “Open With” → “Other Application…” in the contextual menu, as seen in the picture above.
Change the default app for multiple filetypes
Changing the default application for one type of file is really easy, while changing a batch of file type associations reveals a little clumsier, but extremely efficient.
These instructions should work with a large spectrum of Linux flavours, please share your experience with your favorite distribution in the comments.
Associate all audio and video files to VLC instead of Totem media player (Movie Player)
Video files: .avi .mp4 .mpg .ogv .ogm .mkv .wmv etc. Audo files: .mp3 .ogg .flac .wav .wma etc.
Open defaults.list with gedit:gksudo gedit /usr/share/applications/defaults.list
And replace all occurrences of totem with banshee/rythmbox/vlc or the media player of your choice. (Search → Replace → Replace All)

Save the modified file, and you’re done! Change are effective immediately.
Associate all office documents to LibreOffice instead of OpenOffice.org or Abiword
Office files: .odt .ods. .doc .docx .xls .xlsx etc.
Open defaults.list with gedit:gksudo gedit /usr/share/applications/defaults.list
And replace all occurences of “openoffice.org” with “libreoffice”. (Search → Replace → Replace All)
Finally, save the file. No need to restart, you’re all set!
Other file associations
Use the same technique to change the default application for all kind of file types or extensions, for example:
- all pictures (.jpg, .png, .gif, etc.) should open up with gThumb instead of EOG/Eye of Gnome/Image Viewer
- all html documents should open with Firefox instead of Chrome
- all pdf files should open with Adobe Reader instead of Evince/Document Viewer.
Different solution for some Ubuntu versions
For an obscure reason, changing the file associations directly in the defaults.list doesn’t seem to work on some Ubuntu versions. Nevertheless, importing information to the the mimeapps.list works.
The file associations for each user are stored in:~/.local/share/applications/mimeapps.list
In Ubuntu this file is almost empty. Let’s import informations from /usr/share/applications/defaults.list
Display all the video MIME types / Media types associations with this command:cat /usr/share/applications/defaults.list | grep video
Append all the lines containing video types to the local file:cat /usr/share/applications/defaults.list | grep video >> ~/.local/share/applications/mimeapps.list
Open defaults.list with gedit:gedit ~/.local/share/applications/mimeapps.list
And replace all occurrences of totem with vlc (Search → Replace…) Proceed similarly for audio files if needed. Unlike the standard method described at the beginning of this article, this method permits to assign a separate program to audio or to video files.
By Johannes Eva, January 2011 – October 2022
This article has been linked on LXer.com, Linux Today and some more…
5 thoughts on “How to edit image metadata on Linux using a graphical user interface”
fotoxx lets you change Metadata info, and choose your current image’s Caption and Comment as well as view images in directories with filename and some other Metadata as labels. You can set up trees of tags with Categories and put those in at the same time, to use for sorting the images into “album” groups for moving or copying out. The code is gtk and perl with many filetype handlers. Your labeling is stored in plain text files, easy to copy out into documents, transfer, edit, etc.
You should give some additional details, some tools write directly into the image file, others don’t. For example darktable does not change the original image, it writes into a sidecar file (.XMP).
You might also consider http://fastphototagger.sourceforge.net/, java based
I don’t know whether you actually tested Gthumb or not, but your statement that it is only capable of reading meta tags, couldn’t be further from the truth. And it seems to do a fairly good while it is at it!
All one have do is to press the ‘T’ key – either under the Thumbnail view or the “larger” view – and voilá: it reads any existing tags already embedded in the selected file. Next, you have to keep typing any new ones (just don’t forget to confirm, via the pull down list, to actually create any new tags) and you’re done.
I would also suggest that MaPiVi is an excellent program which needs to be on this list. It’s capable of editing and bulk-editing many kinds of image metadata, including IPTC Keywords (which is why I got it). It’s written in Perl/TK so it’s cross-platform. A somewhat old version of it is included in the Ubuntu Linux distribution.
One of the main drawbacks of MaPiVi is that it won’t handle the metadata in Nikon .NEF (raw) format files, which is pretty much the same as that in other formats such as JPEG.
Comments are closed.