Linux usability question: get default programs?



I'm working on a program that includes functionality to open a file in a
default program. This is easily handled on Mac and Windows via system
commands ("open" and "start"), but I'm not aware of any standard API on
Linux for doing so. Given this (and after consulting various snippets of
code at the wiki) I'd like to get others' perspectives on these
alternative approaches in the Linux version of my app:

1. Simply popping up a dialog box each time the user selects a file to
open, prompting them to enter the command used to open the file.

2. Providing a preferences setting by which they can configure standard
helper tools, and popping up a dialog as above for less-common types.

3. Asking them to input the command, then appending that command name to
a list that is built up over time (saved to a prefs file), which they
can select from a combobox or listbox.

4. Building up an array that associates specific programs with specific
file extensions, then automatically invoking that program when the
specific file extension is found; the array would be saved to a prefs file.

These approaches are increasingly complicated for me to implement, but
increasingly easy for end users. What I'm not sure about is what the
typical Linux user's expectations are.

At any rate, I'd appreciate others' perspectives.
--
Cheers,

Kevin Walzer, PhD
WordTech Software - "Tame the Terminal"
http://www.wordtech-software.com
sw at wordtech-software.com
.



Relevant Pages

  • [PATCH 19-rc2] Fix misc .c/.h comment typos
    ... Implements an interface for i2c compatible eeproms to run under linux. ... Changed struct initializer syntax to the currently preferred notation ... ** Packet is an actual packet structure to be filled in with the packet ... -** as the command processore doesn't process the command packet in any way. ...
    (Linux-Kernel)
  • Re: [opensuse] deleting
    ... during the installation of jre 1.5.0 (according to the install ... i'm learning and having fun with my new toy, the command line interface. ... understand and use linux more efficiently. ... /bin/sh is the Bourne Shell. ...
    (SuSE)
  • Re: how i will open (from Java Application) the MS word format /html documentsin repective Applicati
    ... documentsin repective Applications in Linux OS? ... What I did in the Linux version of our product was require an external ... I create a URI object around it and use that. ... array by separating the CDE command line at the spaces, ...
    (comp.lang.java.programmer)
  • Re: Anyone Have A Better file_exists() ?
    ... > out tricks with Linux using the `command` trick, ... // Array of files to check. ...
    (comp.lang.php)
  • Re: VERY basic linux system
    ... "> I keep hearing that you can modify linux to your liking, ... 'user', but once you have a multi-tasking kernel, multi-user is pretty ... Command names are arbitary and virtually all command shells allow all ... supporting stuff, and stuff supporting the support stuff, etc. ...
    (comp.os.linux.misc)