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

I've built an application I want to release however I would like the files to open with the application.

I have modified the .desktop file accordingly, however quickly seems to have no option for MIME files and I don't have a clue how to add them.

(Also, I'm not sure if this belongs here, because it's a developer question but Quickly was made by Ubuntu)

share|improve this question
up vote 4 down vote accepted

You can add mime types to a system by using xdg-mime.

command line tool for querying information about file type handling and adding 
descriptions for new file types

Command to add a new mime type:
xdg-mime install [--mode mode] [--novendor] mimetypes-file

From the man page:

mode: can be user or system; for system you need root permissions.
install: Adds the file type descriptions provided in mimetypes-file to the
desktop environment.  mimetypes-file must be a XML file that
follows the Shared MIME-info Database specification
and that has a mime-info element as its document root. For each new
file type one or more icons with name type-subtype must be
installed with the xdg-icon-resource command in the mimetypes
context. For example the filetype
application/vnd.oasis.opendocument.text requires an icon named
application-vnd.oasis.opendocument.text to be installed (unless the
file type recommends another icon name).

Alternatively you could use the ubuntu wiki on mime types. This uses manual instructions to edit in this text

gksudo gedit /etc/mime.types

and to edit it something like

text/extension extension

This editing of /etc/mime.types can also be accomplished with the command line stream line editor sed but I would suggest using xdg-mime.

share|improve this answer
Thanks, I also found some more information for packages data_files=[('/usr/share/mime/packages', ['one-click-installer.xml'])], is added to the – Joe Simpson May 30 '11 at 15:50

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.