You are not logged in.

#1 2010-09-02 14:34:48

Revelation60
Member
From: The Netherlands
Registered: 2009-03-19
Posts: 158
Website

Problem adding mimetype

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

#2 2010-09-02 18:41:16

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Problem adding mimetype

Perl mimeinfo in extra could be helpful: http://www.archlinux.org/packages/extra … -mimeinfo/


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB