Enable Dark Mode on a Chromebook (Do not try this at home)


It’s been well over a year since we discovered that work is being done that would bring “dark mode” to Chrome OS. Nowadays I really thought developers would have packaged this, but apparently it has been a bigger venture than I imagined. Every time I get a Canary update, I look for “dark mode” in the hope that we can finally get a rough idea of ​​when we might see this much sought after feature. I, for one, use dark mode on every app it offers and that includes the system theme on my OnePlus 8. Unfortunately, dark mode is not yet present from even the Canary channel which is currently on version 86 of Chrome OS.

That is not to say that it will not happen in the end. Just last month, Robby discovered evidence that Google is tweaking the UI of the fingerprint setting and UI desks for Chrome OS to account for dark mode. More recently, Chrome Story’s Dinsan Francis found an add-on that adds a “dark mode” to the Chrome OS system tray. Sounds to me like the project is finally ready and developers are getting the final bits and pieces for a roll out to Canary. That’s all well and good, but you know me. I’m not happy to hear about it from another source. I love digging and thinking with Chrome OS and getting my hands on features before developers ever aim to see the light of day. That led me to a January post from reddit last year in which a user could actually turn on the dark mode of Chrome OS by adding the flags with crosh, aka the Chrome OS environment.

Crosh is actually a terminal for Chromebooks. Even without entering the non-secure development mode, you can use crosh to perform a handful of commands to do things like check your battery health or identify the kernel version on your device. Go ahead. Try it. Just type Ctrl + Alt + t on your keyboard and crosh should open in a new window. Do not worry. As long as you do not think about it, you will not break anything. By de crosh> prompt, typ battery_test 1 and hit enter. The output should show you the current charge status, battery level and battery health. There are other useful commands you can use in crosh, but we’ll deal with them another time. For now, let’s see how I turned on dark mode on my Chromebook.

Disclaimer

The following steps include placing your Chromebook in developer mode, not the developer channel. This is NO recommended and I suggest you NO Do it. For starters, entering development mode will wipe your device. Everything that is not secured will be forever. Second, the developer mode is “less secure” than Chrome OS in stock. The verified boot that makes Chrome OS less vulnerable than other operating systems has been modified and you will have root privileges that can cause irreparable damage to your device if you do not know what you are doing. When you do that, you’re on your own. From Google: Caution: Changes you make to the system will not be endorsed by Google, may cause hardware, software or security issues and may void warranty.

There you are warned. If you’ve been a developer or someone who’s often thought of your Chromebook, you’ve probably checked out that last part, but I trust you understand the risk involved. All I said was that you should not do this. You would definitely not need to put your device in development mode to do this. On that note, here’s how I turned on dark mode on my Chromebook. First I opened a crosh window and went inside shell to get where I can use root access. From there, you need to have developer access and make the root file system writable. This is done with the following commands at the shell prompt.

sudo crossystem dev_boot_signed_only=0
sudo /usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification

* The second command may cause an error. If you know your way around the terminal, you should know how to repair it. If not, you should return now.

When done, you will need to restart your device. Next, the dark mode flags should be added to the chrome_dev.config file. This can be done with Vim text editor built into crosh and many other UNIX-like systems. To open the configuration file, open another crosh window and type shell and press enter. Run the following command to open the file using Vim. It will spit out a page full of goodies. Do not panic.

sudo vi /etc/chrome_dev.conf

Arrow down to the bottom of the page until the cursor stops. To add the dark mode flags, paste the following two lines in the space below the configuration file on separate lines.

--enable-features=WebUIDarkMode
--force-dark-mode

Once you have it in place, tap on the escape key to go back to switch to command mode. Type :wq and hit enter. This will save your edits and close Vim. The you need to restart the system with the command sudo restart ui. (If you have any other work running in apps other than Windows, you will want to save it before executing that last command.) Your Chromebook will do a quick reboot and you should be greeted with the new dark mode. After taking a moment, it is clear that dark mode still has some fine-tuning to do. When you right-click on a web page, you get a nice dark mode pop-up that looks really good, but with the right-click in the app files brings up an even more extensive white menu. For the most part it looks really good, but sometimes, some elements do not display well and I found myself on the hunt for hamburger menus by clicking on dead space.