title: Launch a local file with default file handler from chrome packaged app (or extension)
body: <p>I'm building a launcher for internal use with a Chrome packaged app which includes links to internal resources (databases, web links, etc.).</p>
  
  <p>The problem is with local files. I want them to launch using whatever program is the default handler for them. For example, access databases open in Access, etc.</p>
  
  <p>I've tried:</p>
  
  <ol>
  <li><p>Creating a file link file:///. Nothing happens in this scenario on click and the link is not followed.</p></li>
  <li><p>I found an extension (locallinks) here: <a href="https://code.google.com/p/locallinks/" rel="nofollow">https://code.google.com/p/locallinks/</a>, which will open local file links. I've tried borrowing from that extension and passing the file link to the background script in my packaged app which would then open a new window with that url. Unfortunately, that results in a file not found, even for simple types such as text files. So obviously the local filesystem is sandboxed. Not surprising.</p></li>
  <li><p>I thought maybe it would work to pass the link to an extension to open, but in that case, the file would be opened in Chrome and if Chrome does not support it, it would attempt to download the file locally.</p></li>
  </ol>
  
  <p>The reason I'm using Chrome Packaged Apps is:
  1. This will be updated often and the Chrome Web Store update feature would make it easy to keep clients updated without having to build our own update mechanism.
  2. We can restrict installation of the app through CWS to internal users.
  3. The app would be used in a Windows, Linux and Mac environment. Obviously the file paths here would be different but since they would point to a samba share, and mount points and network share drive's are known this is an easy problem to overcome.
  4. There is additional functionality we will be building into the Chrome app in the future other than the launcher which fits very well with how Chrome Apps are designed.</p>
  
  <p>My thoughts are:</p>
  
  <ol>
  <li><p>Native Client? I have read a bit about these, but I think I would end up with the same limitations where the native client app would be sandboxed and may not actually have any better way of launching a local file.</p></li>
  <li><p>Sockets? Maybe a simple Qt app listening on a socket to launch apps? Since the Qt app would be run with user permissions, and the socket would only accept connections from localhost, I guess the socket could in theory be used by a non-privileged app to launch something with user-level permissions. Is there a way for me to limit connections through the socket to only be accessible from my extension?</p></li>
  </ol>
  
  <p>The sockets solution isn't ideal but may work since the app would not be updated often (if ever) since functionality is so simple.</p>
  
  <p>Am I missing an obvious way of doing this that wouldn't require another component (a Qt app?)</p>