5

I am Installing Qt 5 on Ubuntu 14.04 using this link.

But, I am stuck to create Qt-Creator.desktop file. Document instructs that "open file mimeapps.list and check if the following line is present".

application/vnd.nokia.qt.qmakeprofile=qtcreator.desktop

But I can not find the mimeapps.list under the application folder.

So, Where I find mimeapps.list?

Please help me.

Thanks in advance.

5

It should be in below directory:

/usr/share/applications/mimeapps.list

If its not be exists, you can create it, and put that line into this file:

sudo nano /usr/share/applications/mimeapps.list

Also you can create this file in your home directory:

nano ~/.local/share/applications/mimeapps.list

And put this line into that file:

application/vnd.nokia.qt.qmakeprofile=qtcreator.desktop

For example my mimeapps.list file content is:

$ cat /usr/share/applications/mimeapps.list
[Default Applications]
application/wps-office.et=/usr/share//applications/wps-office-et.desktop
application/wps-office.ett=/usr/share//applications/wps-office-et.desktop
application/wps-office.xls=/usr/share//applications/wps-office-et.desktop
application/wps-office.xlt=/usr/share//applications/wps-office-et.desktop
application/vnd.ms-excel=/usr/share//applications/wps-office-et.desktop
application/msexcel=/usr/share//applications/wps-office-et.desktop
application/wps-office.xlsx=/usr/share//applications/wps-office-et.desktop
application/wps-office.xltx=/usr/share//applications/wps-office-et.desktop
vnd.ms-excel.sheet.macroenabled.12=/usr/share//applications/wps-office-et.desktop
vnd.ms-excel.template.macroenabled.12=/usr/share//applications/wps-office-et.desktop
application/wps-office.dps=/usr/share//applications/wps-office-wpp.desktop
application/wps-office.dpt=/usr/share//applications/wps-office-wpp.desktop
application/wps-office.ppt=/usr/share//applications/wps-office-wpp.desktop
application/wps-office.pot=/usr/share//applications/wps-office-wpp.desktop
application/vnd.ms-powerpoint=/usr/share//applications/wps-office-wpp.desktop
application/vnd.mspowerpoint=/usr/share//applications/wps-office-wpp.desktop
application/powerpoint=/usr/share//applications/wps-office-wpp.desktop
application/wps-office.pptx=/usr/share//applications/wps-office-wpp.desktop
application/wps-office.potx=/usr/share//applications/wps-office-wpp.desktop
vnd.ms-powerpoint.presentation.macroenabled.12=/usr/share//applications/wps-office-wpp.desktop
vnd.ms-powerpoint.template.macroenabled.12=/usr/share//applications/wps-office-wpp.desktop
application/wps-office.wps=/usr/share//applications/wps-office-wps.desktop
application/wps-office.wpt=/usr/share//applications/wps-office-wps.desktop
application/wps-office.doc=/usr/share//applications/wps-office-wps.desktop
application/wps-office.dot=/usr/share//applications/wps-office-wps.desktop
application/vnd.ms-word=/usr/share//applications/wps-office-wps.desktop
application/msword=/usr/share//applications/wps-office-wps.desktop
application/msword-template=/usr/share//applications/wps-office-wps.desktop
wps-office-doc.png=/usr/share//applications/wps-office-wps.desktop
wps-office-dot.png=/usr/share//applications/wps-office-wps.desktop

For more information about MIME type default applications, please look at this link in Arch linux Wiki.

0

The mimeapps.list file contents and locations are specified by the XDG MIME Applications Associations Specification. Version 1.0.1 specifies the lookup order as:

Path Purpose
$XDG_CONFIG_HOME/$desktop-mimeapps.list user overrides, desktop-specific (for advanced users)
$XDG_CONFIG_HOME/mimeapps.list user overrides (recommended location for user configuration GUIs)
$XDG_CONFIG_DIRS/$desktop-mimeapps.list sysadmin and ISV overrides, desktop-specific
$XDG_CONFIG_DIRS/mimeapps.list sysadmin and ISV overrides
$XDG_DATA_HOME/applications/$desktop-mimeapps.list for completeness, deprecated, desktop-specific
$XDG_DATA_HOME/applications/mimeapps.list for compatibility, deprecated
$XDG_DATA_DIRS/applications/$desktop-mimeapps.list distribution-provided defaults, desktop-specific
$XDG_DATA_DIRS/applications/mimeapps.list distribution-provided defaults

Where $desktop is a lower-case value from $XDG_CURRENT_DESKTOP, which is defined along with the other $XDG_ environment variables by the XDG Base Directory Specification. Assuming default values in the GNOME desktop environment, the lookup order would be:

  1. ~/.config/gnome-mimeapps.list
  2. ~/.config/mimeapps.list
  3. /etc/xdg/gnome-mimeapps.list
  4. /etc/xdg/mimeapps.list
  5. ~/.local/share/applications/gnome-mimeapps.list
  6. ~/.local/share/applications/mimeapps.list
  7. /usr/local/share/applications/gnome-mimeapps.list
  8. /usr/local/share/applications/mimeapps.list
  9. /usr/share/applications/gnome-mimeapps.list
  10. /usr/share/applications/mimeapps.list

Note that when finding the preferred application for a MIME type, the files are searched in order until a match is found, so adding a type to a file later in the list will have no effect if the type is present in a file earlier in the list.

You also may want to consider using a tool, such as xdg-mime from xdg-utils (e.g. xdg-mime default qtcreator.desktop application/vnd.nokia.qt.qmakeprofile), to set the association rather than editing mimeapps.list directly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.