If you’re anything like me you probably spend too much time in front of your computer screen – or screens, we’re all nerds here.
And I’d wager that most of us are all-too aware that gawking at LCD displays for hours on end isn’t entirely great news for our eyes or our sleep patterns – yet stare away we do!
If you can relate, then make a note to check out a neat open source app called Redshift.
This tool automatically adjusts your screen’s colour temperature according to the position of the sun. This, it’s said, may help alleviate eye strain and improve the ability to get to sleep.
Think it sounds a bit kooky?
So did I, but official blurb from Redshift’s website explains the rationale further:
A different color temperature is set during night and daytime. During twilight and early morning, the color temperature transitions smoothly from night to daytime temperature to allow your eyes to slowly adapt. At night the color temperature should be set to match the lamps in your room.
There’s an increasing amount of research which suggests that exposure to brighter light at night when, typically, our bodies wouldn’t be expecting it, can hinder the ability to fall asleep.
But making computer displays warmer, they throw out less of the wavelengths more commonly found in day light – wavelengths which stimulate us to “be awake”.
Install Redshift on Ubuntu
Redshift is free, open-source software that’s easy to install on Ubuntu 9.10 or 10.04 LTS from the official Redshift PPA. Hurrah; no compiling code needed.
To add the PPA to your system first open a new Terminal window, then (carefully) run each of the following commands in sequence. Ubuntu will prompt you to enter your user password to authenticate the installation:
sudo add-apt-repository ppa:jonls/redshift-ppa
sudo apt-get update && sudo apt-get install redshift
If you’re reading this from far into the future, you can install Redshift from the Ubuntu repos instead using Software Center or by running sudo apt install redshift.
How to set location in Redshift
For Redshift to work effectively it needs to sync with your time zone, i.e., turn on at sundown, and turn off at sunrise. Sadly, you will need to use some command-line fu to set your location but don’t intake breathe sharply upon reading that – it’s painless!
Head over to getlatlon.com to get the longitude and latitude for your country/city.
Then, open the Terminal app and type in the following command using the coordinates you gleaned from the website above. This is the tricky part; enter those numbers as lat:lon.
For example, if I lived in Malmö, Sweden I would run the command:
redshift -l 55.6:13.0
It may help to write the command in a text editor (like Gedit, which Ubuntu comes with out of the box) and then copy and paste that in to the Terminal.
How to set Redshift to start at login
For Redshift to be truly useful you’ll want to set it to run automatically as a start-up application, that way you don’t need to open a terminal to manually run it each time you login.
To do this go to System > Preferences > Start-up Application, enter a title, and in the command field paste the same command from the location section above.
If you want to use Redshift with a tray icon so you can turn it on/off, use the command gtk-redshift instead of redshift, e.g., gtk-redshift -l 55.6:13.0.
Now you’re all set to improve your sleep quality and maybe reduce the risk of eye strain – which means you now have no excuse not to read this blog for hours on end ;)
Thanks to dRewsus