0

I have a MIME definition file which is installed as part of a package:

$ rpm -ql virt-viewer | grep mime
/usr/share/mime/packages/virt-viewer-mime.xml
$ cat /usr/share/mime/packages/virt-viewer-mime.xml
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <mime-type type="application/x-virt-viewer">
    <sub-class-of type="text/plain"/>
    <comment>Virt-Viewer connection file</comment>
    <magic priority="50">
      <match value="[virt-viewer]" type="string" offset="0"/>
    </magic>
    <glob pattern="*.vv"/>
  </mime-type>
</mime-info>

But when I query the MIME database, it identifies it as text/plain

$ xdg-mime query filetype console.vv 
text/plain

I cannot use xdg-open to open the file with remote-viewer, which is a pain (Google Chrome also does not work here). I tried to force reindexing MIME system cache without any luck:

$ sudo update-mime-database /usr/share/mime/

My local mime database is empty. What's interesting is Thunar opens the vv file correctly, it's xdg-open which does not work well. Looks like it must be using a different approach. I don't have GNOME or Nautilus installed at all on my system.

This is Fedora 23 with i3wm.

1 Answer 1

2

Installing perl-File-MimeInfo package resolved the issue!

More info at Why does `xdg-mime query filetype ...` fail to find a new added file type?

You must log in to answer this question.

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