title: Starting default application for a file on Linux
body: <p>I'm working on a Firefox NPAPI plugin + XPCOM component. I've run into a dilemma: Given a file downloaded from the Internet (say a PDF or PNG) how do I start the default helper application to display that file on Linux using C/C++?</p>
  
  <p>Currently I'm using the <code>system</code> function call to invoke the <code>gnome-open</code> command and passing it the file path. This works on GNOME Desktops, however it won't work across Linux platforms with different desktop environments (including KDE).</p>
  
  <p>So my question is: Is there a standard uniform method to go about this? Are there any recommendations? Any help would be greatly appreciated!</p>