Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Can't use my own script as an application for a given media type.

  • 1 reply
  • 0 have this problem
  • 1 view
  • Last reply by srn4

more options

I need to call an executable script that I wrote when I click on a link to a file of a certain file type. I used to be able to browse to my script in order to set it as the desired application, but now I can't find any way to persuade Firefox to call my script when, for example, the linked-to file's name ends in '.dng'. Where is the list of such applications, and how do I add my script to it?

I need to call an executable script that I wrote when I click on a link to a file of a certain file type. I used to be able to browse to my script in order to set it as the desired application, but now I can't find any way to persuade Firefox to call my script when, for example, the linked-to file's name ends in '.dng'. Where is the list of such applications, and how do I add my script to it?

All Replies (1)

more options

I figured out a way around the lack of a browse button when choosing an application wherewith to open a media file (I'm running Firefox 128.10.0esr (64-bit) in Linux):

(1) Write your script and make it executable. It must receive the path of the file to be opened as its first argument (and there won't be any other arguments when Firefox calls it).

(2) Click on a link that targets a file of the type you want to associate with an app.

(3) You'll be asked what to do with the file. Pick any application in the list of apps that can open files according to your Firefox. (This is where there used to be a Browse button but it's gone now, so you can't pick your own script, alas. But press on.)

(4) In Firefox, Settings -> General -> Applications, you see a table of "content types" and "actions". One such pair is the one you just added. You want to change the "action" to the path of your script. Basically this is a matter of selecting "Other" a few times until a filesystem browser finally appears. Use the browser to select your script.

Comment: If the Browse button was removed for security reasons, then why is the ability to browse still supported in this weird UX-around-the-barn inconsistency? The ability to *conveniently* specify a script is actually an accessibility issue. Bring back the Browse button!

Helpful?

Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.