LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to associate Firefox and mldonkey by using script? (https://www.linuxquestions.org/questions/slackware-14/how-to-associate-firefox-and-mldonkey-by-using-script-779703/)

wubai 01-04-2010 05:59 AM

How to associate Firefox and mldonkey by using script?
 
hi, all !

I followed the info from internet trying to associate Firefox and mldonkey after I installed mldonkey,but it did't work, and there is kind of a add-on , but version seems lower for current firefox. the problem bother me most is why this script doesn't work in my system?

$ cat submit
#!/bin/bash
echo dllink $* | nc -q 1 127.0.0.1 4000

I am sure i did "about:config" of firefox things right.

actually, i run the submit in terminal , got the follow mesgs:

-------
./submit ed2k://|file|%E5%B0%B1%E6%98%AF%E8%BF%99%E6%A0%B7.This.Is.It.2009.DVD-RMVB-CD1-%E4%BA%BA%E4%BA%BA%E5%BD%B1%E8%A7%86%E5%8E%9F%E5%88%9B%E7%BF%BB%E8%AF%91%E4%B8%AD%E6%96%87%E5%AD%97% E5%B9%95.rmvb|265490680|2d7f56859ef01bf5810003c13631022c|h=bhqd3uq4yuuweadwi5od2fvwpwfk2tis|/
bash: 265490680: command not found
bash: %E5%B0%B1%E6%98%AF%E8%BF%99%E6%A0%B7.This.Is.It.2009.DVD-RMVB-CD1-%E4%BA%BA%E4%BA%BA%E5%BD%B1%E8%A7%86%E5%8E%9F%E5%88%9B%E7%BF%BB%E8%AF%91%E4%B8%AD%E6%96%87%E5%AD%97% E5%B9%95.rmvb: command not found
bash: 2d7f56859ef01bf5810003c13631022c: command not found
bash: /: is a directory
Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator] [-m magicfiles] file...
file -C -m magicfiles

Try `file --help' for more information.

------

can anybody help?

colonna 01-05-2010 05:02 AM

Quote:

Originally Posted by wubai (Post 3813469)
hi, all !

I followed the info from internet trying to associate Firefox and mldonkey after I installed mldonkey,but it did't work, and there is kind of a add-on , but version seems lower for current firefox. the problem bother me most is why this script doesn't work in my system?

$ cat submit
#!/bin/bash
echo dllink $* | nc -q 1 127.0.0.1 4000

I am sure i did "about:config" of firefox things right.

actually, i run the submit in terminal , got the follow mesgs:

-------
./submit ed2k://|file|%E5%B0%B1%E6%98%AF%E8%BF%99%E6%A0%B7.This.Is.It.2009.DVD-RMVB-CD1-%E4%BA%BA%E4%BA%BA%E5%BD%B1%E8%A7%86%E5%8E%9F%E5%88%9B%E7%BF%BB%E8%AF%91%E4%B8%AD%E6%96%87%E5%AD%97% E5%B9%95.rmvb|265490680|2d7f56859ef01bf5810003c13631022c|h=bhqd3uq4yuuweadwi5od2fvwpwfk2tis|/
bash: 265490680: command not found
bash: %E5%B0%B1%E6%98%AF%E8%BF%99%E6%A0%B7.This.Is.It.2009.DVD-RMVB-CD1-%E4%BA%BA%E4%BA%BA%E5%BD%B1%E8%A7%86%E5%8E%9F%E5%88%9B%E7%BF%BB%E8%AF%91%E4%B8%AD%E6%96%87%E5%AD%97% E5%B9%95.rmvb: command not found
bash: 2d7f56859ef01bf5810003c13631022c: command not found
bash: /: is a directory
Usage: file [-bcikLhnNrsvz0] [-e test] [-f namefile] [-F separator] [-m magicfiles] file...
file -C -m magicfiles

Try `file --help' for more information.

------

can anybody help?

Hello,

I don't understand what your submit script is made for,anyway, it seems that the port is incorrect it should be 127.0.0.1:4080.
May be it helps.

F.C.

wubai 01-05-2010 06:54 AM

@colonna, thanks for the response!

I tried your way, it didn't work too, i guess it's not the script. anyway,it doesn't affect using mldonkey , just want to figure it out

voyciz 01-05-2010 07:21 AM

What do you mean "associate"? Like call another program from Firefox? Can't you just edit your preferences in Firefox?

colonna 01-05-2010 08:39 AM

Quote:

Originally Posted by wubai (Post 3814757)
@colonna, thanks for the response!

I tried your way, it didn't work too, i guess it's not the script. anyway,it doesn't affect using mldonkey , just want to figure it out

Could you explain what exactly you want to do ?
Best.
F.C.

colonna 01-05-2010 09:00 AM

Quote:

Originally Posted by wubai (Post 3814757)
@colonna, thanks for the response!

I tried your way, it didn't work too, i guess it's not the script. anyway,it doesn't affect using mldonkey , just want to figure it out

Well I tried the "nc" command (I did not know!) with this sequence :

sudo nc -p 1 127.0.0.1 4000

^
p not q

> ?
> s logic
> vr
[ 572] 17 1 Seriale Xskey Logic Pro 7.txt urn:ed2k:79540CE3D566754E3BCB6C55EE1D4E6C
> d 572
download started
>vd
[D 1] - 0 admin mldonkey Seriale Xskey Logic Pro 7.txt 0.0 0b 17b 4:56 0:0 0/2 - 0
>q

As you see it works and this works too :
cat ml.inp
s logic
d 570
q

sudo nc -p 1 127.0.0.1 4000 < ml.inp

I think I missed something. Could you tell me ?
Best
F.C.

wubai 01-06-2010 08:48 AM

Quote:

Originally Posted by voyciz (Post 3814796)
What do you mean "associate"? Like call another program from Firefox? Can't you just edit your preferences in Firefox?

Quote:

Could you explain what exactly you want to do ?
Best.
F.C.
sorry i didn't speak my problem clearly !

what i want to do is that the files of ed2k can be added in mldonkey queue automatically when i click on a ed2k link in any site page , instead of coping that ed2k link location and pasting in mldonkey software , which is exactly what i am doing for downloading a ed2k file.

the info i followed is like these steps:
1. tpye 'about:config' in the browser's address location
2. create a new boolean ,which named 'network.protocol-handler.external.ed2k' with the value 'true'
3. create a new string named 'network.protocol-handler.app.ed2k, with the value '/home/username/.mldonkey/submit'
4. create a script named submit under the directory .mldonkey
after all of above, files with the ed2k link in the web should be added in queue of mldonkey when i click on thoese ed2k link

well , i did all of thoese, and it doesn't work.that's my issue

colonna 01-06-2010 11:17 AM

Quote:

Originally Posted by wubai (Post 3816241)
sorry i didn't speak my problem clearly !

what i want to do is that the files of ed2k can be added in mldonkey queue automatically when i click on a ed2k link in any site page , instead of coping that ed2k link location and pasting in mldonkey software , which is exactly what i am doing for downloading a ed2k file.

the info i followed is like these steps:
1. tpye 'about:config' in the browser's address location
2. create a new boolean ,which named 'network.protocol-handler.external.ed2k' with the value 'true'
3. create a new string named 'network.protocol-handler.app.ed2k, with the value '/home/username/.mldonkey/submit'
4. create a script named submit under the directory .mldonkey
after all of above, files with the ed2k link in the web should be added in queue of mldonkey when i click on thoese ed2k link

well , i did all of thoese, and it doesn't work.that's my issue

Sorry, I have no idea to help you doing that kind of procedure.
Best
F.C.

hedron 01-07-2010 05:54 PM

Quote:

Originally Posted by wubai (Post 3813469)
can anybody help?

If you want to do what I think you want to do, then don't bother writing a script. Just install this:

http://www.informatik.uni-oldenburg.de/~dyna/mldonkey/

Don't worry. It's safe. I use it myself.

wubai 01-13-2010 04:25 AM

@hedron

thanks!I'll give it a try .


All times are GMT -5. The time now is 12:43 PM.