Google-chrome – Force Chrome to open new pages in new window, not tab? (when opened from a program)

browsergoogle-chrome

Whenever I click a link from something like outlook or a program opens a web page (not when I click a link from within chrome). It opens up in Chrome since it is my default browser but if I already have a page open it will open in a new tab on that same window. I can't tell you how many times I forget about this and close the window out, accidentally losing the other tab too. Ofcourse, I can open a new chrome window and find it under recently closed tabs but I would really just prefer if they opened in their own window so I can prevent this.

Best Answer

Problem

For Linux, if you have multiple VNC servers, this same problem will occur.
That is,

$ google-chrome
Created new window in existing browser session

And no google chrome window will appear in the current X VNC session (a new tab will appear in the X session with the first instance of google-chrome).

Solution

A simple workaround is to run

$ google-chrome "--user-data-dir=${HOME}/.google-chrome/session${DISPLAY}"

This sets a unique user directory based on the X VNC instance in use. The user directory will be created as needed. The new google-chrome process will display within the current X VNC session.

Tested using Google Chrome version 22 on Ubuntu 12.04.

Related Question