# amule without X -> Is it possible?

## wantilles

I am planning to setup a small x86 machine as a file server using Gentoo.

I would like to know if it is possible for amule to run with no X emerged in this system (in make.conf USE flags -> -X, -gtk, -gtk2, -gnome, -qt, -kde). How does amule run? As a daemon?

I know that I can control it through its web interface (amuleweb daemon).

----------

## jedsen

```
emerge mldonkey
```

http://mldonkey.berlios.de/modules.php?name=Wiki&pagename=allowed_ips

You can :

```
telnet localhost 4000
```

 into mldonkey to set this option, then use telnet or the web interface (http://192.168.x.x:4080) from a remote box on your network.Last edited by jedsen on Mon Dec 19, 2005 7:59 pm; edited 4 times in total

----------

## i92guboj

 *wantilles wrote:*   

> I am planning to setup a small x86 machine as a file server using Gentoo.
> 
> I would like to know if it is possible for amule to run with no X emerged in this system (in make.conf USE flags -> -X, -gtk, -gtk2, -gnome, -qt, -kde). How does amule run? As a daemon?
> 
> I know that I can control it through its web interface (amuleweb daemon).

 

Dont think so, As stated above, your best bet would be mldonkey, that can also use the mule/donkey net shares.

----------

## jedsen

 *6thpink wrote:*   

> Dont think so, As stated above, your best bet would be mldonkey, that can also use the mule/donkey net shares.

 

How does one use net shares?

----------

## wantilles

Thank you for your interest.

I am well aware of mldonkey. In fact I had been using it for months. Switched to X+Gnome+amule though because mldonkey has a much different codebase in its core, and it is far less "aggressive" and efficient in getting sources for the downloads. Amule on the other hand, has the original emule codebase in the core, and it's much more efficient.

----------

## jedsen

I thought that mlnet was just renamed mldonkey.

----------

## nydoofus

 *wantilles wrote:*   

> Thank you for your interest.
> 
> I am well aware of mldonkey. In fact I had been using it for months. Switched to X+Gnome+amule though because mldonkey has a much different codebase in its core, and it is far less "aggressive" and efficient in getting sources for the downloads. Amule on the other hand, has the original emule codebase in the core, and it's much more efficient.

 

It actually is possible. I just managed to do this myself, though it took a lot of effort. Hopefully these steps will get you a working amuled / amuleweb without needing X. 

1. Edit /etc/portage/package.use and add these lines

```
net-p2p/amule amuled -gtk remote

x11-libs/wxGTK -debug -doc -gnome -gtk2 -joystick -odbc -opengl -sdl -unicode -wxgtk1

```

2. Do an emerge amule -pv. It should show only amule and wxGTK

3. Run emerge amule

4. Run amuled as root. It should quit immediately

5. Pick a random password and create an MD5 of it. 

```
echo -n yourpasswordhere | md5sum | cut -d ' ' -f 1

```

6. Edit /root/.aMule/amule.conf and change the following options to the values in parens

```

TempDir=/root/.aMule/Temp (/home/p2p/.aMule/Temp or whatever you choose, has to be owned by p2p)

IncomingDir=/root/.aMule/Incoming (/home/p2p/.aMule/Incoming or whatever you choose, has to be owned by p2p)

AcceptExternalConnections=0 (1)

ECUseTCPPort=0 (1)

ECPassword= (MD5 of password)

```

7. Move the /root/.aMule to /home/p2p

8. Do a chown -R p2p /home/p2p/.aMule

9. Run /etc/init.d/amuled start it should start normally

10. Edit /etc/conf.d/amuleweb and AMULEPWD to yourpasswordhere

11. Edit /etc/init.d/amuleweb and change 

```
OPTIONS="-rh ${AMULEHOST} -p ${AMULEPORT} -pw ${AMULEPWD}"
```

 to 

```
OPTIONS="-h ${AMULEHOST} -p ${AMULEPORT} -P ${AMULEPWD} -q"
```

12. Run /etc/init.d/amuleweb

----------

## Crazor

Many thanks nydoofus, that worked =) Now amuled is up and running on my xbox =)

----------

## nydoofus

 *|Crazor| wrote:*   

> Many thanks nydoofus, that worked =) Now amuled is up and running on my xbox =)

 

No problem  :Smile: . Now if I can only get the amule-cvs to compile without X I'll be happy  :Smile: 

----------

## Ilvalle

I , sorry for my english

but in italian forum some people work for amule cvs and without X:

https://forums.gentoo.org/viewtopic-t-350384.html

Paolo

----------

## dpetka2001

is it possible to run amule as a daemon and control it through console?? let's say copy over from your computer to the server just the links and then give a command ,as for an example "download e2dk://link" ?? is there some other programme you would recommend in order to do such a thing?? and maybe use the original emule codebase in the core?? thanks...

