MLDonkey for Solaris 11

MLDonkey LogoMLDonkley 3.1.3 is an open source (GPL) Peer to Peer (p2p) client that supports ED2K (and Kademlia and Overnet), Bittorrent, DC++ and Direct Download (wget).



MLDonkey Screenshot

Music : Ends (Noveller) / CC BY-NC-ND 3.0

MLDonkey has a separate core (mlnet) that can run on a remote machine and a number of GUI clients that can be used to connect to the core. There are two (2) packages available in my repository.

Package Description
mldonkey The mldonkey core (mlnet) program as well as the GTK based GUI client (mlgui). This package is suitable for running on a full Solaris 11 desktop environment. This can be used to run the core and GUI on the same system or, it can be used for just the GUI so you can connect to an instance of the core running on a remote server. A single program called mlnet+gui is also available to run the GUI and automatically spawn the core if you're running both on the same system.
mldonkey-text The mldonkey core (mlnet) program suitable for running on a headless server, i.e. A Solaris 11 install completed using the "text" installer (no X-Windows/GTK/Gnome packages installed). You can use the web based GUI or the GTK GUI to managed and control the core. There are a number of other GUI clients available. See http://mldonkey.sourceforge.net/Gui for more information.

The installation of MLDonkey also delivers the required files and configuration to run the core as a Solaris SMF service. Continue reading to get the MLDonkey core running as a service on your Solaris 11 environment.

Installation

If you've already added my repository to your Solaris 11 installation one of the following commands will install MLDonkey. Please note that you don't need to install both packages on the same system.

To install the "headless" package that only includes the MLDonkey core (mlnet):

sudo pkg install mldonkey-text

To install the full package which includes the GTK GUI (mlgui) and core files:

sudo pkg install mldonkey

Service Properties

The service properties below are for the "headless" core installation (mldonkey-text) but also work for the full core and GUI installation (mldonkey). You'll need to substitute "mldonkey-text" with "mldonkey" if you're not using the "headless" service.

The table below shows some of the key service properties that can/should be changed to suit your environment. Default values are also listed. The default values will work but I'd recommend, at the very least, changing method_context/group and method_context/user. The user or group needs full access to the mldonkey-text/dir folder. Files downloaded are also "owned" by that user and group.

Property Default Value Description
mldonkey-text/allowed_ips 127.0.0.1 list of IP address allowed to control the client via
Telnet/GUI/Web.
mldonkey-text/binary /opt/SMM/mldonkey-text/bin/mlnet File used to start the service.
mldonkey-text/dir /var/opt/SMM/mldonkey Base/home directory to use for MLDonkey.
This directory must exist and 'method_context/user'
must have 'write' access.
mldonkey-text/gui_port 4001 Port used by the GUI client to connect to the core.
mldonkey-text/options "" Additional options to pass to MLDonkey during start-up.
method_context/group nobody Group that MLDonkey runs under.
method_context/user nobody User that MLDonkey runs under.


Prepare Environment

Firstly, decide on a user, group and home directory to use for MLDonkey. For this example, I will use the following.

user johndoe
group users
dir /mldonkey

I am going to assume that the user "johndoe" already exists on the system and leave the GUI port as "4001".

Now, let's set up the environment and configure the properties for the service. The commands below need to be executed by a user with elevated privileges.

# create the home directory
mkdir /mldonkey
# change the ownership on the directory
chown -R johndoe:users /mldonkey
# set the relevant properties for the service
svccfg -s mldonkey-text:default setprop mldonkey-text/dir = astring: "/mldonkey"
# allow your client IP, localhost and/or network subnet
svccfg -s mldonkey-text:default setprop mldonkey-text/allowed_ips = astring: "192.168.1.0/24"
svccfg -s mldonkey-text:default setprop method_context/group = astring: "users"
svccfg -s mldonkey-text:default setprop method_context/user = astring: "johndoe"
svcadm refresh mldonkey-text:default

Starting the Service

svcadm enable mldonkey-text

Running the GUI

Now you should have a running MLDonkey service. Next, if you are using the client/server model, we need to install the package that includes the GUI on the client (Desktop). Note: If you are running the core and GUI on the same system you should have already installed and configured mldonkey rather than mldonkey-text so you don't need to install mldonkey again.

sudo pkg install mldonkey

Now, run the MLDonkey GUI.

/opt/SMM/mldonkey/bin/mlgui

Unless you have the core running locally, the GUI won't connect. It needs to be setup to connect to the remote system (core).

Click on Not Connected at the bottom left corner of the MLDonkey window and then select Settings.

MLDonkey Settings

Under Interfaces type in the Hostname or IP Address. In the example below I've used "server" as my Hostname.

MLDonkey Interfaces

The Login should be "admin" and the Password should be blank/empty. We'll set the password for the core once we have connected. Click on "OK" to continue.

Again, click on Not Connected at the bottom left corner of the MLDonkey window but this time select Reconnect.

MLDonkey Reconnect

It should now say Connected.

MLDonkey Connected

Setting Admin Password

Now we are connected, click on the Console button in the toolbar. In the Command: text box type "useradd admin mypassword".

In the example below I used "topsecret" as my new admin password.

Password Screenshot

The following should be displayed in the Console.

----------------------------------
Eval command: useradd admin topsecret

Password of user admin changed

Now, go back into Interfaces and enter your new password. You'll need to select the MLgui tab. There are more options/settings now it's connected.

Password Screenshot

Finally, click on Reconnect again and it should connect using the new password.

Ports and Firewalls

It's worth mentioning the ports that are used by MLDonkey for the BitTorrent and Donkey protocols. These ports needs to be opened on your router. Port forwarding also needs to be configure to forward these ports through to the system running the MLDonkey core (mlnet). In the example above, this would be the host called server.

The ports can be found and changed under Settings as shown below.

BitTorrent Port

Bittorrent Screenshot

Donkey Port

Donkey Screenshot

More Information

For more information on configuration and setup please go to the MLDonkey Website.

Enjoy and let me know if you have any issues.

Murray B