Search code examples
google-chromekiosk-mode

Open google chrome (all users installation) in kiosk mode from terminal


I execute this in order to open Google chrome in kiosk mode:

"C:\Users\Javier\AppData\Local\Google\Chrome\Application\chrome.exe" --user-data-dir=$(mktemp -d) --kiosk "url"

but, what I need to modify if google chrome is installed in Program Files(x86)? If I execute:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --user-data-dir=$(mktemp -d) --kiosk "url"

I get an error in --user-data-dir=$(mktemp -d) sentence.

Thanks in advance. Javier


Solution

  • I think there may be no elegant solution at this point. "mktemp -d" is a linux/unix command and I can't find it, or an equivalent, on windows. It may have worked at one time (I stumbled on mktemp on a microsoft development page), but on 8.1 it didn't. The error I was getting said it had to do with permissions, but that wasn't the case.

    If someone could get commands in Cygwin working at the windows command prompt then maybe the above would work. Another option may be to create something for PowerShell that does the same and plug that in there.

    "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir=c:\somedir --kiosk "some.url.here" does work though. It works from a shortcut, so it should also work from the command line, but you do lose the random temp directory.

    For my case, I just wanted some websites/web-apps to default full screen (F11) from a shortcut and I'd just Alt-F4 to close, and Alt-Tab between them and the desktop. As it is, I'm thinking I'll have to make a separate data-dir for each one I want to do.