Re: jpegs throwing up 'ambiguous filetype' dialog
- From: Phil Grundig <wdef200@xxxxxxxxxxx>
- To: emelfm2@xxxxxxxxxxxxx
- Date: Mon, 19 Jan 2009 11:19:35 +0000 (GMT)
> Not every perl script begins with #!/usr/bin/perl etc, and
> without such a line, the file is reported as ascii text.
> Ditto for .py, and I guess for .rb etc. Granted, we
> can't directly activate such a file, but it's still
> feasible for user to setup to run it as an argument in a
> command line.
>
Maybe pragmatically draw the line somewhere about how sensitive emelfm2 is to
what a file might possibly be. Either that, or find/write some other code that
probes and categorizes possible scripts (as you say, text files without an
interpreter specified in point of fact) etc as potentially executable or not -
sounds like a lot of effort that could better be expended on other parts of the
program. Personally, I'd recommend forgetting about any script that does not
specify its own interpreter. It's a text file. Anything that is going to be run
on clicking should have an interpreter specified.
Also, if I want to run ldd on a library, I'll open a shell and do it.
So in short I suspect just greping 'file' output for 'executable' is fine for
99.99% of all practical use cases.
Maybe other list members have views on this though, especially those running on
unices other than linux - maybe they could say whether 'file' behaves
differently on SunOS etc
--
Users can unsubscribe from the list by sending email to
emelfm2-request@xxxxxxxxxxxxx with 'unsubscribe' in the subject field or by
logging into the web interface.
Other related posts: