2

I have installed the Chrome SSH client in my Chrome browser.

How can I make the application association for "chrome-extension://" to the Chrome browser?

I would like to execute this command in Terminal to run application.

open chrome-extension://pnhechapfaindjhompbnflcldabbghjo/html/nassh.html

Here is my current workaround:

SSH_APP=chrome-extension://pnhechapfaindjhompbnflcldabbghjo/html/nassh.html
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome $SSH_APP
  • Well, you can always hold command and double click a link in Terminal, and it should open. When attempting your link (with the double click method), I got a "There is no application set to open the URL chrome-extension://pnhechapfaindjhompbnflcldabbghjo/html/nassh.html" error, which leads me to believe that apps outside of Chrome don't recognize the chrome-extension URL scheme. – ruddfawcett Aug 3 '16 at 5:50
  • I added a solution similar to yours, (but with a lot less typing) to my original answer below. – ruddfawcett Aug 5 '16 at 19:06
2

It's not possible, as the problem is not within Terminal, but rather in Chrome.app's URL scheme. Chrome does not outwardly expose the chrome:// and chrome-extension:// URL schemes, handling them internally (when you access chrome://history, chrome://settings, etc.).

For example, open chrome:// does not work in Terminal:

The file /Users/user/chrome: does not exist.

Yet, typing open twitter:// in Terminal causes the Mac Twitter app to open on my machine.


However, you can use a bash alias to achieve a similar effect, with an even easier shortcut:

alias chrome_ssh="chrome-extension://pnhechapfaindjhompbnflcldabbghjo/html/nassh.html /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"

Add the above to your ~/.bash_profile.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .