cannot associate NZB to sabnzbd (on Firefox 58)

Support for the Debian/Ubuntu package, created by JCFP.
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
mattra
Newbie
Newbie
Posts: 3
Joined: March 1st, 2018, 4:38 pm

cannot associate NZB to sabnzbd (on Firefox 58)

Post by mattra » March 1st, 2018, 4:46 pm

Hi,
I just installed a new computer with Ubuntu 17.10 and Sabnzb 1.1.1, but when I download a nzb file Firefox (58.0.2) asks me what to do with it (open it with text editor, or download it), but when I choose open with another program, SABnzb is nowhere listed. Is there a way to associate nzbs with SABnzb in Firefox?
Now I download the nzb, open it manually in SABnzb, but it's tedious...
Last edited by mattra on March 2nd, 2018, 3:36 am, edited 1 time in total.

User avatar
sander
Release Testers
Release Testers
Posts: 6332
Joined: January 22nd, 2008, 2:22 pm

Re: cannot associatie NZB to sabnzbd (on Firefox 58)

Post by sander » March 2nd, 2018, 2:07 am

First of all: install the PPA for SABnzbd to get the most recent SABnzbd.

Then your NZB associating question:

It seems that is not possible anymore via the GUI.
"You must create/edit a .desktop file located in ~/.local/share/applications/ or /usr/share/applications/ Locate the Exec= parameter and at the end of the line add %U - it will be replaced with the filename to be opened."

I will try some things on my own Lubuntu, and report back.

mattra
Newbie
Newbie
Posts: 3
Joined: March 1st, 2018, 4:38 pm

Re: cannot associatie NZB to sabnzbd (on Firefox 58)

Post by mattra » March 2nd, 2018, 3:34 am

Hi Sander,

Thank you. I've meanwhile installed the PPA and updated to 2.3.2.

