Linux Unrar

While it isn't officially supported, we have many users who successfully run NewsBin under Linux with a Windows emulator (Wine is the most popular). This forum exists for you Linux guys to share your experience getting NewsBin running on Linux as well as report any strangeness that we may or may not be able to fix. DThor is the resident expert.

Moderators: Quade, dexter, newsraider, DThor

Linux Unrar

Postby Stuart264 » Thu Mar 08, 2018 10:41 am

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?
User avatar
Stuart264
Seasoned User
Seasoned User
 
Posts: 227
Joined: Sun Jun 13, 2004 8:25 am
Location: United Kingdom

Registered Newsbin User since: 04/10/04

Re: Linux Unrar

Postby Quade » Thu Mar 08, 2018 11:25 am

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.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44984
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Linux Unrar

Postby Stuart264 » Thu Mar 08, 2018 12:38 pm

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.
User avatar
Stuart264
Seasoned User
Seasoned User
 
Posts: 227
Joined: Sun Jun 13, 2004 8:25 am
Location: United Kingdom

Registered Newsbin User since: 04/10/04

Re: Linux Unrar

Postby Quade » Thu Mar 08, 2018 2:08 pm

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?
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44984
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Re: Linux Unrar

Postby Stuart264 » Tue Mar 13, 2018 7:29 am

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)
User avatar
Stuart264
Seasoned User
Seasoned User
 
Posts: 227
Joined: Sun Jun 13, 2004 8:25 am
Location: United Kingdom

Registered Newsbin User since: 04/10/04


Return to Linux

Who is online

Users browsing this forum: No registered users and 2 guests