NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
boz0
Oct 13, 2010Aspirant
JDownloader quick howto
Technically, this isn't an addon, but since it's about an app that's been requested several times as an addon, I figure this post has its place here.
Since JDownloader isn't yet a client/server app (it's in their todo list), and since I haven't found any serious alternatives (Tucan's CLI isn't quite up to speed yet, and development seems at best very slow), I decided to run JDownloader directly on my Ultra 4. The general idea is to install java on the readynas, then run jdownloader in a virtual X11 environment using xvfb to minimize required resources. Here's a quick'n'dirty rundown on how to get it to work, with no warranties whatsoever. Whatever you do, you do at your own risk!
- enable root ssh access to the readynas (warning : support can refuse to help you if you've enabled root access to the nas), using the EnableRootSSH plugin (http://www.readynas.com/?p=4203)
- login as root via ssh on the nas
- add the following line to /etc/apt/sources.list (thanks to this post : viewtopic.php?f=35&t=45891&start=0) :
- set debconf to run interactively by running the following command and then selecting "readline" :
- install java 6 :
- once this is over, return debconf to non-interactive mode :
- install xvfb if it isn't installed already (can't remember whether it was already there) :
- add a few necessary libs to avoid grief later on
- download the official jdownloader install script from here : http://212.117.163.148/jd.sh (or see direct link here : http://jdownloader.org/download/index)
- set up a X11 server on your PC so that you can export your display (Linux : it's already there, MacOS : X11 included on the second DVD IIRC, Windows : download Xming from here : http://sourceforge.net/projects/xming/)
- on the readynas, export your display and run the jd.sh script :
- JDownloader will then be downloaded, installed and updated on your NAS. You should get the window on your PC's X display
- in JDownloader's settings, activate the JDWebInterface plugin and configure it (I suggest SSL and a robust password if you intend to make that interface visible from the outside)
- in JDownloader's settings, click the checkboxes for the TOS for all the file hosters (since we'll be running it headless, we won't be able to validate the TOS directly)
- check that you can connect through your browser
- edit the jd.sh script and replace all 512m entries by 128m, as we don't want it eating too much memory (simple replace with vi : ":%s/512m/128m/g")
- run the jd.sh script through xvfb:
The last step is to setup jdownloader to restart when the nas reboots, which can be accomplished easily by setting a startup script in /etc/rc3.d (and which I'll have to do ASAP).
I'll try to answer questions in this thread if you have any.
Since JDownloader isn't yet a client/server app (it's in their todo list), and since I haven't found any serious alternatives (Tucan's CLI isn't quite up to speed yet, and development seems at best very slow), I decided to run JDownloader directly on my Ultra 4. The general idea is to install java on the readynas, then run jdownloader in a virtual X11 environment using xvfb to minimize required resources. Here's a quick'n'dirty rundown on how to get it to work, with no warranties whatsoever. Whatever you do, you do at your own risk!
- enable root ssh access to the readynas (warning : support can refuse to help you if you've enabled root access to the nas), using the EnableRootSSH plugin (http://www.readynas.com/?p=4203)
- login as root via ssh on the nas
- add the following line to /etc/apt/sources.list (thanks to this post : viewtopic.php?f=35&t=45891&start=0) :
deb http://archive.ubuntu.com/ubuntu dapper-backports main multiverse
- set debconf to run interactively by running the following command and then selecting "readline" :
dpkg-reconfigure debconf
- install java 6 :
apt-get update
apt-get install sun-java6-jre sun-java6-jdk
- once this is over, return debconf to non-interactive mode :
dpkg-reconfigure debconf
- install xvfb if it isn't installed already (can't remember whether it was already there) :
apt-get install xvfb
- add a few necessary libs to avoid grief later on
apt-get install libxtst6 libxi6
- download the official jdownloader install script from here : http://212.117.163.148/jd.sh (or see direct link here : http://jdownloader.org/download/index)
- set up a X11 server on your PC so that you can export your display (Linux : it's already there, MacOS : X11 included on the second DVD IIRC, Windows : download Xming from here : http://sourceforge.net/projects/xming/)
- on the readynas, export your display and run the jd.sh script :
export DISPLAY=your.pc.ip.address:0
chmod 755 jd.sh
./jd.sh
- JDownloader will then be downloaded, installed and updated on your NAS. You should get the window on your PC's X display
- in JDownloader's settings, activate the JDWebInterface plugin and configure it (I suggest SSL and a robust password if you intend to make that interface visible from the outside)
- in JDownloader's settings, click the checkboxes for the TOS for all the file hosters (since we'll be running it headless, we won't be able to validate the TOS directly)
- check that you can connect through your browser
- edit the jd.sh script and replace all 512m entries by 128m, as we don't want it eating too much memory (simple replace with vi : ":%s/512m/128m/g")
- run the jd.sh script through xvfb:
nohup xvfb-run ./jd.sh &
The last step is to setup jdownloader to restart when the nas reboots, which can be accomplished easily by setting a startup script in /etc/rc3.d (and which I'll have to do ASAP).
I'll try to answer questions in this thread if you have any.
14 Replies
Replies have been turned off for this discussion
- boz0AspirantSorry, I haven't logged in to these forums in a loooong time.
JDownloader is still running on my RNDU4000, but I haven't used it in a while, mostly because I've been too lazy to update and follow the MU changes.
Nothing special to report as far as memory usage is concerned, my only reboot in the past 10 months has been to update the NAS itself. - First off, thanks boz0 for the great tutorial. I admit that I had to give up and come back a couple of times to bash through all of this (being a Linux novice, some of this was difficult for me to digest).
Anyway - I'm left with just a couple of questions;
Is there anything that can be done on Xming or SSH configuration to speed up the X11 window under Windows 7? I appreciate the point of the tutorial is to go headless and use the web interface, but the full GUI is nice for certain things, and the performance is shite...
Is there any way to specify the user permissions of the saved files in advance? I notice that JD is saving everything as root, which means I can't delete the files from over my SMB share unless I SSH in and update the permissions first... would be nice if I could get downloads to save with wide open permissions up front.
Other than that - it works awesome!
Thanks.
CB - MastacheataAspirant
coreyinoz wrote: Is there any way to specify the user permissions of the saved files in advance? I notice that JD is saving everything as root, which means I can't delete the files from over my SMB share unless I SSH in and update the permissions first... would be nice if I could get downloads to save with wide open permissions up front.
JDownloader saves files as the user it's running as.
That means if you started the shell script or the xvfb command from a root shell the files will be saved as root either.
You can try to run it as a different user (if you want to use your SMB users, you might need to assign a shell to these users first).
Not sure if that'll work though, it's been quite a while since I last experimented with X11 forwarding. - tom_homelinuxAspiranti´ve got it running with a virtual X11 display, running fluxbox and then a VNC server in it. So you can access it from everywhere. Additional you can activate and run the web-interface of jdownloader to add new items. everthing can be installed with apt-get or aptitude. my box is a rndu2120 and everything (x11server, vncserver in it and jdownloader) starts automatical after reboot. i´m using for jdownloader a local copy of sun-java-jre 1.6.0 with no errors at jdownloader startup (e.g. funambol linux package, extract and copy the jre1.6 tree into a local directory). openjdk gives me always a lot of errors.
if you are interested, i can send you the config files for autostart
greets
tom
Related Content
NETGEAR Academy
Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!