一开始想在Ubuntu下安装在Windows下使用的f.lux,但是折腾了很久f.lux也没能正常运作。于是打开另一台Ubuntu电脑,将上面使用的Redshift软件搬了过来。

Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night.

1.安装

一行命令即可,sudo apt-get install redshift-gtk

注意:没有必要像某些文章提到的安装redshift-gtk redshift python-appindicator三个包。

2.配置

安装完成后,启动程序会发现屏幕并没有什么变化,这是因为现在的配置文件是空的。

输入命令sudo gedit ~/.config/redshift.conf,打开其配置文件,复制如下内容:

; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=5000
temp-night=4500 ; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature.
; 1 will gradually increase or decrease the screen temperature.
transition=1 ; Set the screen brightness. Default is 1.0.
;brightness=0.9
; It is also possible to use different settings for day and night
; since version 1.8.
;brightness-day=0.7
;brightness-night=0.4
; Set the screen gamma (for all colors, or each color channel
; individually)
gamma=0.8
;gamma=0.8:0.7:0.8
; This can also be set individually for day and night since
; version 1.10.
;gamma-day=0.8:0.7:0.8
;gamma-night=0.6 ; Set the location-provider: 'geoclue', 'geoclue2', 'manual'
; type 'redshift -l list' to see possible values.
; The location provider settings are in a different section.
location-provider=manual ; Set the adjustment-method: 'randr', 'vidmode'
; type 'redshift -m list' to see all possible values.
; 'randr' is the preferred method, 'vidmode' is an older API.
; but works in some cases when 'randr' does not.
; The adjustment method settings are in a different section.
adjustment-method=randr ; Configuration of the location-provider:
; type 'redshift -l PROVIDER:help' to see the settings.
; ex: 'redshift -l manual:help'
; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers.
[manual]
lat=33.98
lon=109.99 ; Configuration of the adjustment-method
; type 'redshift -m METHOD:help' to see the settings.
; ex: 'redshift -m randr:help'
; In this example, randr is configured to adjust screen 1.
; Note that the numbering starts from 0, so this is actually the
; second screen. If this option is not specified, Redshift will try
; to adjust _all_ screens.
; [randr]
; screen=1

按照自己所在的地区进行配置,上文给出的经纬度位于中国西安。具体配置参考上文英文提示。

参考资料

https://github.com/jonls/redshift

Ubuntu安装护眼程序的更多相关文章

  1. Ubuntu -- 安装、卸载程序的命令

    通过sudo apt-get install xxxx 安装软件后,总是无法卸载干净,这里以Apache 为例,提供方法:首先sudo apt-get remove apache2再sudo apt- ...

  2. Ubuntu安装32位程序兼容包

    有的交叉编译工具链是32位的,经常会遇到安装完成之后提示好不到,这时候需要安装32位兼容程序,使用以下命令安装: sudo apt-get update sudo apt install gcc-mu ...

  3. ubuntu终端常用命令及solarized配色(护眼)

    ubuntu终端常用命令及solarized配色(护眼) ubuntu 终端 命令 1.常用命令 ctrl + l - 清屏 . cLear  ctrl + c - 终止命令.   ctrl + d ...

  4. [Eclipse] 详细设置护眼背景色和字体颜色并导出

    http://jingyan.baidu.com/article/d5a880eb6c4f7813f147ccef.html Eclipse是一款码农们喜闻乐见的集成开发平台,但是其默认的主题和惨白的 ...

  5. Eclipse详细设置护眼背景色和字体颜色并导出

    Eclipse详细设置护眼背景色和字体颜色并导出 Eclipse是一款码农们喜闻乐见的集成开发平台,但是其默认的主题和惨白的背景色实在是太刺激眼球了.下面,将给大家详细介绍如何设置成护眼主题的方法,也 ...

  6. 最全面的AndroidStudio配置指南总结-包括护眼模式

    使用AndroidStudio开发APP已有半年多的时间了,从刚开始的不习惯到慢慢适应再到逐渐喜欢上AndroidStudio,中间的过程颇有一番曲折,现在把自己对AndroidStudio的配置心得 ...

  7. debian/ubuntu安装桌面环境

    apt-get install xorg apt-get install gnome 然后startx ubuntu 安装Gnome桌面 1.安装全部桌面环境,其实Ubuntu系列桌面实际上有几种桌面 ...

  8. ubuntu安装shadowshocks-qt5

    sudo add-apt-repository ppa:hzwhuang/ss-qt5 sudo apt-get update sudo apt-get install shadowsocks-qt5 ...

  9. ubuntu 安装 OpenCv 及其Qt的开发环境配置

    ubuntu安装opencv (1)安装编译opencv的环境 sudo apt-get -y install build-essential cmake pkg-config (2)安装Image ...

随机推荐

  1. Codeforces - 1194E - Count The Rectangles - 扫描线

    https://codeforc.es/contest/1194/problem/E 给5000条正常的(同方向不会重叠,也不会退化成点的)线段,他们都是平行坐标轴方向的,求能组成多少个矩形. 先进行 ...

  2. uploadify多图片和文件上传网站应用

    先要下载压缩包 www.uploadify.com/wp-content/uploads/files/uploadify.zip 1,模板文件引用 <!--引用jquery uploady*}- ...

  3. 烂漫爱心表白动画 分类: C# 2014-10-07 19:08 28人阅读 评论(0) 收藏

    曾经我说过我会用程序来表达我对你的爱. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" &quo ...

  4. CSS-05 html和body标签

    html和body标签 一直对这两个标签有迷惑,查了一些网上资料整理了一下. 1.html和body标签的背景 1.当给body一个背景色时候,背景图是充满整个窗口的,这里看上去是body标签下的背景 ...

  5. redis限流器的设计

    1.定义注解 import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java. ...

  6. 什么是VPX技术?

    北京太速科技有限公司 自主研发VPX板卡  http://www.orihard.com/ 欢迎关注 新型VPX(VITA 46)标准是自从VME引入后的25年来,对于VME总线架构的最重大也是最重要 ...

  7. python搭建服务,传输文件

    一.进入需要共享的文件目录 #cd /home #python -m SimpleHTTPServer 二.浏览器访问资源 再浏览器地址栏输入: 服务器IP:8000 如图:

  8. bzoj4182 Shopping 点分治+单调队列优化多重背包

    题目传送门 https://lydsy.com/JudgeOnline/problem.php?id=4182 题解 有一个很直观的想法是设 \(dp[x][i]\) 表示在以 \(x\) 为根的子树 ...

  9. python 文件单行循环读取的坑(一个程序中,文件默认只能按行循环读取一次,即使写到另一个循环里,它也只读取一次)

    本来写了一个程序,想获取a文件中有,但是b文件中没有的行: 想到的方法是:1.一行一行提取a文件中数据,然后用a文件中的每一行与b文件中的每一行比较, 2.如果找到相同行就继续查找a中的下一行,如果找 ...

  10. equals区别==

    来自:https://blog.csdn.net/m0_37721946/article/details/78405595 java中的数据类型,可分为两类: 1.基本数据类型 byte,short, ...