Manage multiple Chrome profiles - OSX

I run this shell script as an application in OSX to run multiple instances of Chrome with a fresh personal folder:

do shell script "/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --enable-udd-profiles --user-data-dir=/Users/$USER/Library/Application\\ Support/Google/ChromePersonal > /dev/null 2>&1 &" 

This is awesome - because I can CMD-TAB between instances of Chrome without clearing cookies / cache, etc.

Problem: I would like to extend the script to overlay large "2", "3", etc. on the Chrome icon for each instance in the Dock and CMD-TAB popup so I can distinguish between isntances. Now I see some Chrome.app icons.

Any ideas on how to do this? I am also open to editing the icon, however the Chrome2.app icon does not affect the Dock icon - because the dock icon comes from the original Chrome.app.

UPDATED: the problem is solved, here's How:

  • Copy-paste "Google Chrome.app" to create a copy in the Applications folder.

  • Name the copy similar to Chrome2.app.

  • Follow the instructions from Google to create Applescript based on the new copy of Google Chrome.app, now called Chrome2.application. You can call this script something like LaunchChrome2.app, etc. This will launch a new copy of Chrome with the correct (alternative) user profile, so there will be no problems with cookies.

  • Change the name of Chrome2.app and the icon of Chrome2.app to what you want to display in the taskbar and taskbar. The underlying application, not the script shortcut, defines the icon and name in OS X.

  • TA-dah.

  • Optional: set up Google Sync between two copies of Chrome so that your bookmarks, prefs, extensions remain unchanged!

+4
source share
3 answers

I use a script at http://blog.duoconsulting.com/2011/03/13/multiple-profiles-in-google-chrome-for-os-x/ that creates a new Chrome application for you in the Applications folder linked to specific profile.

After that, you can simply get the information and insert PNG as an icon. I use different colored Chrome icons and themes for each instance of Chrome.

+3
source

This is the answer to this question, including the Google Chrome help icon here . I use it and it works well. The only problem I encountered is that the profile 2 dock icon is not highlighted and a new icon for the thirtieth dock appears.

0
source

The “instructions from Google” mentioned in the question no longer talk about how to create AppleScript, so I couldn’t get it working.

I also tried the script option from @Miguel and it partially worked (thanks!), But I ran into some difficulties. The main problem is that the wrapped copy of Chrome, although independent, has its own icon and works correctly on its own, cannot open URLs sent from other applications, so it does not work with Choosy.

Here is what worked for me to get a second Chrome that can open links through Choosy, for example:

  • Copy Library/Application Support/Google/Chrome to Library/Application Support/Google/ChromePersonal to your home directory. It's not obligatory; I wanted to transfer my Chrome user profiles to a new instance. But if you start from scratch, you can skip this.
  • Copy Google Chrome.app to another location. I used /Applications/Google Chrome Personal.app .
  • Copy the wrapper.sh script file (below) into the Contents/MacOS directory.
  • Change the Contents/Info.plist in this new application to point to the shell script (set CFBundleExecutable to wrapper.sh ) and have a unique CFBundleIdentifier (just add "Personal" to the existing value).

Here is my modified wrapper.sh script file. Put it in /Applications/Google\ Chrome\ Personal.app/Contents/MacOS/wrapper.sh and then edit Info.plist, as in step 4.

 #!/bin/bash # Wrapper script that starts independent instance of Google Chrome for Mac # To use: copy Google Chrome.app to a new location. Copy this script into # the Contents/MacOS directory of the copied app. Edit the copied app's # Contents/Info.plist and change CFBundleExecutable to "wrapper.sh", # and pick a unique CFBundleIdentifier. # Instance data will be stored here. You can copy your existing data # to this location if you want to preserve your existing user profile(s). # You can also change this if you want to store the data somewhere else. INSTANCE_DIR="/Users/$USER/Library/Application Support/Google/ChromePersonal" # Find the Google Chrome binary: CHOME_BIN="$(dirname "$0")/Google Chrome" # Start Chrome exec "$CHOME_BIN" --user-data-dir="$INSTANCE_DIR" 

(full disclosure: I also posted this answer on apple.stackexchange )

0
source

Source: https://habr.com/ru/post/1345450/


All Articles