----------

## tmf

You need to compile amule with amuled flag, then run amuled and than control it via amulecmd.

tmf

----------

## dpetka2001

so this way i won't be needing any web-interface at all right?? thank you for your answer...

----------

## dpetka2001

i have just emerged amule and would like to run amuled and be able to control it through amulecmd...are the instructions above identical for amulecmd?? should i follow them or would i be in trouble if i'd do it?? thanks...

----------

## tmf

quite the same. Since you dont want to have web interface dont follow points 10 and 11. If you plan to run amulecmd locally I think you can leave AcceptExternalConnections and ECUseTCPPort equal to 0.

cheers, 

 tmf

----------

## dpetka2001

i have a "/root/.aMule/amule.conf" and also a "~/.aMule/amule.conf"...which of the two should i edit?? also why should i change the paths in amule.conf in order to match those of the amuled and not just edit "/etc/conf.d/amuled" ?? what is the difference??

----------

## tmf

When amule is run first by a user it creates in _user home_ directory another one called .aMule/, in wich it stores it configs, downloads, credits, etc. Every single user then  will have his own .aMule/ dir. So you have to edit the config that you will then copy to p2p dir. AFAIK /etc/conf.d/amuled is config file not for amule itself, but for initscript that will run amule at boot time (if you want it to do so). You have to edit amule.conf file (to change the paths) if you want amule to be run as diffrent user. 

cheers,

  tmf

----------

## tmf

another thing - if you dont want amuled to be run at boot time, you dont have to follow these steps - just run it from one of consoles when you need it

----------

## dpetka2001

soi if i change the path in /etc/conf.d/amuled instead of ~/.aMule/amule.conf will i not be able to run amule?? for example if i change the path from ~/p2p to ~/.aMule in /etc/conf.d/amuled won't it be the same ?? will it not run?? because this way it will see the directories normally (i think) under ~/.aMule since the script for the daemon will be prompted to look in the changed directory...

----------

## tmf

well, try it, experiment, see if it will work for you  :Wink: . The method mentioned in one of the previous posts was about having amuled running as special user ("p2p"), having its own dir. Its the most elegant solution, probably best for most of users not willing to have gui version, maybe it will be easier to follow it exactly? One more thing - ~/p2p is not the same as /home/p2p

tmf

----------

## dpetka2001

ok i think i got it...one last question before proceeding...you said that the instructions in the previous post were meant for a user p2p...so i guess i'll just have to create one...but in which groups should the user "p2p" be a member of?? just group "users" or maybe something else aswell??

----------

## tmf

You dont have to add any user:

```

$ cat /etc/passwd | grep p2p

p2p:x:105:506:added by portage for amule:/home/p2p:/bin/false

```

I think you dont have to deal with any groups related stuff to have amuled running.

tmf

----------

## dpetka2001

i don't have a "ECUseTCPPort" in my amule.conf...where is this entry needed?? does it have any effect on how i control amule with amulecmd??

----------

## epinefryna

Hi

nice procedure here  :Smile: 

I folowed it up except USE flags (I do not mind X)

and I get in /home/p2p/.aMule/logfile something like:

```

006-05-11 22:47:13: Creditfile loaded, 0 clients are known

2006-05-11 22:47:13: Loaded ipfilter with 0 new IP addresses.

2006-05-11 22:47:13: Loading server.met file: /home/p2p/.aMule/server.met

2006-05-11 22:47:13: 0 servers in server.met found

2006-05-11 22:47:13: No part files found

2006-05-11 22:47:13: *** TCP socket (ECServer) listening on 0.0.0.0:4712

2006-05-11 22:47:13: Found 0 known shared files

2006-05-11 22:47:13: Connecting

2006-05-11 22:47:13: Connecting to

2006-05-11 22:47:13: No valid servers to connect in serverlist found

2006-05-11 22:47:13: AICH Thread: Syncronization thread started.

2006-05-11 22:47:13: AICH Thread: Masterhashes of known files have been loaded.

2006-05-11 22:47:13: AICH Thread: No new files found.

2006-05-11 22:47:13: AICH Thread: Terminated.

```

netstat -a shows

```

tcp        0      0 *:4712                  *:*                     LISTEN      p2p        14270

tcp        0      0 *:4662                  *:*                     LISTEN      p2p        14275

tcp        0      0 *:ssh                   *:*                     LISTEN      root       11447

udp        0      0 *:4665                  *:*                                 p2p        14271

udp        0      0 *:4672                  *:*                                 p2p        14276

```

Where do I do mistake?

----------

## netbui

Hi, 

 I followed this instructions, but the web server did not came up. But I got it working:

https://forums.gentoo.org/viewtopic-p-3882330.html#3882330

----------

