Gnome

Use the following command:

gnome-open filename

This program also launches the application in the background and returns immediately.

Gnome can be detected by checking the GNOME_DESKTOP_SESSION_ID environment variable.