On Sun, 12 Sep 2004 20:05:52 -0600, Michael Torrie <[EMAIL PROTECTED]> wrote:
> On Sun, 2004-09-12 at 19:51, Michael Torrie wrote:
> 
> > Honestly it sounds very dangerous to me.  If all distros had this set
> > up, then viruses and worms would propagate like crazy.  In fact doing so
> > is the same mistake that MS made.  I can just hand you a .jpg file, make
> > it executable and then you run it.  On linux, the extension doesn't
> > matter, so the file can be an elf executable.  I would strongly urge
> > against setting up any system like that.

What I'm thinking is: Most every program can be launched via the
command line, and most have an option for a file to open. What it'd do
is thke the file as an argument, and depending on it's extension put
it in as an option to the program. I could be wrong, but  I don't
think opening any given file should make it execute. For example, with
vi, I can say "vi bob.txt" and start editing, even if it's an
executable shell-script. I would make vi the program associated with
txt, and type "open bob.txt" and it would actually run "vi bob.txt".
(Bad example since it actually makes more typing...but that'd be the
idea)

> I also want to add, that if you want to set up a system to emulate the
> OS X "open" command, that's fine.  Just write a robust script that
> checks the input file with the "file" command to ensure it's the right
> type of file before handing it off to the designated handler.  

That's a good idea.

> I think
> that from a script you could interface with the Gnome or KDE mime-type
> handlers lists.  I'm actually a bit surprised that KDE and Gnome don't
> both come with a "open" command line utility that can launch apps and
> open known file types through the respective mimetype mechanisms.
> 

~Michael

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to