Chrome dark theme linux

How can I enable dark mode in Chrome?

I’m running ubuntu 19.10 and I tried to enable dark mode by running google-chrome-stable —enable-features=WebUIDarkMode —force-dark-mode in terminal then it works but gives me this and chrome would close then return to light mode when i relaunch

ERROR:child_process_sandbox_support_impl_linux.cc(79)] FontService unique font name matching request did not receive a response.

I am experiencing the same thing when I run Chrome from a terminal window. It is not affecting the way that Chrome is working and this appears to be generated by the Allow Google to run in the Background icon you see on the taskbar.

@Terrance, I pasted OP’s code into gnome-terminal in Ubuntu 19.10 and google-chrome opened in dark mode. Adding & exit to the code allows me to launch google-chrome from the terminal and to automatically exit the terminal. I can do this repeatedly and always have the browser open in dark mode. Of course, my preferred route is to bind google-chrome-stable —enable-features=WebUIDarkMode —force-dark-mode to a keyboard shortcut for convenience. So I don’t understand OP’s question. Could you please clarify your experience?

2 Answers 2

Short answer

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

Please close all Google Chrome windows to apply changes.

Explained answer

A definitive solution would be to edit Chrome’s desktop entry file so that every time you launch Chrome using the applications menu, it will run in dark mode.

A desktop entry file describes how a particular program is to be launched, and they have the .desktop extension.

Desktop files managed by your package manager are located in /usr/share/applications (they will be recreated every time the corresponding package updates) and desktop files managed by your user are located in ~/.local/share/applications — this is where you should create personal desktop entries, and desktop files here override the package manager ones.

You need to create a personal desktop entry for Chrome, so you can edit it and make changes permanent for your user. That means you have to copy the original file to your desktop entries directory.

cp /usr/share/applications/google-chrome.desktop ~/.local/share/applications/google-chrome.desktop 

Now you need to modify the Exec key inside Chrome’s desktop entry file to change the command that runs this program. The new command will start Chrome on dark mode.

You need to open ~/.local/share/applications/google-chrome.desktop on a text editor and where you find something like Exec=/usr/bin/google-chrome-stable %U change it to Exec=/usr/bin/google-chrome-stable —enable-features=WebUIDarkMode —force-dark-mode %U .

Читайте также:  Изменение владельца файла линукс

You can use sed to do this automatically:

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 

Done. Please close all Google Chrome windows to apply changes.

Источник

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.

Источник

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

Since I started having vision problems, I began using dark mode wherever possible: browsers, apps, operating systems, and so on.

If you set Windows 10 to dark mode, then Chrome will inherit that preference automatically, and it will set itself to dark mode, too.

And websites that have a dark mode version ready will use the preference set by Chrome. It’s kind of a dark mode chain reaction, which is nice.

So, since I just switched to Ubuntu from Windows 10, I wanted dark mode everywhere there, too.

Unfortunately, setting Ubuntu on dark mode won’t set Chrome as well. Thus, it’s not that straightforward as on Windows 10, and it will work a bit differently, but it’s still simple to set up.

Enable Dark Mode in Chrome on Ubuntu

As I mentioned in the title, I’m using a method that doesn’t involve coding, 3rd party apps (e.g. Gnome Tweak Tools), or themes for Chrome. I don’t like installing 3rd party stuff unless it’s really necessary.

I’m using Ubuntu Desktop 20.10, not the LTS version. Just so you know.

Now, let’s get to the main point.

Step 1

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

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

Step 2

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 3

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

As explained by someone in the comments (when they were available), 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.

If you want the scrollbar and form controls to be dark, too, then you can enable the second flag in Chrome — Web Platform Controls Dark Mode (see step 1).

All web pages will be automatically rendered by Chrome using dark mode

The flag that enables the dark mode in Chrome is implemented for all web pages, not just the ones that have a version created especially for the dark mode preference.

Normally, website owners that also want to have a dark mode design, as I do, along with the light one, create additional styles in CSS and use the @media (prefers-color-scheme: dark) feature to activate them only when dark mode is detected in Chrome or other browsers.

