JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06.04.2014, 01:58
BobBib
Guest
 
Posts: n/a
Default 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.
Reply With Quote
  #2  
Old 06.04.2014, 03:12
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

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.
Reply With Quote
  #3  
Old 07.04.2014, 02:02
Abigail
Guest
 
Posts: n/a
Default 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 !
Reply With Quote
  #4  
Old 07.04.2014, 02:10
Lram32's Avatar
Lram32 Lram32 is offline
Spanish Supporter
 
Join Date: Jul 2012
Location: Dark side of the moon
Posts: 9,905
Default

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í «-


Reply With Quote
  #5  
Old 18.04.2014, 11:52
pajarraco
Guest
 
Posts: n/a
Default Command line in JD2

Hello,

JD2 doesn't start nor stop with -d -D switches ( I'm in Linux ). Stable version did it right
Reply With Quote
  #6  
Old 18.04.2014, 17:44
Lram32's Avatar
Lram32 Lram32 is offline
Spanish Supporter
 
Join Date: Jul 2012
Location: Dark side of the moon
Posts: 9,905
Default

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í «-


Reply With Quote
  #7  
Old 26.04.2014, 23:37
Enqueue90
Guest
 
Posts: n/a
Default

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.

But in the latest source version there seems to be something wrong with the MyJDownloader Client. The authentication even fails with correct credentials and because of that I couldn't test the actual link adding and download szenarios.

[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:
  • accepting license terms for hosters. this confirmation dialog should be preventable by updating the settings to accept all licenses by default.
  • captcha confirmations
  • ...

Last edited by Enqueue90; 27.04.2014 at 01:16.
Reply With Quote
  #8  
Old 27.04.2014, 04:17
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

@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. :]
Reply With Quote
  #9  
Old 27.04.2014, 11:05
Enqueue90
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by raztoki View Post
btw JD doesn't have terms of service agreement in JD2 any longer.
Ah great. It was only my first guess why my downloads didn't start after I added them. I knew there was this feature in JD1 and thought there might be a a dialog I just kicked with my AWT Toolkit.

Quote:
Originally Posted by raztoki View Post
Which is what's in the current SVN.
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.
Reply With Quote
  #10  
Old 28.04.2014, 22:12
juanlucky
Guest
 
Posts: n/a
Default

@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.
Reply With Quote
  #11  
Old 08.05.2014, 20:47
Enqueue90
Guest
 
Posts: n/a
Default

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] My next try will be to implement the platform abstraction one layer deeper on native level: The libawt. Maybe I can manage to compile my own no-gui libawt which has no dependency on XServer.

[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:
  • I created an own AWT Toolkit which acts like there was a UI available.
  • I created an own AWT GraphicsEnvironment to simulate all the Java2D drawing stuff. No actual drawing is done and only empty buffers are created. I hope JDownloader does not do any drawing mechanisms.
  • Last but not least I created an own native AWT library (dll/so). This library implements all JNI methods which are required by the AWT classes.

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.
Reply With Quote
  #12  
Old 22.05.2014, 12:27
Enqueue90
Guest
 
Posts: n/a
Default

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
Basically I set all AWT, Java2D and Swing JVM Properties to use my special library.

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.
Reply With Quote
  #13  
Old 23.05.2014, 11:01
Sturmination
Guest
 
Posts: n/a
Default

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?
Reply With Quote
  #14  
Old 23.05.2014, 13:26
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

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. :]
Reply With Quote
  #15  
Old 24.05.2014, 16:11
Enqueue90
Guest
 
Posts: n/a
Default

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
5. Done

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.
Reply With Quote
  #16  
Old 24.05.2014, 16:39
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

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. :]
Reply With Quote
  #17  
Old 24.05.2014, 16:57
Enqueue90
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #18  
Old 24.05.2014, 17:44
raztoki's Avatar
raztoki raztoki is offline
English Supporter
 
Join Date: Apr 2010
Location: Australia
Posts: 17,611
Default

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. :]
Reply With Quote
  #19  
Old 24.05.2014, 19:15
Enqueue90
Guest
 
Posts: n/a
Default

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.
Reply With Quote
  #20  
Old 26.05.2014, 11:40
mrc's Avatar
mrc mrc is offline
Guardian of the Droids
 
Join Date: Jan 2013
Location: Germany
Posts: 288
Default

You, sir, are awesome!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 04:06.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.