User Tools

Site Tools


doc:appunti:linux:tux:mimetype

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:linux:tux:mimetype [2020/09/23 21:30] – [Application associated to a MIME Type] niccolodoc:appunti:linux:tux:mimetype [2020/09/23 21:43] (current) – [MIME Type application/x-image-playlist] niccolo
Line 56: Line 56:
  
 <code xml> <code xml>
 +<!-- WARNING! This file is not optimal, see below for the final version. -->
 <?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
 <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
Line 194: Line 195:
 <code> <code>
 update-desktop-database /usr/local/share/applications/ update-desktop-database /usr/local/share/applications/
 +</code>
 +
 +Something good has happened; the system knows how to handle that MIME type:
 +
 +<code>
 +xdg-mime query default application/x-image-playlist
 +photo-reframe.desktop
 </code> </code>
  
 After this step, Firefox suggests to use **Photo-Reframe (default)** to handle the link, you can check the box **Do this automatically for files like this from now on** and the associated application will be launched automatically whenever you will click over a link like this. Only after this association, you can open the Firefox **Preferences** => **Applications** and browse for the //M3U Images Playlist// and assign the preferred action. After this step, Firefox suggests to use **Photo-Reframe (default)** to handle the link, you can check the box **Do this automatically for files like this from now on** and the associated application will be launched automatically whenever you will click over a link like this. Only after this association, you can open the Firefox **Preferences** => **Applications** and browse for the //M3U Images Playlist// and assign the preferred action.
  
 +**NOTICE**: You may need to use **Shift-Click** to force the reloading of the link, otherwise Firefox may get the object from the cache, where the MIME type is cached too.
 +===== Useless recipes =====
 +
 +There are many recipes to add a new MIME Type and an associated applications, many of them suggest to edit some system files. In our experience it is **absolutely useless to modify** the following files:
 +
 +  * /etc/mailcap
 +  * /etc/mime.types
 +  * $HOME/.mozilla/firefox/<profile>.default/mimeTypes.rdf
 +  * $HOME/.mozilla/firefox/<profile>.default/handlers.json
  
 ===== Opening local files from an HTTP page ===== ===== Opening local files from an HTTP page =====
doc/appunti/linux/tux/mimetype.1600889429.txt.gz · Last modified: 2020/09/23 21:30 by niccolo