The porblem is that if Chrome doesn’t inherit Ubuntu’s Dark mode setting, it also doesn’t make use of @media (prefers-color-scheme: dark) feature. Firefox does, for example.

The good and the bad

So, with that flag enabled in Chrome, it means that every website that doesn’t have its own dark mode version will now have one created automatically by Chrome, using whatever color scheme it thinks it’s best.

As a user, this is good for me — and most of you, I think — because most websites don’t have a dark mode version available.

For the most part, Chrome does a good job at rendering websites in dark mode automatically. As an example, here’s my former blog, which was converted into this one, Radu.link:

As another example, here’s how it rendered my former website.

The problem is that some websites might not have good design practices, or might have some features that prevent Chrome to properly create a dark mode design automatically.

So, some websites might end up looking like this:

This is an SEO blog that I read frequently – Search Engine Roundtable.

You can see from the screenshot that the menu’s contrast is affected and there are several white spaces and sections.

This affects the readability and can be annoying for some of you, or you might think that the website is broken if you forget that you enabled the experimental flag in Chrome.

If this bothers you too much, you might want to search for other methods to enable dark mode in Chrome on Ubuntu. I’m ok with this one for now.

Do You Own a Website? You Should Implement a Dark Mode Version Soon

This dark mode flag for web contents is experimental in Chrome. This means that, at some point, it might go live in every user’s settings.

And if you don’t want Chrome to render your website using dark mode however it sees fit, add your own dark mode version, and it will use that.

Читайте также:  Удаление libreoffice astra linux

Leaving Chrome to do the job for you might also make your website look broken, as you can see from the above screenshot. That’s a scary thought.

That’s a Wrap

I hope that the tutorial was hopeful, and you like this way of enabling dark mode in Chrome on Ubuntu.

If some info is outdated or incorrect, or you have anything to add, say or ask, please contact me via Twitter or email.

About Radu

I’ve been working online, from home, for over 9 years. I learned a lot of different stuff related to websites. My main expertise is WordPress, but for some time, I started focusing more on web development.

Источник

How to Enable Dark Mode in Chrome on Ubuntu

How to Enable Dark Mode in Chrome on Ubuntu

If you are looking for a way that How to Enable Dark Mode in Chrome on Ubuntu then follow the simple steps given in this article. After doing the steps given below you’ll have forced dark mode enabled on every website on your pc. The process will be the same for Windows & Mac.

How to Enable Dark Mode in Chrome on Ubuntu

1) In the first step open Google chrome on your pc.

How to Enable Dark Mode in Chrome on Ubuntu

2) Now search for Chrome extensions & open the first result you got.

How to Enable Dark Mode in Chrome on Ubuntu

3) Now the Chrome web store will open here, type dark mode in the search bar.

How to Enable Dark Mode in Chrome on Ubuntu

4) Open the extension that you got on the first result.

How to Enable Dark Mode in Chrome on Ubuntu

5) Tap on the Add to Chrome.

How to Enable Dark Mode in Chrome on Ubuntu

6) when downloading get complete then a popup message will ask you to Cancel or Add extension . Just tap on the add extension.

How to Enable Dark Mode in Chrome on Ubuntu

7) Here you go, the Dark Mode is now enabled in Chrome on Ubuntu. Now all websites will be dark except for some exceptions.

How To Enable Dark Theme In Ubuntu

The steps given above will be going to change the web content but if you see the home page of your chrome then it’ll be very same.

So to change that to dark you’ll need to change the theme of google chrome.

1) Open google chrome, search for chrome themes.

How To Enable Dark Theme In Ubuntu

2) Click on the first search result you got.

3) Now theme section will open up here in the chrome web store.

4) Scroll down a bit & you’ll see the published by chrome section here, open the first theme which is “Just Black”. If you don’t get it then you can also search for it.

How To Enable Dark Theme In Ubuntu

5) Click on the Add to Chrome option.

6) Here you go, as you can see the homepage of google chrome it also get black as we switched to the black theme.

How To Enable Dark Theme In Ubuntu

Closing remarks

This is all on the topic of How to Enable Dark Mode in Chrome on Ubuntu. I hope it helps you if you got any issues then do tell us in the comment section, we’ll be happy to help.

Share this:

Источник

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