17

On Windows, Google Chrome has the option to create a shortcut on the desktop for each Chrome user. For example, I have my personal Google Account and I also have my company Google Account. So, I setup Google Chrome with two users and I created two shortcuts on desktop for each user.

On Ubuntu, I also created two users and I setup my accounts. But I can't create two "shortcuts" on launcher for each user. Is that possible? Today, on Ubuntu, I have to change between the users directly on chrome. I am not complaining about this, but I am used to have more chrome shortcuts.

I can also get used in Ubuntu is this is not possible.

My versions:

  • Ubuntu 14.04 LTS
  • Chrome 35.0.1916.153
  • 1
    This page may have to command you need. If so, you you can then edit the .desktop files. peter.sh/experiments/chromium-command-line-switches – Tim Jul 8 '14 at 12:44
  • IMHO, you should complain, and that loudly, at the Chrome support forums. Programs can and do create desktop shortcuts, so it is odd that Chrome doesn't ask. – muru Jul 8 '14 at 21:36
  • Another easy option is installing chrome beta channel for personal account (sudo apt install google-chrome-beta). Should be relatively safe to use. – Madis Apr 5 at 16:54
16

It is quite simple to do this in Windows but not the same in Ubuntu.

For Ubuntu, I found two ways. Personally I recommend method 2 because you don't need to install anything. It also allows you to access the second profile from "Activities" (Ubuntu) without using any commands.

Please note that either way you choose, you have to know YOUR_PROFILE_NAME.

YOUR_PROFILE_NAME is normally Default for the first profile you created. The second profile is named Profile\ 1. The third is Profile\ 2, and so on (You can also give custom names for profiles). You can identify which profile is currently loaded by opening chrome://version inside Chrome and looking at Profile Path.

  1. Follow Filippo's answer but change the Command to:

    google-chrome --profile-directory=YOUR_PROFILE_NAME  
    
  2. Put this code in any text editor and name it anything .desktop.

    #!/usr/bin/env xdg-open
    [Desktop Entry]
    Version=1.0
    Type=Application
    Terminal=false
    Icon[en_US]=google-chrome
    Exec=google-chrome --profile-directory=YOUR_PROFILE_NAME
    Name[en_US]=Chrome-YOUR_PROFILE_NAME
    Name=Chrome-YOUR_PROFILE_NAME
    Icon=google-chrome
    

    Right-click the file. Open "Properties". Go to "Permissions" tab. Click Allow executing file as program.

    You can keep the .desktop file in ~/.local/share/applications/ so that your Application Launcher can locate it easily. Now simply press super and search for Chrome-YOUR_PROFILE_NAME (value given for Name), you will find the second profile appearing in the search results!

| improve this answer | |
  • 1
    Thanks for the good answer, I suppose this still work year and a half later. How could one figure out what the profiles are named, exactly? Are there any available commands or paths to check? And if so, please add this to the answer as it would be super handy to know this. Thank you – Denny Nov 21 '18 at 9:48
2

This is what I did to achieve the same thing:

sudo apt-get install gnome-panel
gnome-desktop-item-edit ~/Desktop/ --create-new

to create the first "Application Launcher" with the Command:

google-chrome --user-data-dir=/home/XXXXX/.config/google-chrome/Profile\ 1

Then drag the icon created from the desktop to the launcher. Repeat for the Profile 2.

| improve this answer | |
  • 1
    I did exactly what you said. The shortcut is created, but when I open Google Chrome is look like a new installation asking if I want to set Chrome as default browser. My command: google-chrome --user-data-dir=/home/rgiaviti/.config/google-chrome/Profile\ 1. I double checked the path and it's OK. – humungs Jul 14 '14 at 1:31
  • 1
    @RicardoGiaviti don't use --user-data-dir=... instead use --profile-directory=Profile\ 1 or --profile-directory=Default – Marecky May 9 '17 at 20:27
1

All the other answers have a caveat: the shortcut will open tabs or new windows and group them with the official Google Chrome shortcut.

I wanted to make the new shortcut to open windows in its own icon, so I can place both icons in my dock and easily switch between the different Chromes.

I discovered that you basically need to use the flags --class and --user-data-dir to Chrome's executable.

So I wrote a script to make this automatically and if you want to try (don't worry, it won't perform any action before you confirm -- unless you use --force), just run:

bash -c "$(curl -fsSL "https://raw.githubusercontent.com/felipecassiors/dotfiles/master/scripts/create_alternative_chrome_shortcut.sh")"

If you want to know more about it, take a look here.

The only caveat is that since it uses --user-data-dir instead of --profile-directory, the new Chrome instance will act like a fresh new. This is needed because of this bug.

In the end, you'll end up with something like this:

Check GIF here.

| improve this answer | |
0

Here's how I did it in Linux Mint, which is based on Ubuntu:

Install Chrome by whatever guide you'd like to follow. If it's already installed, that's fine.

Once Chrome is installed, copy the Chrome launcher icon to the desktop by right-clicking the Chrome icon in the 'start' menu and then selecting 'Add to Desktop"

Since you want at least two Chrome profiles that can run at the same time, duplicate the new desktop launcher icon again to create two launchers. Do this by simply right clicking the new Chrome launcher/icon on the desktop. Right click and click copy. Then moving your mouse over to a blank area of the desktop and click paste. You now have at least two Crhome icons on your desktop.

Create two folders/directories in mint. I created. /home/mint/Sync/1/ /home/mint/Sync/2/

Right click on the first icon and click Properties Edit the launcher tab to say:

/usr/bin/google-chrome-stable --user-data-dir=/home/mint/Sync/.config/google-chrome/Profile\ 1

Repeat the process and edit the second icon's launcher tab to say:

/usr/bin/google-chrome-stable --user-data-dir=/home/mint/Sync/.config/google-chrome/Profile\ 2

You'll want to rename each launcher/icon so you know which profile you're going to open up when you double click on it. Since one is for work and one is for home, I named them, very creatively, Chrome Work and Chrome Home. I renamed them by right clicking on each launcher icon and then clicking 'Rename'. You can also do this in the General tab on Mint when you are in there creating your profile on the Launcher tab.

One person replied that it looked like a whole new fresh install of Chrome, because he was missing his customizations (American spelling), I imagine. It seemed to confuse him, but that is because the original profile was stored in the default location and now the new profile folder/directory is blank. Since I already had Chrome installed, and a profile was saved to the default location (/home/mint/.config/google-chrome/Default), I deleted everything out of the default location. I then created my separate profile folder location and created the corresponding profiles as laid out above. Then I signed into each with different accounts.

This is my preferred method of using multiple profiles on Chrome, because I have to do no account switching, not adding of accounts. Each operate as if they were separately installed instances of Chrome - like you had Chrome on your system twice. You can also do this with portable versions of Chrome on Windows, Linux and I bet on on Mac. Problem is, you can't easily update a portable version of Chrome, at least not the ones I've used.

There is a very similar method to create multiple profiles on Windows. I found it only once years ago and I thank goodness I saved my notes. It also involves setting up multiple launcher icons on the desktop, or wherever you'd like, going into the properties on those icons and directing Chrome to put the profile information in locations you specify. The '--user-data-dir=' in the run command is the same in both Windows and Linux. I can't speak to Mac, but since BSD (Mac) and Linux are far more similar than not, in my uneducated opinion, I wager it works the same.

I really hope that helps, because I hate combing through forums and not finding what I want. I hope I've been thorough enough, because I hate even worse finding what I need, and the person who posted gives maybe three words, and the first always starts with 'just'.

| improve this answer | |
0

Edit the main shortcut file:

/usr/share/applications/google-chrome.desktop

The section [Desktop Entry] find the option Actions= and add your new action (use semi-colon to separate and at the end):

Actions=new-window;new-private-window;new-window-myprofile;

Create a new section with the same name given on the action above. The Name is the submenu item that will be shown.

The "Profile 1" must be the same as you get on the chrome://version/ (use it on the URL using the desired profile to configure) in the line Profile Path.

[Desktop Action new-window-myprofile]
Name=New Window as MyProfile
Exec=/usr/bin/google-chrome-stable %U --profile-directory="Profile 1"

enter image description here

On my example "as Zoop" is the Profile 1 and "as Renan" is the Profile 2

| improve this answer | |
0

Create your chrome profile folder. (You may also place them elsewhere, and ln -s them to here)

cd ~/.config/google-chrome
mkdir chrome-foo

create a start file in /usr/bin:

sudo touch  /usr/bin/chrome-foo
sudo pluma  /usr/bin/chrome-foo

in pluma (or geany or nano or vi...)

    #!/usr/bin/env bash
    google-chrome --profile-directory=chrome-foo  &  disown
    

(personally, I'd chuck in a --disable-session-crashed-bubble, too) and enable it for execution by regular users:

sudo chmod +x /usr/bin/chrome-foo

Now you can create a link to the start file:

enter image description here

You can click on the icon to change that.

... or also conveniently call the different flavors from command line:

$> chrome-foo

I personally have chrome-priv, chrome-work, chrome-dev and chrome-family to have the proper bookmarks and logins seperate, etc.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.