由於工做中須要同時使用我的Google帳號和公司Google帳號,全部須要能同時打開兩個賬號的Chrome瀏覽器的場景。chrome
嘗試使用不一樣的chrome髮型版本,目前mac下的髮型版本有:Stable
, Beta
, Dev
, Canary
.
可是在MacOSX裏,Stable
, Beta
, Dev
這三個版本使用的是相同的應用名稱,即三者只能保留一個。因此,Mac電腦下只能同時使用Stable
版本和Canary
版本。shell
安裝方法:瀏覽器
brew install caskroom/cask/google-chrome brew install caskroom/versions/google-chrome-canary
優勢:安裝方便,無需額外配置。
缺點:Canary
是每日構建版本,很是不穩定。本人使用過程當中遇到過啓動奔潰,網頁開發時頁面和Stable
顯示不一致等問題。app
僅使用一個版本,啓動時指定不一樣的--user-data-dir
來保存不一樣的用戶配置。編輯器
安裝方法this
brew install caskroom/cask/google-chrome // 複製一份Stable版本的應用 cp -r Google\ Chrome.app Google\ Chrome\ Work.app
建立啓動腳本(MacOSX)google
打開 Applications > Utilities > Script Editor. 輸入:code
// 修改成相應的目錄 set chrome to "\"/Applications/Google Chrome Work.app/Contents/MacOS/Google Chrome\"" set userdatadir to "\"$HOME/Library/Application Support/Google/Chrome Work\"" do shell script chrome & " --user-data-dir=" & userdatadir & " > /dev/null 2>&1 &"
Application
格式。--user-data-dir
其餘配置:ip
更換圖標:開發
If you want, you can give this application the same icon as Chrome: Select the Google Chrome application and choose File > Get Info. Select the icon at the top left of the info dialog. You will see a blue highlight around the icon. Press ⌘C to copy the icon. Open the info dialog for the new application and select the icon in the top left. Press ⌘V to paste the copied icon.
優勢:能夠都使用穩定版。
缺點:配置麻煩,還須要額外建立啓動腳本。