Featured Posts

Adding HTML Signature to your iPhone 4 without Jailbreaking itAdding HTML Signature to your iPhone 4 without Jailbreaking... One of the features missing on the iPhone is HTML signature for Mail, and if you are using two different email addresses like me you probably want to have two different...


Play Tetris Using Mac Leopard TerminalPlay Tetris Using Mac Leopard Terminal Terminal Tetris is actually part of the Gnu Emacs and is something you should able to do on any unix system that has Emacs on it. I attached text and video instructions. To...


Automate a Remote Login Using SSH - LinuxAutomate a Remote Login Using SSH - Linux To do just that you need to create SSH Key Pair 1. we need to use ssh-agent to create an SSH key pair. To do that run this command: ssh-keygen -t rsa When prompted...


Free Google Wave InvitesFree Google Wave Invites Do you really want a Google Wave Invite but don't want to pay $$$ on eBay??? I got one for you.... The deal is: I give you an Invitation and once you get it...


Start Google Chrome in Incognito ModeStart Google Chrome in Incognito Mode I'm Using Mozilla FireFox as my default web browser But I like using Chrome for Private Browsing. Google Chrome doesn't provide an option to load Incognito by default so...


Cool Geex Rss

Google Chrome Incognito – Mac OSX Perfect Solution

Posted on : 12-17-2009 | By : Cool Geex | In : Google, Script Editor


  • Update: “Open” For leopard doesn’t have –args as option so pay attention for the differences between the two.

Aug-12-2009 I published a script that start Google Chrome in incognito mode by default.

Since than G’s of readers used my method, and now I’m releasing the perfect Mac Solution for that problem.

Inspired by Craig H from The Web Site Is Down

1st Option:

Download the DMG I Created Here: Google Chrome (Incognito) For Snow Leopard

OR This one (Google Chrome Incognito) For Leopard

2nd Option:

1. Open Apple Script Editor and paste the following code.
Snow Leopard: do shell script "open -a Google\ Chrome --new --args -incognito"

Leopard: do shell script "/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome –incognito"

2. Save & Run

Related posts:

  1. Start Google Chrome in Incognito Mode
  2. Create an Application that Start Google Chrome in Incognito Mode
  3. Snow Leopard Installation Issues
  4. Create your own list of email addresses from your inbox
  5. Place Google Voice calls directly from iPhone

How To Link To This Page?

To link to this page, simply Copy and Paste the following code to your web page.

Comments (18)

Thanks Adrian. Downloaded your app. It worked very well.

There is still room for improvement in the posted solution, so I tried to do a better solution. It’s an OS X App featuring:

* opens a new incognito window whether Chrome is open or not
* Icon does not stay in the dock when Chrome has been started
* shows the new chrome window with a blank page
* finds Chrome from every where in any location
* Chrome update resistent
* open source

You can download it including from:

Regards, Adrian.

The “perfecter” solution can be found here:

I built this Application to start Google Chrome in incognito mode.

Thanks. This was very useful.


re-check what Cool Geex Said On 12-27-2009 : it works

Google released an AppleScript dictionary for Google Chrome. Which means we can do this in a much more elegant way than before. Below please find the script I created to use the Google Chrome AppleScript dictionary.

Whenever the script is run, no matter what state Google Chrome is in, it will present the user an Incognito window. (Rather than merely caring to launch Google Chrome with an Incognito window it always handles the case where Google Chrome is already running!)

tell application “Google Chrome”
if it is running then
tell application “System Events” to set frontmost of process “Google Chrome” to true — brings application to front
set theIncognitoWindow to null
repeat with theCurrentWindow in windows
if mode of theCurrentWindow is “incognito” then
set theIncognitoWindow to theCurrentWindow
exit repeat
end if
end repeat
if theIncognitoWindow is null then
make new window with properties {mode:”incognito”}
– uncomment the below code to make new tab in the incognito when it brought to front
– make new tab at end of tabs of theIncognitoWindow
set visible of theIncognitoWindow to true
end if
activate application “Google Chrome”
close every window
make new window with properties {mode:”incognito”}
end if
end tell

I have made a new script which will not open any new instances of Chrome, but will still open New Incognito Windows.

This my first time making a script, but I think this is it:

tell application “Finder” to set tProcesses to name of processes
if (tProcesses does not contain “Google Chrome”) then
do shell script “open -a Google\\ Chrome –args -incognito”
end if

tell application “System Events”
if (tProcesses contains “Google Chrome”) then
tell application “Google Chrome”
end tell
tell process “Google Chrome”
click menu item “New Incognito Window” of menu “File” of menu bar 1
end tell
end if
end tell

the chevrons we taken as HTML tags in my last post.

the 2 includes should be

Many ways to do this. My preferred way is
*You might need to change the path to Google Chrome.app

1) mv “/Applications/Google Chrome.app/Contents/MacOS/Google Chrome” “/Applications/Google Chrome.app/Contents/MacOS/GoogleChrome”

2) compile this C code, to “/Applications/Google Chrome.app/Contents/MacOS/Google Chrome”

int main () {
execl(“/Applications/Google Chrome.app/Contents/MacOS/GoogleChrome”, “GoogleChrome”, “–incognito”, (char *)0 );
return 0;

3) now google chrome will launch in incognito all the time, without adding extra useless icons in the dock.

note new window and reclicking on the dock icon will launch plain windows, no work around for that.

I played around with it and found a way to improve the script! The problem with the do shell script above is that it will launch a new window and dock icon (which is weird) every time it is run. The following will detect an open instance of Chrome and prevent that. Thanks again for the original script, Cool Geex!

tell application “Finder” to set tProcesses to name of processes
if (tProcesses does not contain “Google Chrome”) then
do shell script “open -a Google\\ Chrome –new –args -incognito”
end if

100 thank yous for the Leopard addition!!

Did you save google.com as your home page?
This is the way that the script knows what window to close.

You can also remove the following code from the script:
tell menu bar item “Window”
tell menu “Window”
click menu item “Google”
end tell
end tell

tell menu bar item “File”
tell menu “File”
click menu item “Close Window”
end tell
end tell

*But remember it will not close the first window.

Also, I tried all that methods on Snow Leopard, If you are running Leopard it might be different.
I’ll try to find the right way for Leopard and update the post.

Max OS X: v 10.5.8

Chrome: (up to date)

I also visited your previous link and tried using that Mac method. The script was entered and compiled, and while pressing Run did open a new Incognito window, the script wouldn’t work, and I got the error:

System Events got an error: Can’t get menu item “Google” of menu “Window” of menu bar item “Window” of menu bar 1 of process “Google Chrome”.

What version of OSX & Google Chrome are you using?
I got lots of Positive feedbacks for that post.

Nope. Neither the script nor the program work, regardless of rewriting it.

Sorry–I really should have specified:

That’s the error I received after downloading your app. The very same error occurs when I try to manually write the scripts. ‘args’ appearing with one ‘-’ is just the chat, on my screen it appeared with two.

Hi DV,
Do not Copy Paste the code, Just reWrite it.
When you copy HTML and Paste it to terminal it using different character set.
You can also download the Application, this is the easiest way. (Don’t worry – it is Safe)

If you don’t want to download the App, just make sure that you write the code and that there’s 2 minus characters before new and args.
Terminal: open -a Google\ Chrome --new --args -incognito
Script Editor: do shell script "open -a Google\\ Chrome --new --args -incognito"

Good Luck


open: unrecognized option `–args’
Usage: open [-e] [-t] [-f] [-W] [-n] [-g] [-h] [-b ] [-a ] [filenames]
Help: Open opens files from a shell.
By default, opens each file using the default application for that file.
If the file is in the form of a URL, the file will be opened as a URL.
-a Opens with the specified application.
-b Opens with the specified application bundle identifier.
-e Opens with TextEdit.
-t Opens with default text editor.
-f Reads input from standard input and opens with TextEdit.
-W, –wait-apps Blocks until the used applications are closed (even if they were already running).
-n, –new Open a new instance of the application even if one is already running.
-g, –background Does not bring the application to the foreground.
-h, –header Searches header file locations for headers matching the given filenames, and opens them.

Write a comment