Results 1 to 4 of 4

Thread: aMule and Mozilla Seamonkey/Firefox: the final battle

  1. #1
    Join Date
    Aug 2009
    Location
    Buenos Aires, Argentina
    Posts
    95

    Question aMule and Mozilla Seamonkey/Firefox: the final battle

    Hi openSuSE gurus, after several weeks I've finally managed to get aMule to listen external calls from Mozilla browsers.

    To make it quick:
    In Seamonkey or FF do about:config and add

    Code:
    Key: network.protocol-handler.external.ed2k
    Tyoe: boolean
    Value: true
    
    Key: network.protocol-handler.expose.ed2k
    Type: boolean
    Value: false
    
    Key: network.protocol-handler.app.ed2k
    Type: string
    Value: ~/aMuleLinks.sh
    Where aMuleLinks.sh is a script with the following:

    Code:
    #!/bin/bash
    
    amuleserver=127.0.0.1
    password=somePass
    
    amulecmd --host=$amuleserver --port=4712 --password=$password --command='Add '$1
    And in amule.conf under ~/.aMule directory you must change:

    Code:
    [ExternalConnect]
    AcceptExternalConnections=1
    ECPassword=4c882dcb24bcb1bc225391a602feca7c
    Where '4c882dcb24bcb1bc225391a602feca7c' is the result of using this command

    Code:
    echo -n somePass | md5sum | cut -d ' ' -f 1
    The problem is that when aMule is not running I want to automatiaclly open it. I managed to get a script for doing that but it won't work,

    Code:
    #!/bin/bash
    
    amuleserver=127.0.0.1
    password=fender
    
    if [ -z "$(pgrep amule)" ];
      then
        amule
        sleep 5
        amulecmd --host=$amuleserver --port=4712 --password=$password --command='Add '$1
      else
        amulecmd --host=$amuleserver --port=4712 --password=$password --command='Add '$1
    fi
    The idea is to open aMule and then send the command to amulecmd but amulecmd never gets the command. If aMule is already running everything works fine.

    Any help will be much appreciated, TIA.

    Pancho

  2. #2
    Join Date
    Aug 2009
    Location
    Buenos Aires, Argentina
    Posts
    95

    Default Re: aMule and Mozilla Seamonkey/Firefox: the final battle

    Sorry for the double post but since I can't edit my post due to the 10 minutes edit limit this will be short.

    Code:
    #!/bin/bash
    
    amuleserver=127.0.0.1
    password=fender
    
    if [ -z "$(pgrep amule)" ];
      then
        amule &
        sleep 5
        amulecmd --host=$amuleserver --port=4712 --password=$password --command='Add '$1
      else
        amulecmd --host=$amuleserver --port=4712 --password=$password --command='Add '$1
    fi
    The trailing '&' is the key to solve the problem. amulecmd was waiting for aMule to finish to pass the command to aMule but when aMule was closed this couldn't be donde. So with the trailing '&' aMule and amulecmd run together.

    Thanks and hope this helps someone,

    Pancho

  3. #3
    Petronov NNTP User

    Default Re : aMule and Mozilla Seamonkey/Firefox: the final battle

    Hi, Pancho,

    I use your script on openSuse and it works perfectly.

    It also works on other distributions as well. I published it on a French forum and we just thank you.

    MLO - Mandriva Linux Online : Sujet - Liens Ed2k et Firefox

  4. #4
    Join Date
    Aug 2009
    Location
    Buenos Aires, Argentina
    Posts
    95

    Default Re: aMule and Mozilla Seamonkey/Firefox: the final battle

    Glad it helped

    Pancho
    openSUSE | Think correctly

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •