title: How to use the xdg-mime command
body: <p>Can someone provide example on how to use (with GNOME Ubuntu) the <a href="http://manpages.debian.net/cgi-bin/man.cgi?query=xdg-mime" rel="noreferrer">XDG-MIME</a> command? I'm struggling to get anything working even with the docs.</p>
  
  <p>For example if I want to register the extension .mfe with an application called MyApp what would the steps be? This is my attempt so far, I would appreciate any pointers on getting this right...</p>
  
  <p>This is my xml (MyApp-MyFileType.xml) <strong>How is the file name relavent?</strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'&gt;
    &lt;mime-type type="text/mfe"&gt;
      &lt;comment&gt;File for MyApp&lt;/comment&gt;
      &lt;glob pattern="*.mfe"/&gt;
    &lt;/mime-type&gt;
  &lt;/mime-info&gt;
  </code></pre>
  
  <p><strong>Then is run this command?</strong></p>
  
  <pre><code>xdg-mime install MyApp-MyFileType.xml
  </code></pre>
  
  <p>And then I run this? <strong>What does the xxx relate to?, I understand it to be an identifier to my application but how do I define it?</strong></p>
  
  <pre><code>xdg-mime default xxx.desktop text/mfe
  </code></pre>