简体   繁体   English

如何为linux中的每个chrome用户创建快捷方式?

[英]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.我正在使用具有多个 email 帐户的 google chrome,因此 chrome 用户功能对我非常有用。 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.我很容易为 windows 10 中的每个用户创建快捷方式。但我似乎很难在帐户中打开 chrome 然后切换到我想要使用的帐户。 It would be much helpful if the chrome users with their respective user pictures can be pinned in the dock.如果可以将带有各自用户图片的 chrome 用户固定在扩展坞中,那将非常有帮助。 I'm using Pop OS 20.04 LTS.我正在使用 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 .首先你需要导航到 chrome 数据目录,默认是${HOME}/.config/google-chrome There you could find folders that stores different profiles, for instance Profile 1 .在那里您可以找到存储不同配置文件的文件夹,例如Profile 1 Knowing directory names chrome can be executed with profile directory as follows:知道目录名称 chrome 可以使用 profile 目录执行如下:

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".知道正确的命令创建所需的应用程序启动器(我想你可以弄清楚)并可选择将其放入${HOME}/.local/share/applications以从“开始菜单”访问它。

First you need to create a folder.desktop file in.local/share/applications.首先你需要在.local/share/applications 中创建一个folder.desktop 文件。 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.将 PROFILE_NAME 替换为您自己的个人资料名称。 then right click the file and go to properties>permissions and allow execute file as program.然后右键单击文件和 go 到属性>权限并允许将文件作为程序执行。 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.现在按 windows 按钮并搜索您的 PROFILE_NAME。在那里您可以看到您的个人资料名称。将其添加到您的收藏夹并打开该文件。如果 chrome 要求设置您的个人资料,请第一次设置您的个人资料,然后每次单击在该图标上,它将打开您的个人资料。 In this way you can create icons for multiple chrome profiles.通过这种方式,您可以为多个 chrome 配置文件创建图标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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