#1
|
|||
|
|||
JD2 command line version
Is there any plans to make a command-line / non-GUI / server version of JDownloader?
Or maybe not a separate version, but just additional (fallback) interactive text-only mode, or maybe a non-interactive batch mode (to run on a headless server). Though it would not be possible to display a CAPTCHA in such text-only modes. |
#2
|
||||
|
||||
A CLI version provided exclusively by 'terminal/cmd/shell' wont be coming as I understand it (as in without GUI components in the installer = wont be happening), neither will a client/server model (I've asked for this myself in the past). The main reason why JD requires GUI for captcha purposes, and our entire design purpose was 1 user / 1 client running on your local system. We have been designing JD2 for headless again, with captcha support over our new API and user interface my.jdownloader (webui|app) or CLI (with limited to no feedback).
At this given time JD2 still needs to bind to a GUI interface to start, most people lock it to xterm/x11 instance. Main downside to that is, GUI requires large CPU cycles and associated memory requirement.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] Last edited by raztoki; 07.04.2014 at 04:03. |
#3
|
|||
|
|||
Launch download with command line
Hi everybody,
Quick question : Is it possible to launch Jdownloader via a command line to and start automatically the download of a youtube's mp3's video ? Something like Jdownloader -start www.youtube.com/xxxxxx would be awesome. (I've already try some commands found here) Feel free to ask any question if necessary and thank you ! |
#4
|
||||
|
||||
Merged similar threads.
__________________
» Setup JD2 / Instalador de JD2 «
Spoiler:
Installer for Windows XP/Vista/Seven/Eight || JD2 x86 - x64 (Beta) || Installer for Mac || JD2 (Beta) || Installers for Linux || JD2 (Beta) x86 || <---> || JD2 (Beta) x64 || How to Create a Log -» Click Here «- ¿Cómo crear un registro? -» Click Aquí «- Support Chat / Chat de Soporte -» Click Here / Click Aquí «- |
#5
|
|||
|
|||
Command line in JD2
Hello,
JD2 doesn't start nor stop with -d -D switches ( I'm in Linux ). Stable version did it right |
#6
|
||||
|
||||
Merged threads (again). Please use the board search before to start a new thread.
__________________
» Setup JD2 / Instalador de JD2 «
Spoiler:
Installer for Windows XP/Vista/Seven/Eight || JD2 x86 - x64 (Beta) || Installer for Mac || JD2 (Beta) || Installers for Linux || JD2 (Beta) x86 || <---> || JD2 (Beta) x64 || How to Create a Log -» Click Here «- ¿Cómo crear un registro? -» Click Aquí «- Support Chat / Chat de Soporte -» Click Here / Click Aquí «- |
#7
|
|||
|
|||
Hi everybody.
I did some very first implementations on a Guiless / Headless JDownloader today. I added around 30 new classes to JDownloader and was able to start JDownloader without a GUI using a newly introduced command line parameter. But I won't promise too much. As the developers here already mentioned so often: There are quite a lot parts where it simply needs to run a User Interface. I'm not sure if this is the right place to discuss development insights but I'll just try it My main goal was to keep the actual JDownloader untouched and only simulate an existing User Interface under the hood. There are already tutorials where you simulate an existing GUI on OS level (VNC, Xvfb etc.). My idea was to do the GUI simulation one level higher on AWT level. AWT/Swing has quite a nice platform abstraction layer and using this I simply implemented my own AWT Toolkit which does "nothing" for the GUI stuff. For all image specific stuff I delegate to the built-in Headless Toolkit (sun.awt.HToolkit) which supports that stuff. Viola: JDownloader starts runs without GUI. So far so good, a virtually running JDownloader doesn't actually mean it's really working. There might occur a lot of problems where JDownloader asks for a user input. I have to investigate that. My main goal was to let JDownloader simply connect to MyJDownloader and control it from there. [EDIT #1] The Main-Success-Scenario seems to work. I updated my configuration files for a correct MyJDownloader setup and added a premium account. On the MyJDownloader site I could add a packet with 3 links, add them to the downloads, download them and extract them. Other scenarios where JDownloader asks for user inputs are not working/tested yet:
Last edited by Enqueue90; 27.04.2014 at 01:16. |
#8
|
||||
|
||||
@enqueue90
sounds like a novel approach. btw JD doesn't have terms of service agreement in JD2 any longer. Which is what's in the current SVN.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#9
|
|||
|
|||
Quote:
I am currently working on the trunk:HEAD. Looks like my .jd_home configs were messed up from an earlier JD Version. After I copied the MyJDownloader settings JSON from the Beta-Installation to my Dev-Version the Login worked. |
#10
|
|||
|
|||
@Enqueue90, what a wonderful idea ! I think it would be a precious feature to be able to run JD2 without its native GUI as we could now interact with it with the wonderfull my.JD remote web/app interface.
Would it be possible to add such a "hide GUI by command line parameter" capacity to the main release of JD2 ? I'd like to install JD2 on a Cubox-i under Geexbox (lightweight linus kernel dedicated to run XBMC but with enough power to run JD2). The pb is that Geexbox isn't a "windowed" Linux (aka xterm/x11) to host the JD2 GUI. So such a great feature would be wonderfull for these Linux set-top-boxes ! @Enqueue90 : is it possible to share (the result of) your developement ? If not possible to include it in the official release, how can I install J2D on Geexbox ? I couldn't find any links to download the "jar version" of J2D on the download page. What about the " tutorials where you simulate an existing GUI on OS level (VNC, Xvfb etc.)." you are talking about ? could it be a solution for my installation on geexbox ? how could it be done ? thanks in advance for your response. |
#11
|
|||
|
|||
So far I didn't manage to get JD2 running without GUI on my Synology. Mostly my problems are that the Java classes try to load native libraries which are note available. I am still trying to build workarounds which makes Java think everything's fine and there's a GUI. An example: Direct in the java.awt.Toolkit static initializer Java tries to load the libawt. This static lib has a dependency on libXext which is not available in the Synology Java installation.
So far I'm a bit stuck because the places where those exceptions happen are really bad and don't allow proper handling. [EDIT] [EDIT2] Good news: I finally managed to get a combination of Java and Native code which allows me starting a Swing/AWT application without a UI available on the host system. Those are the steps so far:
The next problem will be to compile this AWT library for my Synology. The toolchain is only available for Linux so I'll have to check if I can setup a VM for this problem. [EDIT3] Again some progress: Managed to compile my own AWT library for Synology and passed a lot of AWT object creations. The next problems are on Swing level. They often directly call non standard Java (sun.*) classes for internal operations like Font loading. The next step will be to create custom empty implementations for those classes. Last edited by Enqueue90; 18.05.2014 at 23:09. |
#12
|
|||
|
|||
Awesome news:
JDownloader2 is running on my Synology without any User Interface or modifications on the JDownloader Source. Current State I created a completely new Java Library named GhostAWT which can be used with any Java AWT/Swing application. I start my JDownloader using a special command line: Code:
$JAVA_HOME/bin/java -Dawt.toolkit=ghostawt.GhostToolkit -Djava.awt.graphicsenv=ghostawt.image.GhostGraphicsEnvironment -Djava.awt.headless=false -Dsun.font.fontmanager=ghostawt.sun.GFontManager -cp "Core.jar:JDownloader.jar:libs/*:extensions/*:jd/*" org.jdownloader.startup.Main The library itself is a combination of the Java implementations (AWT Toolkit, AWT Graphics Environment, Swing Font Manager) and some C code for the native Java codes (mostly empty initIDs methods). Open Problems Downloads not working For some strange reason the downloads added to JDownloader aren't working. The download on MyJDownloader only looks like this: The log files do not contain any information why the downloads aren't working so I have to find the cause for not working downloads. Maybe some JD Developers can give me some hint's how to resolve such problems. Publishing I need to find a good way to publish this library. Currently the setup is quite complicated. As a first step I need to create builds for the most common platforms (Linux x86, Linux x64, Arm 32bit). Then I'll try to create a new JDownloader setting which does all the internal setup to use GhostAWT. Last edited by Enqueue90; 22.05.2014 at 12:35. |
#13
|
|||
|
|||
Hi Enqueue90,
I am the developer responsible for the MyJDownloader Webinterface at AppWork. Your project is very interesting If you have any questions, feel free to ask: metzger@appwork.org or "sturmination" in #jddev on IRC or here on the forums. I have no short answer to your current problem, what happens when you try to add the links to downloads? |
#14
|
||||
|
||||
Guess should say which IRC network. Freenode, irc.freenode.net
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#15
|
|||
|
|||
Looks like it was a problem with my testing environment and my library. I moved over to a Ubuntu Server installation to test my library and after some additional development I was able to start JDownloader and download files.
As a sneak peek how users will be able to use my solution: 1. I installed JDownloader using the current beta installer script 2. I copied my library into libs/ghostawt/* 3. I copied the MyJDownloader configuration from another JDownloader installation 4. I started JDownloader using Code:
java -Dghostawt.library.path=libs/ghostawt/linux32 -cp "./*:libs/ghostawt/*" ghostawt.GhostRunner org.jdownloader.startup.Main -console My next step will be to get JDownloader running on my Synology NAS. After that I'll create a new Thread where I'll publish my solution for other users. After that the JDownloader Developers can focus on additional configuration and control methods. But as I can see the main problem there is the SevenZipJBindings project JDownloader uses for extraction. I'll have to compile the bindings for ARM Last edited by Enqueue90; 24.05.2014 at 16:17. |
#16
|
||||
|
||||
far as I know they don't even have ARM release themselves. If you have the time maybe you could team up with limited SevenZipJBindings dev and kill two birds with one stone. Thanks for your effort and feedback so far.
raztoki
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#17
|
|||
|
|||
They have quite good cmake files in their repository. I was able to build an ARM package without much effort.
Currently I am trying to install a complete new version of JD2 onto my Synology using the SilentSetup shell script to see if it works. Since it worked perfectly on Ubuntu I hope it will also work on my Synology. |
#18
|
||||
|
||||
Guess coalodo could compile then also, and include them within JD2 libs.
I assume it would work, as long as the nas has the required dependencies it should work.
__________________
raztoki @ jDownloader reporter/developer http://svn.jdownloader.org/users/170 Don't fight the system, use it to your advantage. :] |
#19
|
|||
|
|||
Awesome news. It's working without problems now. Both Ubuntu Server 32bit (i386) and Synology Diskstation 213J+ (Arm) were able to start JDownloader and download files via MyJDownloader.
The source of my project is already available: **External links are only visible to Support Staff****External links are only visible to Support Staff** (the dist directory contains the compiled binaries). I also uploaded a proof video here: Click Pro Users already should be able to get JDownloader running. I'll create a HowTo for non-pro users as soon I've got time. |
#20
|
||||
|
||||
You, sir, are awesome!
|
Thread Tools | |
Display Modes | |
|
|