Mac下多個Chrome多賬號同時運行

由於工做中須要同時使用我的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

  1. 打開 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 &"
  2. 保存腳本爲Application格式。
  3. 關閉編輯器,運行剛剛建立的腳本便可運行。用戶配置被保存到腳本中指定的--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.

優勢:能夠都使用穩定版。
缺點:配置麻煩,還須要額外建立啓動腳本。

相關文章
相關標籤/搜索