How can I associate files with same MIME but different extensions to different applications.
For example both .maff & .zip files have application/zip MIME ; But I need to open .maff by Firefox and .zip by ArchiveManager
Setting this via Open with dialog associates application to MIME that causes both files open with same application.
How can I configure this in Gnome?
I'm using Ubuntu Lucid Lynx.



4 Answers 4


I strove to make Firefoxmaff association only for one user (me). So I didn't touch files under /etc.

I did the following:

  1. Restore correct association between ZIP-files and archive manager (I did it within default file manager Nemo).

  2. Create definition of MIME type. In my case I created firefox-maff-my.xml file in ~/.local/share/mime/packages directory with the content provided below:

    <?xml version="1.0" encoding="UTF-8"?>
    <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
      <mime-type type="application/maff">
             <comment>Mozilla Archive Format</comment>
             <glob pattern="*.maff"/>
  3. Update MIME database

    update-mime-database ~/.local/share/mime/
  4. Edit ~/.local/share/applications/mimeapps.list. Add


    line right under [Default Applications].

  5. Log out, then log in.

In case of doubts you can make backup of each involved file before editing it. If something will go wrong you can revert everything you did (just restore original files, remove firefox-maff-my.xml and run update-mime-database ~/.local/share/mime/ again).

I've faced similar issue in Linux Mint 17.1 Cinnamon. Perhaps this also will work for GNOME (because both follow freedesktop.org).


As of 2016/Feb/20, this is the correct solution to associate MAFF files to Firefox (or any other files), without affecting the Compressed archive/ZIP association:

# run as sudo

echo '<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-maff">
<comment>Maff File</comment>
<glob pattern="*.maff"/>
</mime-info>' > /usr/share/mime/packages/maff.xml

update-mime-database /usr/share/mime

# now kill X or logout.

The assogiate solution is not valid anymore, as the package has been removed from the Ubuntu repositories after v14.04.

  • Thanks, this did the trick on 14.04! After following your instructions I just had to "Open with other application..." once to associate a MAFF file with Firefox. After that step, all MAFF files now open with Firefox on double-click, and plain zip files still open with my archive manager.
    – Pont
    Aug 31, 2016 at 15:09

I don't know what a .maff file is exactly, but you need to define a new MIME type for it. Application associations are based on MIME type and not file extension.

  • .maff is the "Mozilla Archive Format" that is used by a firefox extension that actually is a zip file like .jar files; How should I define a MIME for that? Thanks
    – Ariyan
    Dec 7, 2012 at 21:00

Simple way to do this is by using mimeopen command to open .maff file format using Firefox

Open terminal and type

mimeopen some_file_name.maff

You will be provided with available packages to open the .maff file

Please choose a default application for files of type application/zip

    1) Archive Manager  (file-roller)
    2) Archive Mounter  (mount-archive)
    3) Other...

select 3 from the option and enter the command as firefox

use application #3
use command: firefox

This will open up .maff file in Firefox and will be set as default program to open .maff file

  • 1
    #1: This only sets default application for mimeopen and not nautilus! #2 this still only relys on mime type so setting default application for .maff will sets that application for .zip too!!! (I tried and it did)
    – Ariyan
    Dec 7, 2012 at 22:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .