You are not logged in.
I am trying to link .nzb-files system wide to sabnzbd. To accomplish that, I tried the following:
I created a file /usr/share/mime/packages/newzbin-nzb.xml:
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-nzb">
<comment xml:lang='en'>An XML-based file format for retrieving posts from NNTP (Usenet) servers</comment>
<sub-class-of type="application/xml"/>
<glob pattern="*.nzb"/>
</mime-type>
</mime-info>
I did xdg-mime install usr/share/mime/packages/newzbin-nzb.xml.
I created /usr/share/applications/sabnzbd.desktop:
[Desktop Entry]
Type=Application
Version=1.0
Name=SABnzbd+
GenericName=Binary Newsreader
Exec=python /opt/SABnzbd.py %f
Terminal=false
Categories=Network
MimeType=application/x-nzb
I ran xdg-mime default sabnzbd.desktop applications/x-nzb. To make sure things got updated I ran update-mime-database /usr/share/mime.
But when I run file -i on a .nzb file I get that the mimetype is application/xml... When I try to start them they don't get opened in SAB, but in firefox (because they are xml files).
I really don't know what to do now. I can confirm that x-nzb has an entry in /usr/share/mime/globs and globs2.
Offline
Perl mimeinfo in extra could be helpful: http://www.archlinux.org/packages/extra … -mimeinfo/
Offline