Firefox’s telnet protocol handler in Linux stopped working some time after version 3.0. I manage a network of switches, routers, and other devices with command-line interfaces. Wouldn’t it be nice to be able to click on
ssh:// URLs again?
As with most tinkering in firefox, start by typing “about:config” in the location bar. Right click and select “New”, then “Boolean”. Create two entries:
network.protocol-handler.expose.telnet = false network.protocol-handler.expose.ssh = false
Now, click on a telnet or SSH URL, and Firefox will prompt you for the application to use. This application must handle the full URL as an argument. On Linux, the easiest solution is to choose
/usr/bin/xdg-open. This will open the user’s preferred terminal, whether that is gnome-terminal, konsole, or xterm. You can use xdg-open to open almost any type of file or URL.
/usr/bin/putty, or use a simple script as follows. Edit the last line to call whatever application you prefer.
Update 2010-08-25: don’t use this script. See my next post for a better one.
#!/usr/bin/perl # take URL of form telnet://target:port and call konsole # get protocol and host ($proto,$addr) = split /:\/\//, $ARGV; # convert "host:port" to "host port" (port is optional) $addr =~ s/\:/\ /g; `konsole -e $proto $addr\n`;
A bit of history, for the curious. You may find instructions online stating to create values like these:
network.protocol-handler.app.telnet = "/usr/bin/putty" network.protocol-handler.warn-external.telnet = false
This is the old method, used in releases prior to Firefox 3.5. These settings are now ignored.