I was just wondering how files are opened in applications when the user doubles clicks the files.
I understand that it’s past in as a parameter, but how would I tell my application “Load this file” when it’s passed?
I’m just looking to see how it works really.
Thanks for your time.
Nathan.
Just as in Windows, this is entirely dependent on the application. For clicking on a file to work as you describe, the desktop environment has to be told about the association between the file and the application. It also has to be told what command line to use to invoke the applicaton.
On Linux, most GUI desktop environments start by consulting the MIME types configuration info: http://en.wikipedia.org/wiki/MIME