Desktop shortcuts are actually files that tell what to execute/show/do where, among other things. There can be different "standards" (for example different desktop environments could use their own kinds of 'desktop shortcuts' that didn't work elsewhere), but nowadays there are some agreed standards that at least the biggest desktop environments try to obey. Therefore KDE-made shortcuts should work in Gnome and vice versa.
The content of a desktop shortcut, which is a plain-text file, could be something like this (the file is called
something.desktop, of which your desktop environment kindly hides the
.desktop part, so the icon shows up just as
something for you.):
Code:
[Desktop Entry]
Comment=
Encoding=UTF-8
Exec='/path/to/some/nice/executable'
GenericName=Some nice executable
Icon=/usr/share/pixmaps/someniceicon.png
MimeType=
Name=A Nice Thing
Path=/path/to/some/nice/
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=
It's just made so that when your desktop environment finds a .desktop file, it reads it trough and handles it as a "desktop shortcut", reading the information from the file and working with it as configured.