1. Create a bash script name ~/bin/foxtelnet, with the following commands :
#!/bin/bash xterm -e telnet ${1##telnet://}
2. Make the bash script executable by running :
chmod 700 ~/bin/foxtelnet
3. In firefox, type :
about:configin the URL bar.
4. Right click any where on the page and choose "New" --> "String".
5. Paste the value :
network.protocol-handler.app.telnetas the "preference name" and empty as the new value.
6. Quit & start back firefox browser.
7. Click on the URL with "telnet://" and it should prompt what application to run with the protocol "telnet;//".
8. Browse to the bash script we created in step 1.
Voilla !!!
4 comments:
Hi im NEW using ubuntu (Linux) and im still having problems opening telnet aplication via url. Im not sure how to make the bash script executable. can you be more specific please.! im typing this command
root@Tatooine:~# chmod 700 ~/bin/foxtelnet
chmod: cannot access `/root/bin/foxtelnet': No such file or directory
and i did this in about:config
Preference Name Status type Value
network.protocol-handler.app.telnet user set string empty
Please correct me if im wrong.
PD: this is web page http://www.cisconet.com/route-server/world_map.html
thanks
David
Costa Rica
David,
The error "chmod: cannot access `/root/bin/foxtelnet’: No such file or directory" refer to it is unable to find the file. Check the location of the script and change the permission accordingly.
Your script only works if there is no port in the URL. This might work more reliably.
#!/usr/bin/perl -w
if ($ARGV[0]=~m|(telnet://)?(\S+):(\S+)|o) {
($host,$port)=($2,$3);
exec ('xterm', '-sb', '-sl', '10000', '-e', 'telnet', ${host}, ${port});
}
elsif ($ARGV[0]=~m|(telnet://)?(\S+)|o) {
($host)=($2);
exec ('xterm', '-sb', '-sl', '10000', '-e', 'telnet', ${host});
}
Thanks mithrandir. :)
Post a Comment