Chrome Dark Mode Ubuntu Desktop 20.04 (or 21.04)

On Windows, when I set the system UI to "Dark mode", Google chrome automatically recognizes this and does the same, (some) modern website in turn recognize this setting aswell and also apply their own "dark theme".

For example youtube.com has settings in the top-right corner for "Appearance", one of the options is "Use device theme", which makes youtube.com dark on windows 10 (when you set windows itself to darkmode)

Is there a way to achieve this on Ubuntu 20.04? To have modern websites "read" the OS' dark / light mode settings?

And if not, is this feature added on the 21.04 Ubuntu by any chance? Because I could also just install that version.

1 Answer

For chrome specifically this is the fix:

sudo sed -i 's;/usr/bin/google-chrome-stable;/usr/bin/google-chrome-stable --enable-features=WebUIDarkMode --force-dark-mode;g' /usr/share/applications/google-chrome.desktop

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like