From AMule Project FAQ
Revision as of 15:20, 4 August 2008 by Vollstrecker (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

English | Deutsch

AMuleCMD is a command-line utility that allows you to control aMule or aMuled either locally or remotely.

Using aMuleCMD

The character-oriented interface offers a subset of aMule functionality, including searching for files, initializing downloads, and viewing your download queue. It also displays status information and allows you to change certain options.

To run aMuleCMD, type "amulecmd" on the command line. The program will start up and display the "aMulecmd$" prompt. The following commands are available:

  • Add
  • Cancel
  • Connect
  • Disconnect
  • Download
  • Exit
  • Get
  • Help
  • Pause
  • Quit
  • Reload
  • Results
  • Resume
  • Set
  • Show
  • Shutdown
  • Statistics
  • Status

For full instructions on how to use each command type 'help <command>' from within AmuleCMD.

In addition to running these commands from within aMuleCMD, you can also run them on the shell command line with the "-c" flag, like this:

$amulecmd -c [command]

This enables you to call aMuleCMD from other scripts or from cron. See FAQ amulecmd for more details on how to do this.

Installing aMuleCMD

Many of not most distros have an aMule package in their repositories. If you install aMule by means of RPM, DEB, or other package management system, aMuleCMD will be included in the installation.

This is the easiest and preferred method of installing aMule and aMuleCMD.

Compiling aMuleCMD

If you have not installed aMule by means of a package, you will need to compile it from source.

aMuleCMD is not compiled separately; it is compiled at the same time you compile aMule by using the --enable-amulecmd flag when you run configure. (See the Main Page for links to pages on compiling aMule for various operating systems).

Configuring aMuleCMD

To use aMuleCMD, you first need to set several opions in aMule's Preferences notebook. On the "Remote Controls" page, you will need to:

  • Enable "Accept External Connections".
  • Enter a password for External Connections.

You can also modifiy the default External Connections port (4712) here as well, but if you do so, you will need to restart aMule for the changes to take effect.

(If you are running aMuled and don't want to use aMule to configure aMuleCMD, you can also edit "[ExternalConnect]" section of amule.conf; see the instructions on the AMuleWeb page.)

Next, you need to do is generate remote.conf, the file where aMuleCMD stores its configuration information. (It can be found in the .aMule directory.) Among other things, this file contains the port number which aMule uses for External Connections as well as the md5sum hash of the password needed to access aMule.

To create a remote.conf file, enter at the command line:

amulecmd --create-config-from=/home/username/.aMule/amule.conf

where "username" is your user name.

aMuleCMD will read the necessary configuration information from amule.conf and generate a remote.conf file.

To do this on a remote system, enter this:

amulecmd -h hostname -p ECport -P ECpassword -w

By default, the port is 4712, as indicated above.

Tip You can also simply copy remote.conf from the host system to the the remote computer, changing the hostname line accordingly.