[haiku-development] Re: xicon and executable scripts

  • From: donn@xxxxxxxxxxx
  • To: Haiku Development <haiku-development@xxxxxxxxxxxxx>
  • Date: Sun, 3 May 2009 11:48:55 -0700 (PDT)

Hey, good to see you here!  I am not an expert in these matters, but
since it seemed like an interesting problem, a couple of inane questions
for you -

Quoth pete.goodeve@xxxxxxxxxxxx,
...
> To explain the problem, I'd better first quickly go through how xicon's
> scripts are set up, and how this works under BeOS.  First, of course, the
> script is set with xicon as the Preferred App, but in addition the 'x-bit'
> of the permissions must be set.  The latter is required so that other files
> can be dropped on it, and Tracker will pass the refs on, but it's not 
> sufficient
> by itself because Tracker wants to know which filetypes are actually relevant.
> So the attributes must include BEOS:FILE_TYPES; currently this is simply 
> always
> 'application/octet-stream', so any file can be dropped, but in theory it could
> be set to be more specific.

Do you have reason to think Haiku Tracker works that way, execute
permission allows drop?  It's easy to find the code where it uses
permissions to make the app vs. file distinction you go on to
complain about, but can't see where it uses permissions to decide
drop behavior, and empirically it doesn't look like that works
(though I may not have set all the right attributes?)

> That's all that BeOS really needs to invoke xicon, but BEOS:TYPE is normally
> set to 'text/x-script.xicon' (or a couple of other alternatives) so xicon
> knows the action to take.  The "#! /bin/sh" as the first line of a script
> is not actually needed at all, because the shell is invoked on it directly.

You mean, not needed in the particular case of /bin/sh, because that's
xicon's default?  You'd need the "shebang" line if it was Ruby, right?
Or an attribute?

        Donn


Other related posts: