6

I am trying to load Google Chrome in kiosk mode on OSX using the answer that was given here Start Google Chrome on Mac with command line switches

But, when I run it from the terminal, it spits out a bunch of text and then opens up Google Chrome normally and not in kiosk mode. Any ideas?

Here is the text it pops up when it starts:

objc[46671]: Class WorkerPoolObjC is implemented in both /Applications/Google Chrome.app/Contents/Versions/7.0.517.44/Google Chrome Helper.app/Contents/MacOS/../../../Google Chrome Framework.framework/Google Chrome Framework and /Applications/Google Chrome.app/Contents/Versions/7.0.517.44/Google Chrome Framework.framework/Internet Plug-Ins/PDF.plugin/Contents/MacOS/PDF. One of the two will be used. Which one is undefined.

2

3 Answers 3

7

The messages you see are not an error. A framework is included twice in the bundle (once for Chrome, once for Chrome helper), and it tells you.

I tested the --kiosk and -kiosk arguments with both current Chrome and a build of Chromium from today and it never worked as written in the other thread.

I successfully passed --incognito as parameter, so if it were implemented, it would work this way.

Since the page you link to is the only information I could find on Chrome for Mac kiosk mode, I'd guess it's not yet implemented. If you read the comments over there, Andrew (the person answering) didn't test it himself, he queried the person asking for the name of the binary and perhaps just posted that and the windows command line parameter.


To start Chromium in full screen, write out the following AppleScript in AppleScript Editor:

tell application "Chromium"
    activate
    tell application "System Events"
        key down {command}
        key down {shift}
        keystroke "f"
        key up {shift}
        key up {command}
    end tell
end tell

If you use Chrome, replace "Chromium" with "Google Chrome".

Executing this script first starts Chromium, and then immediately enters full screen mode.

Testing the above script on OS X Lion, even without the new window animation enabled, didn't work. I had to add delay 0.1 to the script just after activate, so that the menu item was actually activated.

0
1

In order to get @DanielBeck's code to work, I had to add keystroke tab right before the Cmd+Shift+F. Otherwise the cursor stays in the address bar, preventing the app from achieving full-screen goodness.

tell application "Google Chrome"
    activate
    tell application "System Events"
        keystroke tab
        key down {command}
        key down {shift}
        keystroke "f"
        key up {shift}
        key up {command}
    end tell
end tell
1

See my answer on StackExchange

I was having this exact problem and found out that the --kiosk command line switch won't work for Mac OSX. So, I modified the above-mentioned applescript and combined it with a shell script that creates apps, and it works pretty well.

To workaround this on Mac OSX, you have to take two steps. (It's still kind of wonky even then, because each new tab is a new fullscreen app at least in Lion)

  1. Create an App pointing to your URL with this handy script.

  2. Take note of your app's name (replace [MyAppName] below) and create the following applescript:

    do shell script "open '/Applications/[MyAppName].app' "
    tell application "[MyAppName]" to activate
    tell application "System Events"
        keystroke "f" using {command down, shift down}
    end tell
    

    Save that applescript as an application, and run it.
    You can change the icon of your app as well. Here's how in case you didn't already know (like me. had to look it up): http://support.apple.com/kb/ht2493

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .