Launch a webpage from a protected shell of a ChromeBook script?

I have an AWS instance running Jupyter, which I use for general cheating and usually close it when not in use. When turned off, its IP address and DNS name change. On a Mac, I have a simple script that uses the AWS CLI to grab the current IP address of an instance and use it to open a Jupyter laptop in Chrome.

I am trying to reproduce the same features on a ChromeBook. I managed to run the shell, run AWS CLI, but I can’t figure out how to make the last bit that the URL should open in Chrome. (In other words, make the equivalent of the OSX Bash command open -a "/Applications/Google Chrome.app" http://1.2.3.4:8888 in the ChromeBook shell.

So basically I want to know how to open a custom URL in Chrome from a ChromeBook shell.

+5
source share
1 answer

My Chromium OS machine has xdg-open . If your version has this, this will be the easiest thing.

 xdg-open http://1.2.3.4:8888 

If not, you can always just call the full path to Chrome with the URL as a parameter (e.g. chrome http://... ) or consider the many options presented here .

+3
source

Source: https://habr.com/ru/post/1269655/


All Articles