Cannot open Atom desktop shortcut in Cinnamon and Cairo Dock session in Ubuntu 16.04


#1

When I’m in a Unity session or GNOME session, I can open Atom by clicking its desktop shortcut (~/Desktop/atom.desktop). But if I switch to Cinnamon session or Cairo Dock session, an error message appears (image bellow) while other shortcuts work fine. I can still open by typing atom in terminal, but this makes a little inconvenient.

This is my atom.desktop

#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Atom
Comment=A hackable text editor for the 21st Century.
GenericName=Text Editor
Exec=/usr/share/atom/atom %F
Icon=atom
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Utility;TextEditor;Development;
MimeType=text/plain;

UPDATE: Solved
Just change /usr/share/atom/atom to /usr/bin/env atom