<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Set Gmail as Default Mail Client in Ubuntu</title>
	<atom:link href="http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/</link>
	<description>Computer Help from your Friendly How-To Geek</description>
	<lastBuildDate>Mon, 23 Nov 2009 20:44:40 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mark B</title>
		<link>http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/comment-page-4/#comment-80051</link>
		<dc:creator>Mark B</dc:creator>
		<pubDate>Mon, 16 Nov 2009 00:56:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/#comment-80051</guid>
		<description>You should be able to enter that xdg-open or gnome-open line directly in the gnome preferred applications custom line. I have worked out why it doesn&#039;t work however. It is due to a bug in gnome where it always prepends a bogus space when it substitutes the %s (i.e. it does not strip/trim the string). This is at least the case on my up-to-date ubuntu 9.10 karmic installation. So you can&#039;t avoid the command getting 2 url args instead of one.

So we will have to use a 3rd party script as I describe above until gnome/ubuntu fix this silly bug.</description>
		<content:encoded><![CDATA[<p>You should be able to enter that xdg-open or gnome-open line directly in the gnome preferred applications custom line. I have worked out why it doesn&#8217;t work however. It is due to a bug in gnome where it always prepends a bogus space when it substitutes the %s (i.e. it does not strip/trim the string). This is at least the case on my up-to-date ubuntu 9.10 karmic installation. So you can&#8217;t avoid the command getting 2 url args instead of one.</p>
<p>So we will have to use a 3rd party script as I describe above until gnome/ubuntu fix this silly bug.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark B</title>
		<link>http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/comment-page-4/#comment-80031</link>
		<dc:creator>Mark B</dc:creator>
		<pubDate>Sun, 15 Nov 2009 13:04:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/#comment-80031</guid>
		<description>I should add to my comment above that I could only get xdg-open or gnome-open to work properly if I put the command in a small script and called that from gnome&#039;s preferred applications. E.g. set custom mail reader to:

/home/markb/bin/open-mailto %s

That file contains a single line:

exec xdg-open &quot;https://mail.google.com/mail/?extsrc=mailto&amp;url=$1&quot;</description>
		<content:encoded><![CDATA[<p>I should add to my comment above that I could only get xdg-open or gnome-open to work properly if I put the command in a small script and called that from gnome&#8217;s preferred applications. E.g. set custom mail reader to:</p>
<p>/home/markb/bin/open-mailto %s</p>
<p>That file contains a single line:</p>
<p>exec xdg-open &#8220;https://mail.google.com/mail/?extsrc=mailto&amp;url=$1&#8243;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark B</title>
		<link>http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/comment-page-4/#comment-80030</link>
		<dc:creator>Mark B</dc:creator>
		<pubDate>Sun, 15 Nov 2009 12:28:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/#comment-80030</guid>
		<description>In spite of all the comments and hacky scripts posted here, konsumer&#039;s post above is the best solution and probably the simplest. I&#039;d suggest to use xdg-open instead of gnome-open to keep it more general (xdg-open calls gnome-open on a gnome system anyhow). So the command is:

xdg-open https://mail.google.com/mail/?extsrc=mailto&amp;url=%s

Add a &quot;a/yourdomain.com/ before the question mark if you are a google apps user.</description>
		<content:encoded><![CDATA[<p>In spite of all the comments and hacky scripts posted here, konsumer&#8217;s post above is the best solution and probably the simplest. I&#8217;d suggest to use xdg-open instead of gnome-open to keep it more general (xdg-open calls gnome-open on a gnome system anyhow). So the command is:</p>
<p>xdg-open <a href="https://mail.google.com/mail/?extsrc=mailto&amp;url=%s" rel="nofollow">https://mail.google.com/mail/?extsrc=mailto&amp;url=%s</a></p>
<p>Add a &#8220;a/yourdomain.com/ before the question mark if you are a google apps user.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: konsumer</title>
		<link>http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/comment-page-4/#comment-78865</link>
		<dc:creator>konsumer</dc:creator>
		<pubDate>Wed, 04 Nov 2009 21:03:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/#comment-78865</guid>
		<description>bradley: I said that above.

I started using chromium, and this solution will work for whatever you set as your default browser:

gnome-open https://mail.google.com/mail/?extsrc=mailto&amp;url=%s</description>
		<content:encoded><![CDATA[<p>bradley: I said that above.</p>
<p>I started using chromium, and this solution will work for whatever you set as your default browser:</p>
<p>gnome-open <a href="https://mail.google.com/mail/?extsrc=mailto&amp;url=%s" rel="nofollow">https://mail.google.com/mail/?extsrc=mailto&amp;url=%s</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bradley</title>
		<link>http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/comment-page-4/#comment-78789</link>
		<dc:creator>bradley</dc:creator>
		<pubDate>Tue, 03 Nov 2009 07:22:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/#comment-78789</guid>
		<description>Much simpler solution:
Choose Gmail as the mailto handler in your Firefox Preferences (default option in 9.10 NBR), then set Firefox to be the Ubuntu mail handler (that is, choose Custom and point it to &quot;firefox %s&quot;). Since Firefox is configured to handle mailto: addresses correctly you no longer need a script to do anything messy, plus Firefox can now handle mailto: links on webpages internally without having to call an external script.

To set up Google Apps to work, do these steps --
Go to about:config and toggle this:
gecko.handlerService.allowRegisterFromDifferentHost

Type this into the address bar and hit enter:
javascript:window.navigator.registerProtocolHandler(&quot;mailto&quot;,&quot;https://mail.google.com/a/yourdomain.com/mail/?extsrc=mailto&amp;url=%s&quot;,&quot;YourDomain.com&quot;)

Then do the same thing as mentioned above.</description>
		<content:encoded><![CDATA[<p>Much simpler solution:<br />
Choose Gmail as the mailto handler in your Firefox Preferences (default option in 9.10 NBR), then set Firefox to be the Ubuntu mail handler (that is, choose Custom and point it to &#8220;firefox %s&#8221;). Since Firefox is configured to handle mailto: addresses correctly you no longer need a script to do anything messy, plus Firefox can now handle mailto: links on webpages internally without having to call an external script.</p>
<p>To set up Google Apps to work, do these steps &#8211;<br />
Go to about:config and toggle this:<br />
gecko.handlerService.allowRegisterFromDifferentHost</p>
<p>Type this into the address bar and hit enter:<br />
javascript:window.navigator.registerProtocolHandler(&#8221;mailto&#8221;,&#8221;https://mail.google.com/a/yourdomain.com/mail/?extsrc=mailto&amp;url=%s&#8221;,&#8221;YourDomain.com&#8221;)</p>
<p>Then do the same thing as mentioned above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: easoukenka</title>
		<link>http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/comment-page-4/#comment-77218</link>
		<dc:creator>easoukenka</dc:creator>
		<pubDate>Tue, 29 Sep 2009 04:35:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/#comment-77218</guid>
		<description>This works so that if you click something that does not have a mailto but just opening your browser &quot;aka mail-notifier&quot; it will just open gmail.  This is customized for chromium.

Thank you so much for this!

#!/bin/sh
if [ &quot;$1&quot; = &quot;&quot; ]; then
        /usr/bin/chromium-browser --app=http://gmail.com
else
	/usr/bin/chromium-browser --app=&quot;https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=`echo $1 &#124; sed &#039;s/mailto://&#039;`&quot;
fi</description>
		<content:encoded><![CDATA[<p>This works so that if you click something that does not have a mailto but just opening your browser &#8220;aka mail-notifier&#8221; it will just open gmail.  This is customized for chromium.</p>
<p>Thank you so much for this!</p>
<p>#!/bin/sh<br />
if [ "$1" = "" ]; then<br />
        /usr/bin/chromium-browser &#8211;app=http://gmail.com<br />
else<br />
	/usr/bin/chromium-browser &#8211;app=&#8221;https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=`echo $1 | sed &#8217;s/mailto://&#8217;`&#8221;<br />
fi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse</title>
		<link>http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/comment-page-4/#comment-76466</link>
		<dc:creator>Jesse</dc:creator>
		<pubDate>Wed, 09 Sep 2009 20:13:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/#comment-76466</guid>
		<description>Geek: This is a unnecessarily complicated solution.  Simpler solutions in comments above.</description>
		<content:encoded><![CDATA[<p>Geek: This is a unnecessarily complicated solution.  Simpler solutions in comments above.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marius marais</title>
		<link>http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/comment-page-4/#comment-76447</link>
		<dc:creator>Marius marais</dc:creator>
		<pubDate>Wed, 09 Sep 2009 12:33:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/#comment-76447</guid>
		<description>Using 

gnome-open https://mail.google.com/mail/?extsrc=mailto&amp;url=%s

for GMail, and 

gnome-open https://mail.google.com/a/mydomain.com/mail/?extsrc=mailto&amp;url=%s

for Google Apps mail in the &quot;Command&quot; field will automatically open the default browser and allow Google to parse the mailto link, making things like ?subject=hello!&amp;cc=someone@example.net also work correctly.  As a bonus, it also works if you aren&#039;t yet logged in.</description>
		<content:encoded><![CDATA[<p>Using </p>
<p>gnome-open <a href="https://mail.google.com/mail/?extsrc=mailto&amp;url=%s" rel="nofollow">https://mail.google.com/mail/?extsrc=mailto&amp;url=%s</a></p>
<p>for GMail, and </p>
<p>gnome-open <a href="https://mail.google.com/a/mydomain.com/mail/?extsrc=mailto&amp;url=%s" rel="nofollow">https://mail.google.com/a/mydomain.com/mail/?extsrc=mailto&amp;url=%s</a></p>
<p>for Google Apps mail in the &#8220;Command&#8221; field will automatically open the default browser and allow Google to parse the mailto link, making things like ?subject=hello!&amp;cc=someone@example.net also work correctly.  As a bonus, it also works if you aren&#8217;t yet logged in.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: smaddox</title>
		<link>http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/comment-page-4/#comment-76230</link>
		<dc:creator>smaddox</dc:creator>
		<pubDate>Thu, 03 Sep 2009 04:59:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/#comment-76230</guid>
		<description>I combined the best 2 scripts to get the following script that opens any mailto: in a new tab. Just edit preferences to  (ignoring the &#039;s), and save the following scipt to /home/[user]/mailto.sh:
***
#!/bin/bash
uri=`echo &quot;$1&quot; &#124; sed -e &#039;s/subject=/su=/&#039; -e &#039;s/^mailto:\([^&amp;?]\+\)[?&amp;]\?\(.*\)$/\1\&amp;\2/&#039;`
firefox -remote &quot;openurl(https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=$uri,new-tab)&quot;
***

Note: be sure to check that the quotations aren&#039;t fudged. When copying from the website to gedit all the quotation marks were changed to some weird unicode ones that don&#039;t function properly.</description>
		<content:encoded><![CDATA[<p>I combined the best 2 scripts to get the following script that opens any mailto: in a new tab. Just edit preferences to  (ignoring the &#8217;s), and save the following scipt to /home/[user]/mailto.sh:<br />
***<br />
#!/bin/bash<br />
uri=`echo &#8220;$1&#8243; | sed -e &#8217;s/subject=/su=/&#8217; -e &#8217;s/^mailto:\([^&amp;?]\+\)[?&amp;]\?\(.*\)$/\1\&amp;\2/&#8217;`<br />
firefox -remote &#8220;openurl(https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=$uri,new-tab)&#8221;<br />
***</p>
<p>Note: be sure to check that the quotations aren&#8217;t fudged. When copying from the website to gedit all the quotation marks were changed to some weird unicode ones that don&#8217;t function properly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Diego Lima</title>
		<link>http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/comment-page-4/#comment-75274</link>
		<dc:creator>Diego Lima</dc:creator>
		<pubDate>Thu, 13 Aug 2009 04:08:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.howtogeek.com/howto/ubuntu/set-gmail-as-default-mail-client-in-ubuntu/#comment-75274</guid>
		<description>Hello,

I improved a bit the script to support multiple ways of opening gmail (firefox new window, firefox tab, opera). Here is my modified version:

#!/bin/sh

#Get our variables from stdin
OPENIN=&quot;${1}&quot;
EMAIL=&quot;${2}&quot;

#See how we want to open gmail
case $OPENIN in
    &quot;ffwindow&quot;)CMD=&quot;firefox https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=`echo ${EMAIL} &#124; sed &#039;s/mailto://&#039;`&quot;;;
    &quot;fftab&quot;)CMD=&quot;firefox -remote openurl(https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=`echo ${EMAIL} &#124; sed &#039;s/mailto://&#039;`,new-tab)&quot;;;
    &quot;opera&quot;)CMD=&quot;opera https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=`echo ${EMAIL} &#124; sed &#039;s/mailto://&#039;`&quot;;;
esac

#Run command
$CMD</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I improved a bit the script to support multiple ways of opening gmail (firefox new window, firefox tab, opera). Here is my modified version:</p>
<p>#!/bin/sh</p>
<p>#Get our variables from stdin<br />
OPENIN=&#8221;${1}&#8221;<br />
EMAIL=&#8221;${2}&#8221;</p>
<p>#See how we want to open gmail<br />
case $OPENIN in<br />
    &#8220;ffwindow&#8221;)CMD=&#8221;firefox <a href="https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=" rel="nofollow">https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=</a>`echo ${EMAIL} | sed &#8217;s/mailto://&#8217;`&#8221;;;<br />
    &#8220;fftab&#8221;)CMD=&#8221;firefox -remote openurl(https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=`echo ${EMAIL} | sed &#8217;s/mailto://&#8217;`,new-tab)&#8221;;;<br />
    &#8220;opera&#8221;)CMD=&#8221;opera <a href="https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=" rel="nofollow">https://mail.google.com/mail?view=cm&amp;tf=0&amp;to=</a>`echo ${EMAIL} | sed &#8217;s/mailto://&#8217;`&#8221;;;<br />
esac</p>
<p>#Run command<br />
$CMD</p>
]]></content:encoded>
	</item>
</channel>
</rss>
