I have recently starting using google’s chrome browser on my Fedora 14 box and I love it. The browser leaves plenty of real estate for websites, it’s super fast and I love to be able to sync my bookmarks (although I have been doing this in firefox for a couple years with the help of addons).
I will move on since this isn’t a browser review. The one annoying thing I found was I could not set gmail as my default mail client which really sucked when clicking on mailto links on websites like craigslist for example.
Below is how I worked around this problem in just a few simple steps.
NOTE: This should work on ANY linux distro, I have tried it on Ubuntu and Fedora, but I will being using Fedora for the following screenshots.
First we need to know where chrome is installed.
$ which google-chrome
In our example the Chrome binary lives at “/usr/bin/google-chrome”.
Now we want to open our favorite text editor (vi, nano, gedit, whatever) and create a text file with the following contents. Replace /path/to/chrome with the path identified above.
ADDRESS=`echo $1 | sed 's/mailto://'`
Save the above in your home directory as .mailto.sh (example /home/username/.mailto.sh)
Replace username with your username!
The dot in front of the name makes it a hidden file, this just keeps your home directory tidy. You can feel free to name the file anything you like.Now we have to make the above script executable. Open a terminal and enter the following commands…
First let’s make sure you are in your home directory, run the following command:
Now let’s set the file as executable with the chmod command:
chmod u+x .mailto.sh
Now the last step is to tell linux to use this as your default mail app. Click System > Preferences > Preferred Applications. Under mail reader set the drop down to custom, and enter the path to the script file we just created.
That’s it, now when you click an email link in the browser it will open a compose email screen with the address in the TO field.Go ahead and try it, click HERE.
You may be prompt to log into GMail if your are not currently logged in.
This site uses Akismet to reduce spam. Learn how your comment data is processed.