Enable Chrome Gemini
Overview
Use this skill to set up Gemini in Chrome on Windows, macOS, or Linux for the first time in non-US regions, or to bring it back when it was previously working and the sidebar or floating panel no longer opens.
Workflow
1. Close Chrome
- - Close every Chrome window.
- If Chrome is still running, stop here before editing profile data.
2. Patch Local State
- - Run
scripts/repair_chrome_gemini.py. - The script backs up
Local State and patches the Gemini eligibility fields. - It sets the variation country to
us, marks Glic eligibility true, keeps the glic@1 and glic-side-panel@1 experiments, and normalizes the Chrome UI language to en-US.
3. Relaunch and verify
- - Open Chrome again.
- Test
Alt + G. - If Gemini appears, the setup is complete.
4. Finish the native setup if needed
- - If Gemini still does not appear, open
chrome://flags and verify Glic and Glic side panel. - Only use the manual flags step if the underlying profile state did not take effect.
- On macOS, the Chrome profile lives under
~/Library/Application Support/Google/Chrome.
5. Confirm the result
- - Use
Alt + G one more time. - Check that the Gemini sidebar or floating panel opens on the active Chrome profile.
What The Script Changes
- - Set Chrome variation country fields to
us. - Set
glic.is_glic_eligible = true. - Keep existing Glic experiments and ensure
glic@1 and glic-side-panel@1 are present. - Set
intl.app_locale, intl.selected_languages, and intl.accept_languages to English values. - Write a timestamped backup next to
Local State.
When To Use It
- - First-time Gemini in Chrome setup outside the US.
- A fresh Chrome profile needs Gemini enabled.
- Gemini in Chrome worked before and stopped opening.
- The sidebar, floating panel, or
Alt + G shortcut no longer appears. - Chrome has the right version, but the entry is hidden or eligibility seems missing.
- A browser state from a prior tutorial or profile needs to be normalized into the native Gemini setup.
What This Skill Covers
- - Native Chrome Gemini / Glic setup.
- Windows, macOS, and Linux profile locations.
- Local State patching for region and eligibility.
- Flag and language checks that unblock the native UI.
What This Skill Does Not Cover
- - Third-party Gemini extensions.
- Non-Chrome browsers.
- Enterprise policy administration beyond detecting that policy may block the setup.
Guardrails
- - Only edit
Local State. - Do not touch unrelated Chrome profile files.
- If Chrome is still running, stop and ask the user to close it unless
--force is requested. - If the profile is managed by policy, stop and report that the fix may be blocked.
Script Usage
CODEBLOCK0
CODEBLOCK1
Use --dry-run to preview changes, --force if Chrome is already open and you want to override the safety check, and --language "" to skip language normalization.
On macOS or Linux, the script defaults to the standard Chrome profile location, so the --user-data-dir flag is optional unless you use a custom profile path.
启用 Chrome Gemini
概述
使用此技能在非美国地区的 Windows、macOS 或 Linux 上首次在 Chrome 中设置 Gemini,或在之前可正常使用但侧边栏或浮动面板无法打开时恢复其功能。
工作流程
1. 关闭 Chrome
- - 关闭所有 Chrome 窗口。
- 如果 Chrome 仍在运行,请在编辑配置文件数据前先停止。
2. 修补本地状态
- - 运行 scripts/repairchromegemini.py。
- 该脚本会备份 Local State 并修补 Gemini 资格字段。
- 它将变体国家设置为 us,将 Glic 资格标记为 true,保留 glic@1 和 glic-side-panel@1 实验,并将 Chrome UI 语言规范化为 en-US。
3. 重新启动并验证
- - 再次打开 Chrome。
- 测试 Alt + G。
- 如果 Gemini 出现,则设置完成。
4. 如有需要,完成原生设置
- - 如果 Gemini 仍未出现,打开 chrome://flags 并验证 Glic 和 Glic side panel。
- 仅在底层配置文件状态未生效时使用手动标志步骤。
- 在 macOS 上,Chrome 配置文件位于 ~/Library/Application Support/Google/Chrome。
5. 确认结果
- - 再次使用 Alt + G。
- 检查 Gemini 侧边栏或浮动面板是否在当前 Chrome 配置文件中打开。
脚本更改内容
- - 将 Chrome 变体国家字段设置为 us。
- 设置 glic.isgliceligible = true。
- 保留现有的 Glic 实验,确保存在 glic@1 和 glic-side-panel@1。
- 将 intl.applocale、intl.selectedlanguages 和 intl.accept_languages 设置为英语值。
- 在 Local State 旁边写入带时间戳的备份。
使用时机
- - 在美国以外地区首次在 Chrome 中设置 Gemini。
- 新的 Chrome 配置文件需要启用 Gemini。
- Chrome 中的 Gemini 之前可用但停止打开。
- 侧边栏、浮动面板或 Alt + G 快捷键不再出现。
- Chrome 版本正确,但入口被隐藏或资格似乎缺失。
- 需要将先前教程或配置文件中的浏览器状态规范化为原生 Gemini 设置。
此技能涵盖的内容
- - 原生 Chrome Gemini / Glic 设置。
- Windows、macOS 和 Linux 配置文件位置。
- 针对区域和资格的 Local State 修补。
- 解除原生 UI 阻塞的标志和语言检查。
此技能不涵盖的内容
- - 第三方 Gemini 扩展。
- 非 Chrome 浏览器。
- 超出检测策略可能阻止设置的企业策略管理。
安全限制
- - 仅编辑 Local State。
- 不要触碰无关的 Chrome 配置文件。
- 如果 Chrome 仍在运行,停止并请用户关闭,除非请求使用 --force。
- 如果配置文件受策略管理,停止并报告修复可能被阻止。
脚本用法
powershell
python scripts/repairchromegemini.py --user-data-dir %LOCALAPPDATA%\Google\Chrome\User Data
bash
python scripts/repairchromegemini.py
使用 --dry-run 预览更改,使用 --force 在 Chrome 已打开时覆盖安全检查,使用 --language 跳过语言规范化。
在 macOS 或 Linux 上,脚本默认使用标准 Chrome 配置文件位置,因此除非使用自定义配置文件路径,否则 --user-data-dir 标志是可选的。