Skip to content

Instantly share code, notes, and snippets.

@gsitreble2019
Last active April 4, 2021 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsitreble2019/73e2871bfa28211d40ac3f8690fb2d5f to your computer and use it in GitHub Desktop.
Save gsitreble2019/73e2871bfa28211d40ac3f8690fb2d5f to your computer and use it in GitHub Desktop.
Launch Chromium with own API Keys UBUNTU linux
fix for chromium sync here... (Warning use a different account with 2FA not your main account for playing around. You do not want AI/ML ban your account forever). Just use a dummy account.
## thanks to https://gist.github.com/cvan/44a6d60457b20133191bd7b104f9dcc4
If you reached this gist because Google stopped chromium sync (1,2) you can solve this problem for Ubuntu or similar linux
Update you latest ubuntu (stable from repo)
```
apt-cache policy chromium-browser
chromium-browser:
Installed: 89.0.4389.90-0ubuntu0.18.04.2
Candidate: 89.0.4389.90-0ubuntu0.18.04.2
apt-get install chromium-browser
```
Subscribe to mailing list (as stated in gist 1). Then you just enable Chrome Sync API at https://console.cloud.google.com/apis/library/chromesync.googleapis.com
Now create all the GOOGLE_API_KEY GOOGLE_DEFAULT_CLIENT_ID GOOGLE_DEFAULT_CLIENT_SECRET keys as shown above. I used TV-and-Limited-Input-devices when Creating OAuth client ID. Not sure that matters
In ubuntu edit file:
`/etc/chromium-browser/default
`
Add lines:
```
##all these are random numbers from a cat typing my keyboard so please do try them in production if you have free time...
GOOGLE_API_KEY=AIzazUdJiNwlR6zYtNd
GOOGLE_DEFAULT_CLIENT_ID=83728372837-wn4AKjPv02YM1x4gv.apps.googleusercontent.com
GOOGLE_DEFAULT_CLIENT_SECRET=EERRN-JtEoGYoqL7xGZ6hhIxbM
export GOOGLE_API_KEY
export GOOGLE_DEFAULT_CLIENT_ID
export GOOGLE_DEFAULT_CLIENT_SECRET
```
Now either restart laptop or ideally it should source automagically.
Can any bash expert tell me why it did not work for me if I use
```
###DOES NOT WORK
export GOOGLE_API_KEY=AIzazUdJiNwlR6zYtNd
export GOOGLE_DEFAULT_CLIENT_ID=83728372837-wn4AKjPv02YM1x4gv.apps.googleusercontent.com
export GOOGLE_DEFAULT_CLIENT_SECRET=EERRN-JtEoGYoqL7xGZ6hhIxbM
#but doing it separately like above works fine
```
1. https://askubuntu.com/questions/1322559/sync-chromium-with-a-google-account-does-not-work-any-more-solutions
2. https://arnoldthebat.co.uk/wordpress/2021/02/10/important-update/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment