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.
10 Answers
Problem
For Linux, if you have multiple VNC servers, this same problem will occur.
That is,
$ google-chrome
Created new window in existing browser sessionAnd 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.
3There doesn't appear to be a user-friendly option to change this inside Chrome (presumably because most people prefer the new tab).
However, you can change this manually by editing the command specified in your Windows registry used to open an http url.
To do this, open regedit and:
- Go to
HKEY_CLASSES_ROOT\http\shell\open\command - You should see one key, named
(Default). Double click this to get an editing popup. - At the end of the
Value data:field you should see the text-- "%1". Change this to--new-window "%1".
That will instruct Windows to open all http links in a new window of Chrome instead of a new tab.
Presumably, the same general idea is true for Mac and Linux, but I don't know offhand where they store the command to open urls.
10Mike Hardy posted a solution for Mac OS X. I'm using it in 10.7 Lion and it works fine.
The solution involves a small AppleScript application:
on open location theURL tell application "/Applications/Google Chrome.app" make new window activate set URL of active tab of first window to theURL end tell
end open locationSetting this application as your default browser will cause external program links to open in a new window in Chrome.
2Updated for Windows 7 pro x64 , following Cerin above -
Go to HKEY_CLASSES_ROOT\ChromeHTML\shell\open\commandYou should see one key, named (Default).Double click this to get an editing pop-up.
Change the key value from :
["C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -- "%1"]to
["C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --new-window "%1"] 2 In case any Linux users are wondering the same thing, I did this by copying /usr/share/applications/chromium.desktop to ~/.local/share/applications and then editing it as follows:
--- /usr/share/applications/chromium.desktop 2012-08-10 17:02:01.000000000 +0100
+++ /home/sam/.local/share/applications/chromium.desktop 2012-08-23 10:33:21.987359591 +0100
@@ -128,7 +128,7 @@ Comment[zh_CN]=访问互联网 Comment[zh_HK]=連線到網際網路 Comment[zh_TW]=連線到網際網路
-Exec=/usr/bin/chromium %U
+Exec=/usr/bin/chromium --new-window %U Terminal=false X-MultipleArgs=false Type=ApplicationIf you're using the Debian chromium package, and you don't mind setting this as the default for all users on the system, you can instead edit /etc/chromium/default and add --new-window to the CHROMIUM_FLAGS variable.
You can use the "New Tab, New Window" extension for this. They way it works is moving the newly created tab quickly to a new window. So there is a bit of redrawing, but it does work pretty well (for me at least).
Note, as @John mentions below, this extension makes the default behavior for all new tabs (even ones created from inside Chrome).
2the answer by Cerin above is the good one but there is an edit needed: the proposed key to change is not specific to Chrome and varies according to the logged-in user. this is the working solution:
- Go to
HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command - You should see one key, named (Default). Double click this to get an editing popup.
- Change the key value into
"C:\Program Files\Google\Chrome\Application\chrome.exe" --new-window "%1".
This command line option should work for you
chrome --new-window 1 For Linux
cp /usr/share/applications/chromium.desktop ~/.local/share/applicationsAnd then edit ~/.local/share/applications/chromium.desktop, change Exec to below
Exec=chromium "--profile-directory=Default --new-window" %U For the HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command method, note that this will NOT work if Chrome is not already running, at least for me, using win 10.0.19042.8404, Chrome 89.0.4389.90 64bit.
If Chrome is already running, the method works. But if Chrome is not yet running, and if you have Chrome set to for example "open where you left off" the new url will still open in a new tab on an existing window.
I verified that the command that Windows used to open Chrome in that situation does indeed contain the --new-window switch. That may be a bug in Chrome, or it might be intentional for god only knows what reason. It's probably a bug imho related to how Chrome deals with restoring the session.
You can test it by simply running Chrome from a command line with the switch, when Chrome is not currently running.