Force Safari to use one window only

SafariOne of the things that has kept me using Firefox over the last few years is Safari's insistence on opening links in new windows, rather than a new tab in the current window. It drives me nuts. I hate having multiple windows open.

Thankfully, the latest version of Safari (3.1) has a hidden feature that forces all links to open in a new tab, rather than a new window — even the stubborn sites like Google and Gmail finally stay in a single window.

All you have to do is open Terminal from your Applications/Utilities folder and enter the following:

defaults write com.apple.Safari TargetedClicksCreateTabs -bool true

Hit the enter key and you're all set.




To reverse it...

...for those would want to later, would it be this?:

defaults write com.apple.Safari TargetedClicksCreateTabs -bool false

I'm not really Terminal savvy so I like to make sure I can reverse anything I tinker with.

Thanks for the tip, I will enjoy the feature!





This is awesome! Thanks...

This is awesome! Thanks...





Couldn't you just open

Couldn't you just open Safari, go to Preferences (or click Command + ,) and under the "General" tab click "Open links from applications: in a new tab in current window"? ANd while your at it, under the "Safari" menus drop-down, select "Block Pop-Up Windows". Seems simpler than using terminal for those who don't like to mess with it.





You're reading this blog for

You're reading this blog for a reason, right? Open terminal, paste, close the program, enjoy results.





Unfortunately, no.


Couldn't you just open Safari, go to Preferences (or click Command + ,) and under the "General" tab click "Open links from applications: in a new tab in current window"

Unfortunately, no. That doesn't work all the time. If it did, there would be no reason for this tip.





Command-clicking any link in

Command-clicking any link in Safari also opens the link in a tab in your current window.

FYI.





Or you could just keep

Or you could just keep selecting 'Merge All Windows' in Safari's menu every time a new window opens...

Work With Pete!





Doesn't Work for Me!

There are plenty of sites where this just doesn't work. Tried pasting the command in the Terminal, and checking the box in General Preferences. Is this a Leopard thing? I'm on OS 10.4.11, with the latest version of Safari.





Leopard only?

Unfortunately, I don't have a machine running Tiger laying around anymore.





Works Now!

I'm not use to working with Terminal. After pasting the command, I didn't realize you have to press "Enter".





Sorry rimglow...

I should have put the "enter key" instruction in the original post. I have updated it now. Thanks for pointing it out.





Thanks for this James!

Thanks for this James!





You're welcome!

You're welcome!





Awesome thanks! Before

Awesome thanks! Before finding this tip, I had made a shortcut to 'merge all windows' but this tip is much better. Thanks!





This is still an issue in Safari 4

... the problem this lives in Safari 4, either on Mac version or the Windows version (which there is no terminal trick to solve it).

Going to the windwos merge all, it's a reactive thing not a proactive one.

Clicking the control key for every link , it's an absurd.

Waiting for Apple to fix this, since it seams not be a great thing to fix, but it's an hassle for thousands of people.





How does this work in Windows

I use windows and I'm new to all this kind of stuff... How would I force Safari to open links in a new tab on my pc? and what is Terminal? I can't seem to figure that out. thanks



Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
3 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.