Page 1 of 1

Linux Unrar

PostPosted: Thu Mar 08, 2018 10:41 am
by Stuart264
Is there any possibility of adding a hidden string in the .nbi configuration file so I can path to the native linux rar executable i.e. /usr/local/bin/rar rather than run the windows executable through wine which is really slowing things down?

Re: Linux Unrar

PostPosted: Thu Mar 08, 2018 11:25 am
by Quade
I'm not a wine expert but I see a couple issues.

1 - Can Newsbin reach out of the wine sandbox and execute a real Linux program?

2 - Pathing problems. Newsbin see's the path as "C:\Bla\bla\Download" but the real path outside the sandbox is "/home/quade/.wine/drive_c/bla/bla/download" so if Newsbin was able to run a Linux program, it doesn't really know what path to the RAR to send to the linux program.

I'm not opposed to the idea, I just don't know if it can work.

Re: Linux Unrar

PostPosted: Thu Mar 08, 2018 12:38 pm
by Stuart264
Yes wine will "reach out" its not actually sandboxed though it does try to hide, there is a conversion program for paths in either windows or linux called winepath that converts the paths so if i issue

Code: Select all
winepath -u /usr/local/bin/rar

The resultant "Windows" path is
Code: Select all
/home/stuart/.wine/dosdevices/z:/usr/local/bin/rar


In theory (and there are some online examples) a simple registry edit in wine would change the path to the rar executable however the rar executable in Newsbin I believe is compiled into the program and does not use a registry key.

Re: Linux Unrar

PostPosted: Thu Mar 08, 2018 2:08 pm
by Quade
Firstly, I assume you're talking about unraring by hand in Newsbin. Newsbin doesn't use any external programs to unrar normally so, what we're talking about only applies to manual unrar from the files and/or download list

In theory (and there are some online examples) a simple registry edit in wine would change the path to the rar executable however the rar executable in Newsbin I believe is compiled into the program and does not use a registry key.


Can you make a script or cmd file that executes the winepath and runs the RAR program then register this script as the handler for RAR files? When doing a manual unrar or double-clicking something in the files list. Newsbin just asks windows to invoke whatever registered program is for the file type. So, it seems like you don't have to make any changes to Newsbin to make this happen.

If you're trying to replace the unrar code Newsbin uses for normal unraring, it's pretty much impossible. If you're trying to make it unrar to some path outside of Wine, can't you link a normal linux folder into the Wine folder tree and then make that the unrar path?

Re: Linux Unrar

PostPosted: Tue Mar 13, 2018 7:29 am
by Stuart264
Yes, the manual unrar, however I discovered the issue during testing its to do with problems in the linux native version of unrar which wine is defaulting to. After doing some testing it would appear that the best solution for the larger files that are causing me problems is to pull an nzb out of Newsbin and use that with nzbget (set to use the non-free rar in its options)