# [HOWTO] aMule with webserver and GTK+2

## FMulder

HOWTO: aMule with webserver and GTK+2

Hi! This is an english translation of this italian howto!

I'm italian and I don't write in a perfect english, but I hope you'll find this useful  :Wink: 

It would be great if a moderator wants to do the hard job of checking and correcting all my mistakes  :Wink: 

Required:

- aMule 2.0.0rc8, 

modified ebuild that can be compiled on GTK+2 with remote tools enabled.

This ebuild is masked so you need to do (as root) 

```
# echo "net-p2p/amule ~x86" >> /etc/portage/package.keywords
```

- wxGTK-2.5.3 (installed as dependency of the ebuild) are hard masked, so if you don't already have them you have to do this as root before emerging amule:

```
# echo "=x11-libs/wxGTK-2.5.3" >> /etc/portage/package.unmask
```

If you already have them, you MUST have them compiled with flag USE="gtk2", otherwise you'll never be able to use gtk2 with amule  :Wink: 

Step 1: adding the ebuild to portage 

Look into /etc/make.conf for the line

```
PORTDIR_OVERLAY=/usr/local/portage
```

If you don't have that, add it.

Create the folder for the portage overlay:

```
# mkdir -p /usr/local/portage/net-p2p/amule

# cd /usr/local/portage/net-p2p/amule
```

Now copy the downloaded ebuild in this folder, with name amule-2.0.0_rc8.ebuild and do

```
# ebuild amule-2.0.0_rc8.ebuild digest 
```

Step 2: emerge amule

You have to enable flags remote and gtk2.

If you also want support for internal statistics, you have to add flag stats

If you former emerged wxGTK 2.5.3 using flag gtk2 AND unicode, you can choose against which version linking amule.

for gtk2+unicode version:

```
# USE="gtk2 remote stats unicode" emerge amule -v --pretend
```

for gtk2 version:

```
# USE="gtk2 remote stats -unicode" emerge amule -v --pretend
```

Obiouvsly, you must select gtk2 only version if you didn't emerged wxGTK with unicode

If all seems fine, just remove --pretend and cross fingers  :Wink: 

Step 3: amule configuration

Log-on as the user who will run the amule webserver, and start amule with

```

# amule

```

I won't explain how to config amule, I suppose you already know that!

I'll give you just the needed option for enabling webserver.

Go in Preferences, Remote connection, and check the options: 

- enable password

- enable gzip compression

- enable external connection

- use TCP ports instead of UNIX local sockets

Choose a port as tcp external port (default 4712) and choose one another for webserver (default 4711)

Choose a password in external connection parameters and another one for full rights on webserver parameters.

Done? Close amule, you need it in order to apply changes. 

Step 4: Last settings

Log on as the user who will run the webserver, type

```

# cp /usr/share/amuleweb/* ~/.aMule/ -r

```

this is needed because amule tries to find the web pages template for the webserver directly inside ~/.aMule.

Step 5: aMule and web access

From now on, you can start amule typing

```

# amule

```

and start webserver giving as parameter the external port for TCP connection, like this:

```

# amuleweb -p 4712

```

You have to type the password you choose for TCP external connections.

Now, you can access your c00l amule webserver just typing http://192.168.0.1:4711/ (with the right IP you know  :Wink: ) where you will be prompt to type the password for webserver access

I hope you'll find this useful...

Enjoy  :Very Happy: 

----------

## WaTcHmE

it works!

*dancing round in circles*

THX a lot FMulder for your Howto!

U saved my night  :Smile: 

----------

## Cklein

Thanks a lot for your guide, it works perfect! Thank you very much

----------

## VeritisQuo

Fmulder:

          A lot of thanks! :Very Happy:   It's favulous! It runs!  :Wink: 

----------

## mascanho

nice job , well done man tkx

----------

## Sade

is this possible on 2.03 too?

----------

