If you're on a Mac, and you want something slightly easier than having to drop down to a command shell to add the necessary flags, you can have Automator bundle a script as an app that you can then put in your dock. Here's the script I use:
https://gist.github.com/ilikepi/9d2e17e0d3b3efd6fc0584f46f09...
Note that, when run for the first time, it will request permission to talk to a couple system services. You can remove that stuff pretty easily though. You can also launch a shell script from Automator, which would have been easier but then I would not have had a chance to play with Applescript...