How can I launch Chrome in app mode maximized? - google-chrome

I am launching Chrome in app mode to display a local HTML file. It works as expected, except the file is not opening maximized - it is much smaller. Below is my script, and a screenshot of the unexpected result. How can I launch this maximized?
cd C:\Program Files\Google\Chrome\Application\
Chrome.exe --app="C:/folder/start.html"

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.

open "chrome://version" page in chrome from command line?

You can open a URL in chrome from the command line with
chrome.exe https://google.com
but when trying to do like chrome.exe chrome://version, it simply opens an empty page.
It seems that the chrome protects the privileged pages from abnormal behavior.
Is there any way to open the privileged pages from command line?

Chrome's --auto-open-devtools-for-tabs

I'm trying to get the devtools to open automatically when starting chrome from a shortcut with a command line switch --auto-open-devtools-for-tabs.
i.e. the path of that shortcut is: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -incognito -auto-open-devtools-for-tabs (or --auto-open-devtools-for-tabs).
But both don't seem to open the dev tools, neither does entering in the cmd chrome.exe -auto-open-devtools-for-tabs (or --auto-open-devtools-for-tabs), of course when in Chrome's folder.
Maybe I'm doing something wrong?
The command is from:
http://peter.sh/experiments/chromium-command-line-switches/#auto-open-devtools-for-tabs
https://stackoverflow.com/a/41452619/4279201
This flag only applies when you open the first chrome instance.
Close all chrome windows
Run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -incognito -auto-open-devtools-for-tabs
If you want your daily browser, with all tabs but without devtools, at the same time as you're debugging a website with devtools automatically opening, you have to run them separately.
Alternative: Stable + Beta
One example is to use example Chrome stable and Chrome beta.
"C:\Program Files\Google\Chrome\Application\chrome.exe"
"C:\Program Files\Google\Chrome Beta\Application\chrome.exe" --auto-open-devtools-for-tabs
Alternative: data-dir
"C:\Program Files\Google\Chrome\Application\chrome.exe" -incognito --auto-open-devtools-for-tabs --user-data-dir="%APPDATA%\ChromeDevOrAnyName"

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.

Run chrome in fullscreen mode on Windows

