7
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

OSX版Chromeでプロファイルごとに別々のアイコンをDockに表示する

Last updated at Posted at 2015-04-06

情報元: http://apple.stackexchange.com/questions/66670/is-there-a-simple-way-to-have-separate-dock-icons-for-different-chrome-profiles

For having two Chrome running at the same time you need to create a second runnable Google Chrome App.

You can create that second application by running the following script. It comes from this site, I copy and paste for readers' convenience:

create_second_chrome.sh
#!/bin/bash

PROFILE_NAME=$1
mkdir -p "/Applications/Google Chrome $1.app/Contents/MacOS"

F="/Applications/Google Chrome $1.app/Contents/MacOS/Google Chrome $1"
cat > "$F" <<\EOF
#!/bin/bash

#
# Google Chrome for Mac with additional profile.
#

# Name your profile:
EOF

echo "PROFILE_NAME='$PROFILE_NAME'\n" >> "$F"

cat >> "$F" <<\EOF
# Store the profile here:
PROFILE_DIR="/Users/$USER/Library/Application Support/Google/Chrome/${PROFILE_NAME}"

# Find the Google Chrome binary:
CHOME_BIN="/Users/$USER/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
if [[ ! -e "$CHOME_BIN" ]]; then
  CHOME_BIN="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
else
  echo "ERROR: Can not find Google Chrome.  Exiting."
  exit -1
fi

# Start me up!
exec "$CHOME_BIN" --enable-udd-profiles --user-data-dir="$PROFILE_DIR"
EOF

sudo chmod +x "$F"

Save it in a file (let's say create_second_chrome.sh in the Desktop folder), open the shell and execute it by passing as parameter the profile folder you want to associate to the second Chrome App. It will be called Google Chrome profile_folder_name. Let's suppose Google Chrome Development:

$ chmod 755 create_second_chrome.sh
$ ./create_second_chrome.sh Development

Now you can launch the new version of Chrome (Google Chrome Development) from the ~/Applications directory. You can set a different icon by right-clicking on the app and selecting 'Get Info'. You will see that this new version has its own icon on the dock and can be docked there if needed.

7
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?