I added %U at the end of the Exec parameter in /usr/share/applications/sabnzbplus.desktop (the file is listed as SABnzb+ but opens as sabnzbplus.desktop, don't know why this is so, I use nemo to browse files) and now SABnzb+ is listed in the programs when I open a nzb in Firefox.

So, though I have no idea what %U means, or why it is necessary to add it, it works like a charm.

So thank you!

User avatar
sander
Release Testers
Release Testers
Posts: 6332
Joined: January 22nd, 2008, 2:22 pm

Re: cannot associate NZB to sabnzbd (on Firefox 58)

Post by sander » March 2nd, 2018, 3:40 am

I think %U means the filename you click on, so the filename of the .NZB

User avatar
sander
Release Testers
Release Testers
Posts: 6332
Joined: January 22nd, 2008, 2:22 pm

Re: cannot associate NZB to sabnzbd (on Firefox 58)

Post by sander » March 2nd, 2018, 3:53 am

I checked my Ubuntu server (!) and it has /usr/share/applications/sabnzbdplus.desktop too. Quite special for a Server.

Anyway:

Code: Select all

[email protected]:~$ ll  /usr/share/applications/sabnzbdplus.desktop
-rw-r--r-- 1 root root 245 Sep 26  2015 /usr/share/applications/sabnzbdplus.desktop

Code: Select all

[email protected]:~$ cat  /usr/share/applications/sabnzbdplus.desktop
[Desktop Entry]
Name=SABnzbd+
GenericName=Binary newsgrabber
Comment=Download from Usenet
Exec=sabnzbdplus --browser 1
Icon=sabnzbdplus
Terminal=false
Type=Application
Categories=Network;FileTransfer;
Keywords=usenet;binaries;download;nzb;nntp;

So you should added the %U to the exec line, and you were fine?

User avatar
OneCD
Full Member
Full Member
Posts: 169
Joined: March 4th, 2017, 3:47 pm

Re: cannot associate NZB to sabnzbd (on Firefox 58)

Post by OneCD » March 2nd, 2018, 3:59 am

sander wrote:
March 2nd, 2018, 3:53 am
I checked my Ubuntu server (!) and it has /usr/share/applications/sabnzbdplus.desktop too. Quite special for a Server.
You're running a GUI on your server? ;D
Stuff I like: Apache BASH CouchPotato CRON Debian DNSMasq Entware-3x FireFox GitHub ImageMagick Kate KDE LibreELEC Netrunner NFS NVIDIA OpenVPN Orvibo S20 Python Raspberry Pi RAID SABnzbd+ SickRage Transmission Usenet VirtualBox WordPress XFCE

User avatar
sander
Release Testers
Release Testers
Posts: 6332
Joined: January 22nd, 2008, 2:22 pm

Re: cannot associate NZB to sabnzbd (on Firefox 58)

Post by sander » March 2nd, 2018, 5:45 am

According to https://packages.ubuntu.com/search?sear ... l&arch=any , that file /usr/share/applications/sabnzbdplus.desktop is provided by the package ... 'sabnzbdplus'. OK, good: then we know where to change / bug-report it.

Confirmed by

Code: Select all

[email protected]:~$ dpkg -S /usr/share/applications/sabnzbdplus.desktop
sabnzbdplus: /usr/share/applications/sabnzbdplus.desktop
I'll check on my own desktop Ubuntu if the %U works for me.

Maybe @jcfp can read along? FWIW: I've moved this topic to the forum "Debian/Ubuntu Package"

User avatar
sander
Release Testers
Release Testers
Posts: 6332
Joined: January 22nd, 2008, 2:22 pm

Re: cannot associate NZB to sabnzbd (on Firefox 58)

Post by sander » March 2nd, 2018, 12:29 pm

I can confirm: with the " %U", and a logout-login, SABnzbd is available & selectable in Nautilus / Nemo under "Open With Other Application". Afterwards, double clicking adds it so SABnzbd. Nice

Contents of /usr/share/applications/sabnzbdplus.desktop

Code: Select all

[Desktop Entry]
Name=SABnzbd+
GenericName=Binary newsgrabber
Comment=Download from Usenet
Exec=sabnzbdplus --browser 1 %U
Icon=sabnzbdplus
Terminal=false
Type=Application
Categories=Network;FileTransfer;
Keywords=usenet;binaries;download;nzb;nntp;
@jcfp is this something you can take care of in the PPA and the plain package?

mattra
Newbie
Newbie
Posts: 3
Joined: March 1st, 2018, 4:38 pm

Re: cannot associate NZB to sabnzbd (on Firefox 58)

Post by mattra » March 2nd, 2018, 1:23 pm

Hi Sander,

Yes, with %U SABnzb is listed in nemo.

Still have no idea what %U means or why it makes a difference for Gnome or Nemo to list SABnzb or not, but it does the trick!

User avatar
jcfp
Release Testers
Release Testers
Posts: 874
Joined: February 7th, 2008, 12:45 pm

Re: cannot associate NZB to sabnzbd (on Firefox 58)

Post by jcfp » March 3rd, 2018, 4:51 am

mattra wrote:
March 2nd, 2018, 1:23 pm
Still have no idea what %U means or why it makes a difference for Gnome or Nemo to list SABnzb or not, but it does the trick!
See here.
sander wrote:
March 2nd, 2018, 12:29 pm
@jcfp is this something you can take care of in the PPA and the plain package?
Wasn't aware that sab accepted an nzb file (or maybe files, or even urls?) via the command line. Program --help output doesn't mention it, and didn't work when I tried this wayyyy back when writing the desktop file. Changing the desktop file is trivial if it does now.

User avatar
sander
Release Testers
Release Testers
Posts: 6332
Joined: January 22nd, 2008, 2:22 pm

Re: cannot associate NZB to sabnzbd (on Firefox 58)

Post by sander » March 3rd, 2018, 5:13 am

jcfp wrote:
March 3rd, 2018, 4:51 am

sander wrote:
March 2nd, 2018, 12:29 pm
@jcfp is this something you can take care of in the PPA and the plain package?
Wasn't aware that sab accepted an nzb file (or maybe files, or even urls?) via the command line. Program --help output doesn't mention it, and didn't work when I tried this wayyyy back when writing the desktop file.
That was a surprise for me too.
I think this is the SAB code that takes care of that https://github.com/sabnzbd/sabnzbd/blob ... #L775-L779

Changing the desktop file is trivial if it does now.
Nice.

User avatar
jcfp
Release Testers
Release Testers
Posts: 874
Joined: February 7th, 2008, 12:45 pm

Re: cannot associate NZB to sabnzbd (on Firefox 58)

Post by jcfp » March 3rd, 2018, 5:42 am

So multiple local files yes, urls no: seems %F is the way to go, rather than %U. I'll do some testing and add this to the desktop file with a future update. Also needs a PR to document this feature in help output and elsewhere on the sab end.

User avatar
sander
Release Testers
Release Testers
Posts: 6332
Joined: January 22nd, 2008, 2:22 pm

Re: cannot associate NZB to sabnzbd (on Firefox 58)

Post by sander » March 3rd, 2018, 5:50 am

jcfp wrote:
March 3rd, 2018, 5:42 am
So multiple local files yes, urls no: seems %F is the way to go, rather than %U. I'll do some testing and add this to the desktop file with a future update. Also needs a PR to document this feature in help output and elsewhere on the sab end.
like this? https://github.com/sabnzbd/sabnzbd/issues/1107

Post Reply