I want to configure my computer to launch Google Chrome Windows start up. It should start in full screen mode and open some web page.
I tried to run Chrome with the following command line:
chrome.exe --start-fullscreen --app=https://google.com
However Chrome opens in windowed mode, not in full screen mode.
Is there any way to run chrome in full screen mode?
Update 03-Oct-19
new script that displays 10second countdown then launches chrome/chromiumn in fullscreen kiosk mode.
more updates to chrome required script update to allow autoplaying video with audio. Note --overscroll-history-navigation=0 isn't working currently will need to disable this flag by going to chrome://flags/#overscroll-history-navigation in your browser and setting to disabled.
#echo off
echo Countdown to application launch...
timeout /t 10
"C:\Program Files (x86)\chrome-win32\chrome.exe" --chrome --kiosk http://localhost/xxxx --incognito --disable-pinch --no-user-gesture-required --overscroll-history-navigation=0
exit
might need to set chrome://flags/#autoplay-policy if running an older version of chrome (60 below)
Update 11-May-16
There have been many updates to chrome since I posted this and have had to alter the script alot to keep it working as I needed.
Couple of issues with newer versions of chrome:
built in pinch to zoom
Chrome restore error always showing after forced shutdown
auto update popup
Because of the restore error switched out to incognito mode as this launches a clear version all the time and does not save what the user was viewing and so if it crashes there is nothing to restore. Also the auto up in newer versions of chrome being a pain to try and disable I switched out to use chromium as it does not auto update and still gives all the modern features of chrome. Note make sure you download the top version of chromium this comes with all audio and video codecs as the basic version of chromium does not support all codecs.
Chromium download link
#echo off
echo Step 1 of 2: Waiting a few seconds before starting the Kiosk...
"C:\windows\system32\ping" -n 5 -w 1000 127.0.0.1 >NUL
echo Step 2 of 5: Waiting a few more seconds before starting the browser...
"C:\windows\system32\ping" -n 5 -w 1000 127.0.0.1 >NUL
echo Final 'invisible' step: Starting the browser, Finally...
"C:\Program Files (x86)\Google\Chromium\chrome.exe" --chrome --kiosk http://127.0.0.1/xxxx --incognito --disable-pinch --overscroll-history-navigation=0
exit
Outdated
I use this for exhibitions to lock down screens. I think its what your looking for.
Start chrome and go to www.google.com drag and drop the url out onto the desktop
rename it to something handy for this example google_homepage
drop this now into your c directory, click on my computer c: and drop this file in there
start chrome again go to settings and under on start up select open a specific page and set your home page here.
Next part is the script that I use to start close and restart chrome again in kiosk mode. The locations is where I have chrome installed so it might be abit different for you depending on your install.
Open your text editor of choice or just notepad and past the below code in, make sure its in the same format/order as below. Save it to your desktop as what ever you like so for this example chrome_startup_script.txt next right click it and rename, remove the txt from the end and put in bat instead. double click this to launch the script to see if its working correctly.
A command line box should appear and run through the script, chrome will start and then close down the reason to do this is to remove any error reports such as if the pc crashed, when chrome starts again without this it would show the yellow error bar at the top saying chrome did not shut down properly would you like to restore it. After a few seconds chrome should start again and in kiosk mode and will point to what ever homepage you have set.
#echo off
echo Step 1 of 5: Waiting a few seconds before starting the Kiosk...
"C:\windows\system32\ping" -n 31 -w 1000 127.0.0.1 >NUL
echo Step 2 of 5: Starting browser as a pre-start to delete error messages...
"C:\google_homepage.url"
echo Step 3 of 5: Waiting a few seconds before killing the browser task...
"C:\windows\system32\ping" -n 11 -w 1000 127.0.0.1 >NUL
echo Step 4 of 5: Killing the browser task gracefully to avoid session restore...
Taskkill /IM chrome.exe
echo Step 5 of 5: Waiting a few seconds before restarting the browser...
"C:\windows\system32\ping" -n 11 -w 1000 127.0.0.1 >NUL
echo Final 'invisible' step: Starting the browser, Finally...
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --kiosk --overscroll-history-navigation=0"
exit
Note: The number after the -n of the ping is the amount of seconds (minus one second) to wait before starting the link (or application in the next line)
Finally if this is all working then you can drag and drop the .bat file into the startup folder in windows and this script will launch each time windows starts.
Update:
With recent versions of chrome they have really got into enabling touch gestures, this means that swiping left or right on a touchscreen will cause the browser to go forward or backward in history. To prevent this we need to disable the history navigation on the back and forward buttons to do that add the following --overscroll-history-navigation=0 to the end of the script.
It's very easy.
"your chrome path" -kiosk -fullscreen "your URL"
Example:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -kiosk -fullscreen http://google.com
Close all Chrome sessions first !
To exit:
Press ALT-TAB > hold ALT and press X in the windows task. (win10)
I would like to share my way of starting chrome - specificaly youtube tv - in full screen mode automatically, without the need of pressing F11. kiosk/fullscreen options doesn't seem to work (Version 41.0.2272.89). It has some steps though...
Start chrome and navigate to page (www.youtube.com/tv)
Drag the address from the address bar (the lock icon) to the desktop. It will create a shortcut.
From chrome, open Apps (the icon with the multiple coloured dots)
From desktop, drag the shortcut into the Apps space
Right click on the new icon in Apps and select "Open fullscreen"
Right click again on the icon in Apps and select "Create shortcuts..."
Select for example Desktop and Create. A new shortcut will be created on desktop.
Now, whenever you click on this shortcut, chrome will start in fullscreen and at the page you defined. I guess you can put this shortcut in startup folder to run when windows starts, but I haven't tried it.
Running chrome.exe --start-fullscreen --app=https://google.com will not get you Chrome in fullscreen, but in kiosk mode.
However, running chrome --start-fullscreen --app=https://google.com (notice : it's chrome instead of chrome.exe) worked in my case.
You can also add --disable-session-crashed-bubble to eliminate the errors that come up after a crash or improper shutdown.
Right click the Google Chrome icon and select Properties.
Copy the value of Target, for example: "C:\Users\zero\AppData\Local\Google\Chrome\Application\chrome.exe".
Create a shortcut on your Desktop.
Paste the value into Location of the item, and append --kiosk <your url>:
"C:\Users\zero\AppData\Local\Google\Chrome\Application\chrome.exe" --kiosk http://www.google.com
Press Apply, then OK.
To start Chrome at Windows startup, copy this shortcut and paste it into the Startup folder (Start -> Program -> Startup).