Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I wish to integrate the Gmail and Google Calendar web interfaces with Unity. This means several things.

  1. In System Info > Default Applications set firefox 'https://mail.google.com/mail/?shva=1#inbox' as the mail command. This would obviously require me to somehow add a custom command to the list of Gnome3's default applications for Mail.
  2. In System Info > Default Applications set firefox 'https://calendar.google.com' as the calendar command.
  3. When clicking on the date in the upper right, and selecting "Add Event..." run firefox 'https://calendar.google.com'.
  4. When clicking a mailto link somewhere open it in Gmail with the "To:" field set correctly. Perhaps something like firefox 'https://mail.google.com/mail/?extsrc=mailto'url=%s. Bonus points for also doing this when trying to mail a file from nautilus.

HINTS:

  • I assume that (1) and (2) are achievable through setting some kind of .desktop files in ~.local/share/applications/ but the things I tried haven't worked.
  • I also guess that (3) and (4) might require some editing of /desktop/gnome/url-handlers in gconf-editor.

EDIT: It seems that an elegant solution will finally be possible in 12.10 with integration of web apps.

share|improve this question

4 Answers 4

up vote 3 down vote accepted

1) It is the "MimeType" line in the Desktop file, containing "x-scheme-handler/mailto;" which causes the application to show up as a preferred email handler.

The Preferred Applications "Default Applications" capability is fairly well hidden in GNOME 3, as the "Default Applications" tab in the "System Info" utility.

Consider using the GNOME Gmail package. It will take care of this for you, integrating your default browser as the desktop (Gmail) mail handler. It does not handle the calendar link - that would require an additional Desktop file.

4) You won't find better mailto URL handling for Gmail than GNOME Gmail (http://gnome-gmail.sf.net). It will properly work with Naultilus "Send To...", and even supports Libre Office 'Send -> Document as Email...".

share|improve this answer
    
BTW, Google Calendar is handled by GNOME3 in 11.10 –  Extender Oct 17 '11 at 3:14

To make gmail your standard app, there is a simpler solution using the Ubuntu SW Centre. NOTE: Only works for gmail, not for Calendar!!!

Start Ubuntu SW Centre. Search for "desktop webmail" ---> install this application

after successful installation, go into the Unity Dash, type "desktop webmail" and choose "Desktop Webmail Configuration". There is only one choice to be made there: which webmail system do you prefer? In this case that will be "gmail".

Close the app, and go into System Settings, select Details > Standard Applications. Click the "E-mail" selection box > "Desktop Webmail" and you are done.

From now on, every email link clicked will start-up Gmail in your default browser.

share|improve this answer

You can install Gnome Gmail on Ubuntu Unity using the Ubuntu Software Centre Application.

Once installed, just run Gnome Gmail and check the box that says to use it as the default mail application.

Super simple :D

share|improve this answer

This is a half-baked solution to cover the transition period until a better one is available. Also good as an addition to the above. It crates a Gmail/Compose/Contacts/Calendar right-click entries on the Firefox Unity icon. Also adaptable to other browsers.

Create a custom Firefox launcher in `~/.local/share/applications/firefox.desktop' with the following it it.

[Desktop Entry]
Version=1.0
Name=Firefox Web Browser
Exec=firefox %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=firefox
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/vnd.mozilla.xul+xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;
StartupWMClass=Firefox
StartupNotify=true
X-Ayatana-Desktop-Shortcuts=Gmail;Compose;Contacts;Calendar;SafeMode

[Gmail Shortcut Group]
Name=Gmail
Exec=firefox 'https://mail.google.com/mail/?shva=1#inbox'
TargetEnvironment=Unity

[Compose Shortcut Group]
Name=Compose
Exec=firefox 'https://mail.google.com/mail/?shva=1#compose'
TargetEnvironment=Unity

[Contacts Shortcut Group]
Name=Contacts
Exec=firefox 'https://www.google.com/contacts'
TargetEnvironment=Unity

[Calendar Shortcut Group]
Name=Calendar
Exec=firefox 'https://calendar.google.com'
TargetEnvironment=Unity

[SafeMode Shortcut Group]
Name=SAFE MODE
Exec=firefox -safe-mode
TargetEnvironment=Unity
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.