<?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>Cold Chicken &#187; gnome</title>
	<atom:link href="http://smux.net/blog/tag/gnome/feed/" rel="self" type="application/rss+xml" />
	<link>http://smux.net/blog</link>
	<description></description>
	<lastBuildDate>Fri, 26 Feb 2010 03:51:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Using Google Apps as default mail client in Linux (Gnome)</title>
		<link>http://smux.net/blog/2009/02/08/using-google-apps-as-default-mail-client-in-linux-gnome/</link>
		<comments>http://smux.net/blog/2009/02/08/using-google-apps-as-default-mail-client-in-linux-gnome/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 17:05:46 +0000</pubDate>
		<dc:creator>Sena</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[default]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[google apps]]></category>

		<guid isPermaLink="false">http://smux.net/blog/?p=46</guid>
		<description><![CDATA[Ok, pretty simple. I had a couple of machines where I wanted to keep the installation base to a minimum, so WebMail was a natural choice. I neded to be able to send mails when clicking mail links everywhere in Firefox or other application, so we need to tell Gnome that Firefox is it the [...]]]></description>
			<content:encoded><![CDATA[<p>Ok, pretty simple. I had a couple of machines where I wanted to keep the installation base to a minimum, so WebMail was a natural choice.</p>
<p>I neded to be able to send mails when clicking mail links everywhere in Firefox or other application, so we need to tell Gnome that Firefox is it the default mail client.</p>
<p>So I created the following shell script, which I placed in <code>/usr/local/bin</code>:</p>
<blockquote><pre>#!/bin/bash

DOMAIN=example.com
FIREFOX=/usr/bin/firefox

if [[ "" != "$1" ]]; then
  SEND="?extsrc=mailto&amp;url=$1"
fi

URL=https://mail.google.com/a/${DOMAIN}/${SEND}

if (pidof $FIREFOX); then
  $FIREFOX -remote "openurl($URL, new-tab)"
else
  $FIREFOX $URL
fi</pre>
</blockquote>
<p>You must replace <em>&#8220;example.com&#8221;</em> with your own domain.</p>
<p>This script opens a new tab in Firefox, loading Google Apps Mail directly. If Firefox is not yet running, it starts a new instance. If you provide a <code>mailto:</code> URL in the command line, it opens the mail composition section. If no URL is provided, it opens the regular Inbox view.</p>
<p>Now, we must tell Gnome to use this script as the default mail client. Simply open the <strong>Preferred Applications</strong> dialog in the <strong>System/Preferences</strong> menu. In the <strong>Mail Client</strong> section, select <strong>Custom</strong> and type the name of the script we just created in the <strong>Command</strong> field, followed by <em>&#8220;%s&#8221;</em>.</p>
<div id="attachment_50" class="wp-caption alignnone" style="width: 160px"><a href="/blog/wp-content/uploads/2009/02/preferred.png"><img src="/blog/wp-content/uploads/2009/02/preferred-150x150.png" alt="Preferred Applications window" title="Preferred Applications window" width="150" height="150" class="size-thumbnail wp-image-50" /></a><p class="wp-caption-text">Preferred Applications window</p></div>
<p>That&#8217;s it. It should be working now.</p>
<p>One last warning, tough. If you&#8217;re not logged in Google Apps, you will get the username/password dialog, and then you must click the e-mail address link again, in order to send a message.</p>
<p><strong>Edit:</strong> you must verify if Firefox is running or not and start a new instance if it&#8217;s not. Changed the code accordingly.</p>
]]></content:encoded>
			<wfw:commentRss>http://smux.net/blog/2009/02/08/using-google-apps-as-default-mail-client-in-linux-gnome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
