I have dark mode working on chrome's internal pages in Windows 10. Is it not implemented in the Ubuntu version?
I'm using chrome version 75.0. My theme is Adwaita-dark.
7 Answers
Note: as of chrome Version 78.0.3904.87 (Official Build) (64-bit) you can easliy turn chrome's internal pages to dark mode,its under chrome flags by default
- run
chrome://flagsin the url - search for dark and you should see this option
Force Dark Mode for Web Contentsjust enable it and relaunch chrome.
for those who don't have the above option under flags To enable dark mode on Ubuntu, you need to edit the google-chrome.desktop file.
If you use GNOME desktop, simply run the command below which opens up the required file in editable format. If not, open the file in a text editor of your choice
sudo -H gedit /usr/share/applications/google-chrome.desktopAll you have to do is search for two lines and add a dark mode flag in front of them.
Search for
Exec=/usr/bin/google-chrome-stable %Uand replace it with:
Exec=/usr/bin/google-chrome-stable %U --force-dark-modeSearch for
Exec=/usr/bin/google-chrome-stableand add the dark mode flag after it like this:
Exec=/usr/bin/google-chrome-stable --force-dark-mode
Once you have done these changes, simply try restarting chrome. If that doesn't work, rebooting your Ubuntu system should do the job.
For me rebooting my Ubuntu 18.04 system worked. Also note that if you update the chrome app, the changes will be gone, since the file will be overwritten.
4On my system, I have the dark mode active:
I need to do two things:
- launch the browser using
google-chrome-stable --enable-features=WebUIDarkMode --force-dark-modeand - set the browser to use the Classic option rather than GTK+ as shown in the image below. Doing so makes the choice your GTK theme irrelevant:
Use Classic, not GTK+ in chrome://settings/?search=themes
Unfortunately, not all internal pages are themed. Opening many of the urls in chrome://chrome-urls/ will confirm that. It's not clear if or when they'll ever get round to that!
2Just paste
chrome://flags in the search bar, and in the opened page, search for 'dark' and find
Force Dark Mode for Web Contents
Enable this thing, and you're done.
Now you've got the dark mode.
I made a script for it, just run:
bash -c "$(curl -fsSL "")"Output:
We will: - Create the file '/home/felipesantos/.local/share/applications/google-chrome.desktop'
Do you confirm? (Yy)y
All done.
Please make sure you fully close Google Chrome before opening a new instance.
To uninstall, run: $ rm -f /home/felipesantos/.local/share/applications/google-chrome.desktopIt currently uses the method described by DK Bose's answer, but I might change in the future if it stops working. Basically, it:
- Copies Chrome's system shortcut to the user shortcut
- Edits the options on the executable for you
There is no need to change Chrome's theme in my tests tough.
1I would highly recommend installing Dark Reader which intelligently scans the CSS of the page to keep background dark and adjust foreground colors accordingly. Here is a snippet showing dark reader in action
Original
Dark reader
Works with GTK+
- Create a new
.desktopfile using Chrome's default
cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications/google-chrome.desktop- Edit the
.desktopfile that was just created.
gedit ~/.local/share/applications/google-chrome.desktop- Search for
Execand append--enable-features=WebUIDarkMode --force-dark-modeto the end of the line each time it appears (about 3 times)
# Before
Exec=/usr/bin/google-chrome-stable %U
# After
Exec=/usr/bin/google-chrome-stable %U --enable-features=WebUIDarkMode --force-dark-mode- Restart Chrome.
Glossary
.desktop file: A shortcut to an application that will appear when searching applications. Contains config information on how the shortcut will look and how to launch the application. Any exectable can have a GUI shortcut by adding a .desktop file to ~/.local/share/applications/
Exec: The actual CLI command that launchs the application executable. Command line options can be added here.
An alternative way to emulate dark mode is here.
You can choose a theme and use that very easily to get Chrome dark.
0