Sign bash script to use with "OPEN WITH" in FyleTipes

Hi all

I have a little issue and i want ask something:

Can i sign a bash script to open a determined file type?

Currently as you can see in the screenshot it alert an error about the signature.

Thanks in advance guys.


1 Like

Have you checked the betips site? » Suchergebnisse » filetype


Yes, after your message, but I haven’t found the answer :melting_face:

Anyway thanks :slight_smile:

We does not have such on our knowledge base, so i does not can help here much more.

i’ve found something…

I will try later :face_with_monocle:

Ah you are using yab?

Not for this script (Bash) but i see the thing is the MIME Type, if finally i can’t solve i can convert the script into yab, just one IF, 2 alerts and some variables :slight_smile:

The thing is: When you’re trying to open a NRG file start the script.




@Calebin… Some ideas (excuse the poor “English”).

All depends on what you want to accomplish as end goal:

  • For just running arbitrary commands on selected files on your computer, I suggest using TrackRunner.

  • If you want to distribute a version of nrg2iso that shows up on “Open With…” when people select .nrg files… you’ll need a wrapper application with the proper .rdef data (signature, supported filetypes, etc) that calls you script.
    Or… you could modify nrg2iso’s main() to be a BApplication (and handling of ::RefsReceived(BMessage *msg)) and add the .rdef/.rsrc metadata to it as a regular Haiku app.

  • For double clicking script and making them start as regular apps, there’s @Pete’s xicon. See the 1.3 release, it includes source code that could help with the previous point (both in handling RefsReceived() and having a .rsrc file (can convert those to .rdef text files with rc).
    Edit: With xicon you can also drag-n-drop files into a “script icon”, and it will pass those files as arguments to your script.

Good luck!

1 Like

There is an open ticket in Trac for adding command line app support.

In addition to the links that @BiPolar gave for TrackRunner and xicon, there is also ZooKeeper and one of my other little projects NowOpen, which lets you create wrapper applications for this purpose.

Edit: By the way, one of the predefined NowOpen launchers is for Jed. You may be interested in it since I see you have it running in your screenshot.


You can. All the error is asking for is an app signature, which is just a BEOS:APP_SIG attribute of MIME type. So you could do something like:
addattr -t mime BEOS:APP_SIG application/x.vnd-calebin-nrg2isogui nrg2isogui

But that won’t really help you with your problem. You will be able to set it as preferred app for nrg files and it will be launched when double clicking one of them, but it won’t know what files it was launched with, as those are sent through a BMessage.



Thanks all for the replies!

It doesn’t work with double click as madmax said but at least i know a little bit more about BEPS:APP_SIG attr :slight_smile: