I have developed an application which is invoked on a button click on my website.
I was using NPAPI for this task. However recently google has deprecated NPAPI so I called my application using custom protocol handler like "myapp://"
On windows my application and handlers are working perfectly fine.
Now I want to do the same in Linux. I need to do this for CentOS preferably 7 and for Chrome web browser.
I did some research but most of the help on web is for firefox but I specifically need it for chrome. My desktop is GNOME based, kindly help please.
If you are using a PC, your windows settings will pop up. 18. In Google Settings>Site Settings>Protocol Handlers, choose Google Chrome as your default email app.
To Change Protocols Handlers in Chrome Browser: If you wish to change one protocol handler to another, then visit chrome://settings/handlers and choose the protocol handlers from the drop-down menu and click Done button.
The “Content Settings” menu is going to give you numerous complex options, so be careful what you click. In this more advanced menu, look down at the bottom section where you see “Handlers.” Select the “Manage Handlers” button there so you can add information about Gmail.
To add protocol handler myapp://
you need to add file myapp.desktop
to ~/.local/share/applications
.
It looks like this:
[Desktop Entry]
Name=myapp
Exec=/path/to/your/program %u
Type=Application
Terminal=false
MimeType=x-scheme-handler/myapp;
Exec and MimeType are very important.
Then you need to add line
x-scheme-handler/myapp=myapp.desktop
to file ~/.local/share/applications/mimeapps.list
under [Default Applications]
At the end you will probably need to type command:
update-desktop-database ~/.local/share/applications
For me it was working on all browsers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With