Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to register a python script with mac OSX as a web browser

I have a python script that accepts URLs and displays them and I want to register it with the operation system (mac OS El Captain/Sierra), so that the script shows up in the list of possible Default web browser (in the General pane of the System Preferences).

I assume I have to turn the script into an app (e.g. via Platypus) and then modify the application bundle's Info.plist file or another config file. But what key do I have to set? And how does this the registern with the system?

Note: I do not want to register the script for a new URI protocol, just add the script to the possible Default browsers which handle HTTP, etc...

like image 403
halloleo Avatar asked Oct 24 '25 12:10

halloleo


1 Answers

Platypus itself can do this! In the main Settings window

enter image description here

select Accepts Dropped Items. Then press the newly appearing Settings Button and in the Drop Settings dialog

enter image description here

check Register as URI scheme handler and add the desired URI scheme(s). Run the generated app at least once and then it should appear in the list of possible Default web browsers.

like image 50
halloleo Avatar answered Oct 26 '25 01:10

halloleo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!