23

Honestly I like working in a dark environment (Twilight on my all my editors), and recently I switched from a Windows to Linux (Ubuntu 16.04 with Unity Desktop on a PC). And being a night worker the brightness is a little harmful to my eyes.

I searched for a bit and these were some of the commands I have tried so far after realizing that the GUI is just not giving me what I need - A Dimmer Screen.

$ dconf-editor

A snap of the values of the dconf-editor.

$ add-apt-repository ppa:indicator-brightness/ppa
$ apt-get update
$ apt-get install indicator-brightness

Nothing happened after toggling the new indicator.

$ apt-get install xbacklight
$ xbacklight -set 40
$ xbacklight -set 20

Enabled Xbacklight at startup

$ ls /sys/class/backlight/

acpi_video0

I dont seem to have intel_backlight so I didn't do this last hack on my system.

$ gedit /etc/rc.local
echo 900 > /sys/class/backlight/intel_backlight/brightness

I am a little lost. I would like to know if there is any tool that I can use to decrease the brightness on the system as a whole besides this or is there something that I am missing as a Noob user?

I use Screen Dimmer for Firefox, Twilight for my Code Editors and the terminal is already black. It is the window applications like the File Viewer, Libre Office etc that needs to be dimmed down. I would consider getting a darker desktop theme also (if that is possible) as a valid answer.

Thank-you for being patient enough to read through this rather unintentionally long question.

Thomas
  • 6,223
  • ...and what's the output of ls /sys/class/backlight/acpi_video0? – mikewhatever Dec 10 '16 at 13:06
  • actual_brightness bl_power brightness device max_brightness power subsystem type uevent So I did this echo 900 > /sys/class/backlight/acpi_video0/brightness and restarted the system ... Sadly no change @mikewhatever – JustYourAverageOnion Dec 10 '16 at 13:26
  • You don't need to do what you did right away. Instead, try playing with the value a little. How do you know 900 is the value? What value is there by default, and what's in max_brightness? The command to use is: echo xxx | sudo tee /sys/class/backlight/acpi_video0/brightness, where xxx may range from 0 to 1000 – mikewhatever Dec 10 '16 at 13:52
  • There was no default value. The file was created when I opened it using the terminal. That 900 is not making sense. And I tried a bunch of numbers for the echo xxx | ... the range being 0-100. Really thanks for what you are doing here ... Makes me wanna continue using Ubuntu :) – JustYourAverageOnion Dec 10 '16 at 14:13
  • Im not sure thats what you need but you can check redshift and flux – M. Becerra Dec 10 '16 at 14:28
  • This is vary strange. Have you created all files in /sys/class/backlight/acpi_video0/? How about max_brightness, does it have a value? – mikewhatever Dec 10 '16 at 15:55
  • I used flux I'll try redshift sometime later. But Thankyou @M.Becerra – JustYourAverageOnion Dec 11 '16 at 06:24
  • This files in acpi_video0 were already there and the values were all modified by me at sometime through my tinkering. The value currently stands at 100. @mikewhatever Even at 1000 the echo 101 | ... wasn't working (I am assuming that was what you were getting at?) And thankyou for your help too (b^-^)b – JustYourAverageOnion Dec 11 '16 at 06:29

6 Answers6

21

Redshift is easy to install, and even easier to use. Just open a terminal and do sudo apt-get install redshift redshift-gtk. Once the installation is complete, click the Dash icon, type 'red' (without quotes), and click the Redshift icon. The software does the rest. Here is a link to a page with a very good introduction to redshift. (not my work) http://jonls.dk/redshift/

bford16
  • 319
13

You should've tried f.lux, a tool that will change the color temperature of your computer’s display depending on the time of day. Quote from f.lux page:

f.lux makes your computer screen look like the room you're in, all the time. When the sun sets, it makes your computer look like your indoor lights. In the morning, it makes things look like sunlight again.

Tell f.lux what kind of lighting you have, and where you live. Then forget about it. f.lux will do the rest, automatically.

To install flux, press Ctrl+Alt+T to launch terminal and type:

