Welcome, Guest. Please login or register.

Author Topic: Firefox following ssh:// & telnet:// links  (Read 5889 times)

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2619
    • View Profile
    • NeDi
Firefox following ssh:// & telnet:// links
« on: April 14, 2010, 09:52:30 PM »
This issue seems to keep coming back like a fat fly, when you're about to doze off...

Solutions which allegedly used to work fail with my Ubuntu Lucid system, so I decided to tackle this issue again. I'm sure there's a more elegant approach, but I just needed a quick fix for developing NeDi more efficiently :)

In about:config create those booleans:

network.protocol-handler.expose.ssh;false
network.protocol-handler.expose.telnet;false


Create a script cli.sh:
#!/bin/sh

case "$1" in
   *telnet*)
   xterm -e telnet `echo $1 | sed -e "s/telnet:\/\///"`
   ;;
   *ssh*)
      xterm -e ./ssh.sh `echo $1 | sed -e "s/ssh:\/\///"`
   ;;
esac


and ssh.sh (clumsy, I know):
#!/bin/sh

echo -n "username:"
read name
ssh -l $name $1


chmod both to 755

First time you click on a telnet:// or ssh:// link you'll be prompted for a program. Browse for cli.sh for both...
« Last Edit: February 20, 2011, 06:42:51 PM by rickli »
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo