Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute a program from a Chrome Extension

The Google Chrome NPAPI is being phased out.

Without using NPAPI, is there any way to allow an extension to execute a command on the local system?

like image 769
Frederik Avatar asked Nov 11 '13 22:11

Frederik


People also ask

How do I run an EXE file in Chrome?

Launch the Crossover application and click Install Windows Software. Search for your .exe file and select Unlisted (filename) > Select installer > Choose Installer Files. Your Windows file should start running.

Can you run python in a chrome extension?

Adding Python to the Chrome extensionWe have two options to add Python into a chrome extension: Method A: Include Brython in an iframe (requires server) Method B: Compile Python to Javascript using Rapydscript (best, serverless, pure extension.)


1 Answers

There is chrome.runtime.sendNativeMessage which can be used to send a message to a native application and chrome.runtime.connectNative which allows for a more persistent connection.

So, you can't directly execute a command, but you can have a native app do it for you.

You can find more info on Native Messaging in the docs.

like image 191
gkalpak Avatar answered Oct 12 '22 19:10

gkalpak