How do I add a static quicklist that opens a web page?

Solution 1:

If you got a URL, just open it using the default web browser:

...
X-Ayatana-Desktop-Shortcuts=Compose

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

Or if you like to use a different browser, e.g. Chromium:

Exec=chromium-browser 'https://mail.google.com/mail/?shva=1#compose'

Chromium also allows you to open the URL in a window without toolbars:

Exec=chromium-browser --app='https://mail.google.com/mail/?shva=1#compose'

Of course this only works if you are already logged in or got a cookie. Else it will only take you to the login page.

Solution 2:

htorque's answer is correct, here's the relevant section for a final .desktop gmail file for anyone who wants to do all the Google services in one icon. Here is the final .desktop file in it's entirety.

(Make sure you modify the path to the icon to match where it is on your system)

[Desktop Entry]
Version=1.0
Name=Gmail
Exec=chromium --app="https://mail.google.com/mail"
Terminal=false
Icon=/home/jorge/gmail.png
Type=Application
Categories=Network;WebBrowser;

X-Ayatana-Desktop-Shortcuts=Compose;Contacts;Calendar

[Compose Shortcut Group]
Name=Compose New Message
Exec=chromium-browser --app='https://mail.google.com/mail/?shva=1#compose'
TargetEnvironment=Unity

[Contacts Shortcut Group]
Name=Contacts
Exec=chromium-browser --app='http://www.google.com/contacts'
TargetEnvironment=Unity

[Calendar Shortcut Group]
Name=Calendar
Exec=chromium-browser --app='http://calendar.google.com'
TargetEnvironment=Unity