I want to open a specific URL in chrome via terminal in windows. I can open chrome via terminal by going to the directory where chrome is installed and calling chrome.exe in the terminal. And it opens a new window in Chrome.
But, how to open a URL in chrome through terminal, via some passed arguments in terminal??
Related
I know how to Start chrome in insecure mode via command line with these options: --disable-web-security --disable-gpu. How can I do it in MAC OS?
So i am going inside the location where chrome is installed and running this command
chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security
But it is throwing error zsh: command not found: chrome.exe
If you are on a Mac, this is the correct command (Mac does not open .exe files):
open -a "Google Chrome" --args --disable-web-security --user-data-dir=/tmp/chrome
You need to specify both arguments for the command to work. The first one to disable web security and the second one to specify a folder where Chrome will create the temporary profile and keep the necessary data.
The code command has been executed and the environment variables have been configured, but I won't open VsCode directly when My current interface is a browser
If the current interface is not a browser, it can be opened
I'm using Windows 10 and my default browser is Chrome. If I go to the Firefox directory (C:\Program Files (x86)\Mozilla Firefox) and open the command prompt and type:
ipython notebook --browser='firefox'
then the notebook opens as expected. However if I navigate to the folder which contains my files and try to do something like:
ipython notebook --browser='C:\Program/Files/(x86)\Mozilla/Firefox\firefox'
then it does not launch. The error is "No web browser found: could not locate runnable browser". I have tried many variations of this with no success. This was brought up in a similar thread a couple years ago (Launch IPython notebook with selected browser) with no resolution that I could see.
I'm trying to open an iMacro from the mac terminal. I have the following:
open -a Firefox imacros://run/?m=#Current.iim
This however tries to read the link as a file on my computer. Is there anyway to say that this is a link and not a file. If I run imacros://run/?m=#Current.iim right on the browser it works fine.
In Behat testing you have an context to "show last response" of a step in test scenario. This fires up a browser window with static html of last response. But running this on mac os returns an error:
sh: x-www-browser: command not found
Any idea how to setup this command to a specific browser (e.g. chrome)?
So, in a terminal on my Mac, (OSX 10.5.8), I type:
open -a Firefox
and Firefox opens up.
When I type:
open -a opera
Opera opens up. Is this what you were looking for?
If you want the default browser to open up a web page for you, you can type:
open http://foobar.com
Reference for the more general solution.
CHEERS
Try AppleScript to control the browser, using the osascript command line tool. man osascript
More here: https://stackoverflow.com/a/7276138