<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jonathan Ernst &#187; mozilla</title>
	<atom:link href="http://ernstfamily.ch/jonathan/tag/mozilla/feed/" rel="self" type="application/rss+xml" />
	<link>http://ernstfamily.ch/jonathan</link>
	<description>Mon site Web personnel</description>
	<lastBuildDate>Sat, 14 Jan 2012 14:29:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=166</generator>
		<item>
		<title>SSH and telnet protocol handler for Firefox</title>
		<link>http://ernstfamily.ch/jonathan/2008/10/ssh-and-telnet-protocol-handler-for-firefox/</link>
		<comments>http://ernstfamily.ch/jonathan/2008/10/ssh-and-telnet-protocol-handler-for-firefox/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 07:00:47 +0000</pubDate>
		<dc:creator>jernst</dc:creator>
				<category><![CDATA[blog.swisszone.ch]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[planet.ubuntu.com]]></category>
		<category><![CDATA[Trucs et astuces]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[telnet]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://ernstfamily.ch/jonathan/?p=110</guid>
		<description><![CDATA[I manage quite a lot of different computers, network devices, etc. As we are using an internal web based documentation system I thought it would be useful to be able to just click on ssh://user@thiscomputer.com and telnet://thisdevice.com links and ...]]></description>
			<content:encoded><![CDATA[<p>I manage quite a lot of different computers, network devices, etc. As we are using an internal web based documentation system I thought it would be useful to be able to just click on <a href="ssh://user@thiscomputer.com">ssh://user@thiscomputer.com</a> and <a href="telnet://thisdevice.com">telnet://thisdevice.com</a> links and have Firefox open a terminal where I&#8217;d be connected to this specific machine.</p>
<p>As with most things computer related in the Internet era, <a href="https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/3554">someone else had already just done that</a>. I modified his script a little bit so it&#8217;ll work with links specifying ssh keys and port :</p>
<ol>
<li>save the following zsh script into a file (let&#8217;s call it ~/.scripts/firefox-handler.zsh) (if you don&#8217;t have zsh, install it using your package manager or fix the script to use whatever shell you want).<br />
<blockquote>
<pre>#!/bin/zsh
url=$1
proto=${url//:*/}
data=${${url//*:\/\//}%/}

#makes -i $HOME/.ssh/id_rsa_foo work
data=${data//\%20/ }
data=${data//\$HOME/$HOME}
#/makes -i $HOME/.ssh/id_rsa_foo work

/usr/bin/gnome-terminal -e "$proto $data"</pre>
</blockquote>
</li>
<li>chmod +x ~/.scripts/firefox-handler.zsh</li>
<li>in Firefox go to <a href="about:config">about:config</a> and add the following two strings (right-click -&gt; new -&gt; string) <em>network.protocol-handler.app.ssh</em> and<em> network.protocol-handler.app.telnet</em> and put nothing as the value (for a yet unknown reason, it doesn&#8217;t work if you specify the path to your script right now)</li>
</ol>
<p>Restart Firefox, you should now be able to click on ssh and telnet links and also type those URIs in your location bar and it should ask you with what application you want to open it, you can now browse to the location of the previously created script and check the box &laquo;&nbsp;don&#8217;t ask me again&nbsp;&raquo;. As an added bonus, you can also use those URIs as bookmarks which I find quite handy.</p>
<p class="wp-flattr-button"></p>]]></content:encoded>
			<wfw:commentRss>http://ernstfamily.ch/jonathan/2008/10/ssh-and-telnet-protocol-handler-for-firefox/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  ernstfamily.ch/jonathan/tag/mozilla/feed/ ) in 1.43374 seconds, on Feb 4th, 2012 at 4:49 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 4th, 2012 at 7:35 pm UTC -->
