Темная тема chrome linux

Enable dark mode on chrome’s internal pages

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 .

8 Answers 8

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://flags in the url
  • search for dark and you should see this option Force Dark Mode for Web Contents 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, 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.desktop 

All you have to do is search for two lines and add a dark mode flag in front of them.

 Exec=/usr/bin/google-chrome-stable %U 
 Exec=/usr/bin/google-chrome-stable %U --force-dark-mode 
 Exec=/usr/bin/google-chrome-stable 
 Exec=/usr/bin/google-chrome-stable --force-dark-mode 

Once you have done these changes, 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 and you will have to redo the steps.

Instead of modifying /usr/share/applications/google-chrome.desktop , the file can be copied into ~/.local/share/applications/google-chrome.desktop and modified without root access. This file will take precedence over the global desktop file.

Works on Lubuntu 20_04. The font is now different than before and less readable. But I am happy because I heard that this mode is fair better for my eyes.

On my system, I have the dark mode active:

Dark mode in Chrome 75

  • launch the browser using google-chrome-stable —enable-features=WebUIDarkMode —force-dark-mode and
  • 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

Use Classic, not GTK+

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!

Читайте также:  Linux оборудование при загрузке

For those who don’t want to launch Chrome from the terminal every time, you can edit the .desktop file (sudo vim /usr/share/applications/google-chrome.desktop) and add the «—enable-features=WebUIDarkMode —force-dark-mode» switches to the end of every «Exec=» line. That will make it launch in dark mode by default.

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.

This is not the system dark mode, this only emulates dark mode by inverting colors of web pages. It can break readability of some websites.

This is the only solution I’ve found that makes the Chrome Web Store and the Settings backgrounds both dark. For normal web pages you can use a plugin like Dark Reader. Works in Chromium 110 / ungoogled version.

I made a script for it, just run:

bash -c "$(curl -fsSL "https://raw.githubusercontent.com/felipecassiors/dotfiles/master/scripts/enable_chrome_dark_mode.sh")" 
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.desktop 

It currently uses the method described by DK Bose’s answer, but I might change in the future if it stops working. Basically, it:

  1. Copies Chrome’s system shortcut to the user shortcut
  2. Edits the options on the executable for you

There is no need to change Chrome’s theme in my tests tough.

I 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

Original

Dark Reader modified

Dark reader

@Jeanba for one, extensions can’t modify internal and protected pages, so Chromium settings pages will remain light.

note also that while this «intelligently scans pages», it’s not intelligent to detect when a page is already dark, making the majority of dark themes provided by the sites themselves useless

@somebody not true. You might have had issue with one or two sites. But the vast majority of sites that provide dark themes are rendered fine. It keeps them dark and legible. Thats what matters.

Works with GTK+

cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications/google-chrome.desktop 
gedit ~/.local/share/applications/google-chrome.desktop 
  1. Search for Exec and append —enable-features=WebUIDarkMode —force-dark-mode to 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 

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.

Читайте также:  Как закрыть терминал linux

Источник

How to Turn on Night Mode in Google Chrome

The Night Mode feature is now available for many applications and has been in use for quite some time. Night Mode is a darker version of an application that is intended to put less strain on your eyes and your device’s battery. That is why this mode is preferred by most users these days, because we spend almost our whole day using screens.

The Night Mode feature is available for Google Chrome, and there are multiple ways of enabling this mode. This article shows you three different methods that you can use to turn on Night Mode on Google Chrome.

Method 1: Dark Theme

To turn on Night Mode using Google Chrome’s Dark Theme, perform the following steps:

Double-click on the shortcut icon for Google Chrome located on your desktop to launch a new Google Chrome window.

Click on the three dots located at the top right corner of the newly launched Google Chrome window, as highlighted in the image below:

When you click this icon, a cascading menu will appear on your screen. Select the ‘Settings’ option from this menu, as highlighted in the following image:

In the ‘Settings’ window, click the ‘Appearance’ tab, as highlighted in the image below:

Under the ‘Appearance’ section, click on the ‘Themes’ link as, highlighted in the following image:

Now, select any dark theme of your choice from the Google Chrome Web Store. In this example, we have chosen the ‘Just Black’ theme, as shown in the image below:

Finally, click the ‘Add to Chrome’ button, as highlighted in the following image, to add this dark theme to your Google Chrome browser:

After you add this dark theme to your Google Chrome browser, Night Mode will automatically be enabled on it, as shown in the image below:

Method 2: Dark Mode Extension

To turn on Night Mode using Google Chrome’s Dark Mode Extension, perform the following steps:

Type ‘Google Chrome Web Store’ in the search bar of Google Chrome and click on the search result for navigating to the Google Chrome Web Store.

Next, type ‘dark reader’ in the search bar located at the top left corner of the Google Chrome Web Store window. ‘Dark reader’ is an extension specifically designed for enabling Night Mode. This process is highlighted in the image below:

Click the ‘Add to Chrome’ button located beside the Dark Reader extension, as shown in the following image:

After adding this extension to your Google Chrome, Night Mode will automatically be enabled on the browser.

Читайте также:  Astra linux удалить virtualbox

Method 3: System Settings

To turn on Night Mode on Google Chrome using the System Settings, perform the following steps:

Type ‘settings’ in the search section of your taskbar. Then, click on the search result to launch the ‘Settings’ window, as highlighted in the image shown below:

Now, click on the ‘Personalization’ tab from the ‘Settings’ window, as highlighted in the following image:

Select the ‘Colors’ tab from the ‘Personalization’ window, as highlighted in the image below:

Scroll down to the ‘Choose your default app mode’ section and then select the ‘Dark’ option, as highlighted in the following image. Doing this will automatically enable Night Mode for all of your applications, including Google Chrome.

Conclusion

By following any of the three methods discussed in this article, you can easily turn Night Mode on in Google Chrome. By doing so, you can save your eyes from unnecessary strain, even while spending a lot of your time on screens. You can also prevent the battery of your devices from draining quickly by using this feature.

About the author

Karim Buzdar

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. He blogs at LinuxWays.

Источник

How to Enable Dark Mode in Chrome on Ubuntu(No Code, Apps, Themes).

If you set Windows to use dark mode, Chrome will also switch to dark mode. Unfortunately, setting Ubuntu to dark mode will not automatically set Chrome as well. It’s not that straightforward, but it’s still pretty simple.

Enable Dark Mode in Chrome on Ubuntu

Step 1.

Step 2.

  • Type chrome://flags in the address bar;
  • Type “dark mode” in the search bar;
  • Select Enabled for Force Dark Mode for Web Contents.

Enabling force Dark mode in ubuntu

You’ll notice that the address bar and tabs are still in light mode. That’s because only web contents/internal pages are being rendered in dark mode, not the whole browser.

Step 3

Go to settings in Google chrome

To go full dark mode, access Chrome’s settings by clicking on the 3 vertical dots, in the top-right corner, and selecting Settings .

Step 4

Setting appearance to GTK+ in Ubuntu

Select Appearance and click on the Use GTK+ button, in the Theme section.

GTK+ is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs).

You’ll notice that Chrome has gone into full dark mode now, not just the web contents/internal pages.

That’s a Wrap!

If some info is outdated or incorrect, or you have anything to add, ask ping me via Twitter or add it in a comment section.

Источник

Оцените статью
Adblock
detector