LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-04-2010, 05:59 AM   #1
wubai
Member
 
Registered: Dec 2009
Posts: 103

Rep: Reputation: 20
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?
 
Old 01-05-2010, 05:02 AM   #2
colonna
LQ Newbie
 
Registered: Feb 2009
Location: Paris (France)
Distribution: CentOS 5.2
Posts: 18

Rep: Reputation: 1
Quote:
Originally Posted by wubai View Post
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.
 
Old 01-05-2010, 06:54 AM   #3
wubai
Member
 
Registered: Dec 2009
Posts: 103

Original Poster
Rep: Reputation: 20
@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
 
Old 01-05-2010, 07:21 AM   #4
voyciz
Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 425

Rep: Reputation: 40
What do you mean "associate"? Like call another program from Firefox? Can't you just edit your preferences in Firefox?
 
Old 01-05-2010, 08:39 AM   #5
colonna
LQ Newbie
 
Registered: Feb 2009
Location: Paris (France)
Distribution: CentOS 5.2
Posts: 18

Rep: Reputation: 1
Quote:
Originally Posted by wubai View Post
@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.
 
Old 01-05-2010, 09:00 AM   #6
colonna
LQ Newbie
 
Registered: Feb 2009
Location: Paris (France)
Distribution: CentOS 5.2
Posts: 18

Rep: Reputation: 1
Quote:
Originally Posted by wubai View Post
@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.
 
Old 01-06-2010, 08:48 AM   #7
wubai
Member
 
Registered: Dec 2009
Posts: 103

Original Poster
Rep: Reputation: 20
Quote:
Originally Posted by voyciz View Post
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
 
Old 01-06-2010, 11:17 AM   #8
colonna
LQ Newbie
 
Registered: Feb 2009
Location: Paris (France)
Distribution: CentOS 5.2
Posts: 18

Rep: Reputation: 1
Quote:
Originally Posted by wubai View Post
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.
 
Old 01-07-2010, 05:54 PM   #9
hedron
Member
 
Registered: Jul 2009
Location: NYC
Distribution: Slackware64-multilib 15.0, SARPI, artix
Posts: 401

Rep: Reputation: 32
Quote:
Originally Posted by wubai View Post
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.
 
Old 01-13-2010, 04:25 AM   #10
wubai
Member
 
Registered: Dec 2009
Posts: 103

Original Poster
Rep: Reputation: 20
@hedron

thanks!I'll give it a try .
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
firefox , associate files to app automaticaly ..! mohama Linux - Software 3 03-10-2007 06:51 PM
de-associate plugins on mozilla/firefox carboncopy Slackware 3 08-28-2004 10:15 AM
Associate an icon with firefox rosscopeeko Mandriva 1 05-08-2004 09:31 AM
associate mailto in firefox to a program true_atlantis Linux - Software 1 04-26-2004 02:39 PM
rc.local script for mldonkey on RH polzbert Linux - Software 1 10-14-2003 04:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration