简体   繁体   中英

How to create shortcuts for each chrome user in linux?

I'm using google chrome with multiple email accounts and hence chrome users feature is so useful to me. It was easy for me to create shortcuts for every user in windows 10. But it seems difficult for me to open chrome in an account and then switching to the account which I want to use. It would be much helpful if the chrome users with their respective user pictures can be pinned in the dock. I'm using Pop OS 20.04 LTS. Are there any commands for enabling it? or any tricks?

First you need to navigate to chrome data directory, default is ${HOME}/.config/google-chrome . There you could find folders that stores different profiles, for instance Profile 1 . Knowing directory names chrome can be executed with profile directory as follows:

google-chrome --profile-directory="Profile 1"

Do not use full path, give directory name only.

Knowing correct command create desired application launcher (I guess you can figure it out) and optionally put it to ${HOME}/.local/share/applications to access it from "start menu".

First you need to create a folder.desktop file in.local/share/applications. There you can paste this code

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=google-chrome
Exec=google-chrome --profile-directory=PROFILE_NAME
Name[en_US]=Chrome-PROFILE_NAME
Name=Chrome-PROFILE_NAME
Icon=google-chrome

Replace PROFILE_NAME with your own profile name. then right click the file and go to properties>permissions and allow execute file as program. Now press windows button and search for your PROFILE_NAME.There you can see your profile name.Add that to your favorites and open that file.If chrome asks for setup your profile,set you profile for the first time and after that every time you click on that icon it will open your profile. In this way you can create icons for multiple chrome profiles.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM