- 1 Headless operation using the Console UI (and Web UI)
- 2 Related Topics
Headless operation using the Console UI (and Web UI)
In order to run Azureus headless, you will need to grab a few support jars (log4j.jar and commons-cli.jar) listed on the SVN server: http://svn.vuze.com/public/client/trunk/uis/lib/
(Generally, links to source code and libraries can be found from: http://dev.vuze.com/ )
After acquiring all these jars, you can start the Console UI by putting them together in one directory and running:
java -jar Azureus2-XXX.jar --ui=console
or (note the ui.common.Main)
java -cp "Azureus2.jar:commons-cli.jar:log4j.jar" org.gudy.azureus2.ui.common.Main --ui=console
(where XXX is whatever version you have downloaded, likely Azureus2.jar if you're running an official release jar) You will almost certainly want to use the command l off immediately in order to turn off the very verbose logging output to console. After this, you can type "?" to get a list of commands.
Torrents can be added from both local and remote locations. Simply type add /path/to/file.torrent for local torrents or add http://torrentserver/file.torrent for remote torrents. Torrents will be downloaded to the default torrent save directory. This may be overridden by using the -o option. Eg: add -o /path/to/downloads/folder /path/to/file.torrent
Showing status of torrents
Use the show torrents command. This will display output similar to:
show torrents > ----- 1 [[>]] 001.8% gnome-livecd-2.10 (613.9 MB) ETA:36m 58s Speed: 364.7 kB/s / 149.3 B/s Amount: 13.1 MB / 0 B Connections: 21(37) / 0(4) Total Speed (down/up): 364.7 kB/s / 149.3 kB/s Transferred Volume (down/up/discarded): 1.71 GB / 3.31 GB / 240.0 kB Total Connected Peers (seeds/peers): 21 / 75 > -----
The show command should be used to set up a list of available torrents prior to using other commands such as stop, start and remove.
Pausing / resuming a torrent
To stop (pause) a torrent, use the 'stop' command. To re-start it, use the 'start' command. In order to specify the torrent number to stop/start, use the 'show' command as shown above. Eg: start 1
Removing a torrent
To remove a torrent, use the 'remove' command. Eg: remove 1. To remove all torrents, use the remove all command.
Aliases may be added/removed to assist in performing common operations. Example aliases:
- alias speed set Core_iMaxUploadSpeed
- alias st show torrents
To remove an alias use alias -d aliasname. Eg: alias -d speed
Regardless, configuration with the console UI is somewhat tricky. You can type set to get a list of parameters that are configurable, but many of them are very very hard to figure out. The easiest way to configure is to use the SWT UI at least once in order to set things up. You can also use Xming to forward the X window to a local machine running Windows to do your configuration.
To use Xming to configure Azureus, get and install Xming on your Windows computer from http://sourceforge.net/projects/xming. Next start a PuTTY session to your Linux computer, and select X11 Forwarding under SSH options. Login to your Linux computer, and start Azureus. Once the Azureus window appears, set your options, enable the WebUI plugin and exit. Then launch as command line only
Here are a few of the options that might be very very useful to change:
You can go find the default settings for most options in this source file. Most option names should be self-explanatory, at least when you had a look at the normal GUI (which is recommanded).
- Please note: Only the quoted parts inside the def.put() lines are options, the rest isn't interesting for you.
Settings with whitespaces in their name must be quoted, settings without whitespaces must NOT be quoted.
Examples: setting and enabling the default save dir
set "Default save path" "C:\mytorrentdownloads\" string set "Use default data dir" true boolean
change the listening port for incoming connections
set TCP.Listen.Port 50000
enabling logging and saving log files to c:\temp
set "Logger.Enabled" true boolean set "Logging Enable" true boolean set "Logging Dir" "c:\temp" string
(Second option is to enable logging to file)
change the listening port for the HTML UI plugin
set Plugin.azhtmlwebui.Port 50000
Modifying upload/download speed of a single torrent
Use the hack command. eg: to restrict the upload speed of the first torrent in your download list (see 'show' command) to a maximum of 50kb/sec, use the command hack 1 uploadspeed 50
To start the telnet ui, use the command ui telnet. The telnet ui is the same interface as the console ui except that it can be accessed via telnet. The telnet ui also has support for multiple users. See TelnetUI for more information.
There are some additional command line options for the console UI, described on this page.