sudo add-apt-repository ppa:nathan-renniewaldock/flux
sudo apt-get update
sudo apt-get install fluxgui

If you don't want add ppa, but prefer .deb file:

wget https://launchpad.net/~nathan-renniewaldock/+archive/ubuntu/flux/+files/fluxgui_1.1.9~20161125-g43350e0-1~xenial_all.deb
sudo apt install ~/Downloads/fluxgui_1.1.9~20161125-g43350e0-1~xenial_all.deb

Running f.lux on my system

Note: f.lux require your location to retrieve Latitude and Longitude, so make sure fill them (longitude is optional) to get it work.

Liso
  • 15,377
  • 3
  • 51
  • 80
  • Thank you @Liso ! That helped my eyes a lot... o(^▽^)o – JustYourAverageOnion Dec 11 '16 at 06:22
  • Consider up vote post ? @JustYourAverageOnion – Liso Dec 11 '16 at 17:28
  • How does that work? I don't have reputation I think? But I will as soon as I am allowed to ? Pretty new to this place here... :) @Liso – JustYourAverageOnion Dec 13 '16 at 02:59
  • As you've never accepted an answer on this site before: If this answer helped you, don't forget to click the grey at the left of this text, which means Yes, this answer is valid! – Liso Dec 13 '16 at 03:34
  • Okay :) Sorry for not doing that awkward chuckle (๑→‿←๑) – JustYourAverageOnion Dec 13 '16 at 11:59
  • 1
    "f.lux makes your computer screen look like the room you're in" -- incorrect. If I'm in a pitch-black room during the day it will still be bright, and if I'm in a bright room at night, it will be dim. https://memesuper.com/download/a633f80f6541d45059bc680e4bd335788bf0f84f.html – wordsforthewise Mar 29 '17 at 08:49
  • I don't like this because it changes the colors. Just dim the screen so it doesn't hurt my eyes. I don't want the picture to be different depending on the time of day. – Philip Rego Feb 11 '20 at 16:58
  • This did not work for me. as the program just stayed static all the way with zero change – NMukama May 06 '21 at 03:25
  • I got an ERROR 404: Not Found response when trying the first line of the .deb installation option using Ubuntu 22.04. When trying the PPA approach, I received the error: "The repository 'https://ppa.launchpadcontent.net/nathan-renniewaldock/flux/ubuntu jammy Release' does not have a Release file." – KBurchfiel Apr 04 '23 at 21:35
6

Try Ubuntu 17.04. It has Night Light under display settings. btw I use GNOME based.

enter image description here

karel
  • 114,770
2

There are two packages already in the distribution for adjusting brightness for working at night.

Those are redshift that does the work and redshift-gtk that sits in the indicator area.

  • You can improve your answer with some screen shots and a few points on how it is setup / used. It will give people some idea of what to expect if they install the applications. Thank you. – WinEunuuchs2Unix Mar 02 '17 at 00:33
  • I just want the brightness down. I don't want to mess with the color – Philip Rego Feb 11 '20 at 17:05
0

Install redshift using

sudo apt-get install redshift redshift-gtk

Then you can access the temperature of your display using redshift -O 5500 in the terminal or you can just run redshift and it will automatically adjust the brightness and temperature according to your location and time of day.

The redshift can also be accessed from the indicator bar using redshift-gtk.

The temperature parameter of redshift takes input from 1000 to 25000, thats a pretty long range and will cater to all your uses. Just for reference normal screen uses 6500K temperature. So for reading mode you can set it to around 5500+.

Although you can also use redshift -x instead of setting temperature 6500.

You can set your preferred defaults for day and night using redshift -b DAY:NIGHT and then redshift -b 1.0:0.75.

It also allows you to set your custom location using -l tag.

Check out this link to see how to add it to autostart: https://www.maketecheasier.com/protect-eyes-redshift-linux/

arnav
  • 109
0

This Desktop Dimmer dims the brightness, but it has some bugs

https://github.com/sidneys/desktop-dimmer/releases