I just want a browser window without the address bar or any menu, with just one tab.
chrome.exe --app=http://gmail.com is used. I want the macOS version for it.
It's basically the same thing in macOS. Provide the path to the Chrome binary and use the flags as normal, such as:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app=https://gmail.com
This is what I do on OSX. It should do everything you need (and a little more), however, the keyboard needs to be disconnected from the computer when used in a public space. If your website requires a keyboard then you will need an alternative solution.
1 - Close all tabs and windows in Chrome and quit.
2 - To hide menus and address bar open Chrome's plist - Applications/Google Chrome.app/Contents/Info.plist (right click on Google Chrome.app and select Show Package Contents).
3 - Add:
at the top just under:
<key>CFBundleDisplayName</key> <string>Google Chrome</string>
Save and close the plist.
4 - To launch your website in Chrome and make sure only your website can be used launch Chrome from a terminal window like so (replace yoursite.com with your actual site):
open -a Google\ Chrome --args --kiosk http://www.yoursite.com/ --host-rules="MAP * www.yoursite.com"
The site should launch fullscreen and you won't be able to navigate away from it or quite the browser using the GUI.
Note: cmd-q will function as the only way to quit Chrome. Make sure no keyboard is connected to the computer if this is in a public space.
5 - If you need to do all of the above automatically on startup then do the following. Open Automator on OSX and create a new Run Shell Script from the Library. Enter the following:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --app="http://www.yoursite.com/" --args --kiosk --host-rules="MAP * www.yoursite.com"
Save the script making sure you use .app from the dropdown in the save window. For the latest OSX, name your script .command instead of .app (I think this will be listed in the dropdown). Quit Automator.
6 - Place the compiled startup .app or .command script on the desktop. Open System Preferences > Login Options. In the Automatic login drop down choose the account to be used. Next chose the account to be used and its Login Items. Use the + symbol to add the startup .app / .command to the list (disable any startup apps that are not needed).
7 - Disable sleep and screensavers on computer (system preferences) as well as anything that might autorun in front of Chrome such as Google Drive desktop etc.
8 - To test restart the computer.