Change the default terminal app to open from Brave or Chrome - google-chrome

When I click on a link in Brave (or in Chrome) that prompts me to open a terminal shell. The open action defaults to the terminal application on Mac. Is there a way to change the default application so that it opens iTerm2 instead?

Related

How to open browser preview from intellij in flatpak google chrome

When I try to open browser preview in Google Chrome, I encounter this error:
Unfortunately, I have installed Google Chrome via flatpak, and there is no working installation path that I can just provide to IntelliJ.
There are two options.
If Chrome is your default browser
You can use whatever "open" command you have for URLs. In my case it's xdg-open:
If Chrome is not your default browser
You need to start it via flatpak.
First, type flatpak in "Path":
Then click on edit button and paste run --command=/app/bin/chrome com.google.Chrome in
"Command line options":
This works as I expect it to, opening new tab in existing Chrome window.
My IntelliJ is not sandboxed, it's managed by JetBrains Toolbox which in turn was semi-manually installed with this script.
Naturally, I have flatpak on PATH.

Dark theme for chrome DevTools from command line

Is there any flag which I can use to run Chrome browser from terminal, with will enable dark theme for DevTools?
How about specifying the user data directory, and pointing it to a profile that has dark theme enabled?
Just worked on my Mac:
--user-data-dir ~/Library/Application\ Support/Google/Chrome\ Canary/Profile\ 4
See How to specify command line flags for those who don't know how to launch Chrome from the command line.
Open a profile and go to chrome://version to see the location of that user profile directory (under Profile Path).

How to open chrome://inspect devices using command prompt

I want to open chrome://inspect from windows command prompt.
Here my use case is I want to open the chrome browser from command prompt(using ProcessBuilder in java) and chrome://inspect link so i can see the devices attached to my system
so i tried opening chrome://inspect using this command
start chrome chrome://inspect which is not working
if I replace chrome://inspect with any url it's working.
Can any one let me know how to do this from command prompt or any other possible ways to do this
Chrome URLs can't be opened from the command line. They must be typed by a user into the omnibar.

Chrome app window only

Is it possible to launch a Chrome app without having the Chrome Browser appear?
In other words can the browser run in the background and launch a chrome application?
Yes, if the app creates its own window then just run it from the Chrome app launcher or make the shortcuts on desktop / startmenu / taskbar: open chrome://apps/ page (it can be opened from the new tab page), right-click the app, click Create shortcuts.
To run the app using command line use the app ID (to get it first create a shortcut as described above and simply copy the command line from the shortcut's parameters, or you can copy it from the webstore page of the app), here's a Windows command line using start which automatically finds the installed Chrome executable:
start chrome --app-id=pelimflkpjiicnajdjcmekpioacmahkh
P.S. The app must be installed in the browser.

Chrome won't allow local camera access

I'm trying to test out some code for accessing a webcam on an HTML page and Chrome doesn't seem to allow me to. I made an exception for the file and yet everytime I reload (which it tells me will put the settings in effect) it goes back to blocking it
Go to:
chrome://flags/#unsafely-treat-insecure-origin-as-secure
Add your url there and enable this flag, relaunch and it should work.
You can open chrome with the flag disable-web-security
For Mac, in terminal:
open -a /Applications/Google\ Chrome.app/ --args --disable-web-security
For a PC in console:
chrome.exe --disable-web-security