原本打算使用flux的 但是在多次尝试无果下 退而求次 

 

但是 好在这个可以正常运行就是启动的时候稍微麻烦了

 

进入正题

 

 

sudo apt-get install redshift

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
redshift 已经是最新版 (1.10-5ubuntu1)。
下列软件包是自动安装的并且现在不需要了:
  0ad-data 0ad-data-common fonts-sil-gentium fonts-sil-gentium-basic
  fonts-texgyre frozen-bubble-data gtk2-engines-pixbuf ioquake3
  ioquake3-server libalien-sdl-perl libcapture-tiny-perl
  libclass-inspector-perl libcompress-bzip2-perl libenet7
  libfile-sharedir-perl libfile-which-perl libgloox13v5 libgtkhotkey1
  libmikmod3 libnvtt2 libopusfile0 libqupzilla1 libsdl-gfx1.2-5
  libsdl-mixer1.2 libsdl-pango1 libsdl-perl libsdl-ttf2.0-0 libtie-simple-perl
  linux-headers-4.10.0-28 linux-headers-4.10.0-28-generic
  linux-headers-4.13.0-26 linux-headers-4.13.0-26-generic
  linux-image-4.10.0-28-generic linux-image-4.13.0-26-generic
  linux-image-extra-4.10.0-28-generic linux-image-extra-4.13.0-26-generic
  openarena-081-maps openarena-081-misc openarena-081-players
  openarena-081-players-mature openarena-081-textures openarena-085-data
  openarena-088-data openarena-data openarena-oacmp1
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 215 个软件包未被升级。

 

sudo apt-get install redshift-gtk

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
下列软件包是自动安装的并且现在不需要了:
  0ad-data 0ad-data-common fonts-sil-gentium fonts-sil-gentium-basic
  fonts-texgyre frozen-bubble-data gtk2-engines-pixbuf ioquake3
  ioquake3-server libalien-sdl-perl libcapture-tiny-perl
  libclass-inspector-perl libcompress-bzip2-perl libenet7
  libfile-sharedir-perl libfile-which-perl libgloox13v5 libgtkhotkey1
  libmikmod3 libnvtt2 libopusfile0 libqupzilla1 libsdl-gfx1.2-5
  libsdl-mixer1.2 libsdl-pango1 libsdl-perl libsdl-ttf2.0-0 libtie-simple-perl
  linux-headers-4.10.0-28 linux-headers-4.10.0-28-generic
  linux-headers-4.13.0-26 linux-headers-4.13.0-26-generic
  linux-image-4.10.0-28-generic linux-image-4.13.0-26-generic
  linux-image-extra-4.10.0-28-generic linux-image-extra-4.13.0-26-generic
  openarena-081-maps openarena-081-misc openarena-081-players
  openarena-081-players-mature openarena-081-textures openarena-085-data
  openarena-088-data openarena-data openarena-oacmp1
使用'sudo apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:
  redshift-gtk
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 215 个软件包未被升级。
需要下载 30.3 kB 的归档。
解压缩后会消耗 454 kB 的额外空间。
获取:1 http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 redshift-gtk all 1.10-5ubuntu1 [30.3 kB]
已下载 30.3 kB,耗时 1秒 (29.6 kB/s)    
正在选中未选择的软件包 redshift-gtk。
(正在读取数据库 ... 系统当前共安装有 315341 个文件和目录。)
正准备解包 .../redshift-gtk_1.10-5ubuntu1_all.deb  ...
正在解包 redshift-gtk (1.10-5ubuntu1) ...
正在处理用于 hicolor-icon-theme (0.15-0ubuntu1) 的触发器 ...
正在处理用于 man-db (2.7.5-1) 的触发器 ...
正在处理用于 gnome-menus (3.13.3-6ubuntu3.1) 的触发器 ...
正在处理用于 desktop-file-utils (0.22-1ubuntu5.1) 的触发器 ...
正在处理用于 bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) 的触发器 ...
Rebuilding /usr/share/applications/bamf-2.index...
正在处理用于 mime-support (3.59ubuntu1) 的触发器 ...
正在设置 redshift-gtk (1.10-5ubuntu1) ...

 

redshift-gtk -l 39.92:116.46 -t 5500:2500

/usr/lib/python3/dist-packages/redshift_gtk/statusicon.py:32: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, GLib, GObject
/usr/lib/python3/dist-packages/redshift_gtk/statusicon.py:35: PyGIWarning: AppIndicator3 was imported without specifying a version first. Use gi.require_version('AppIndicator3', '0.1') before import to ensure that the right version gets loaded.
  from gi.repository import AppIndicator3 as appindicator
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

 

 

 

注意事项:

 

redshift-gtk -l 39.92:116.46 -t 5500:2500

这条命令的意思是手动将经纬度设定在’39.92:116.46’(北京)

并且调整白天色温为 5500K,夜晚 2500K。

终端最好不要关闭 即使在命令后面加个"&" 也没法使软件在后台运行

我试了一下 ctrl + C  取消后 护眼色还在 

➜  ~ redshift-gtk -l 39.92:116.46 -t 3500:2500
/usr/lib/python3/dist-packages/redshift_gtk/statusicon.py:32: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, GLib, GObject
/usr/lib/python3/dist-packages/redshift_gtk/statusicon.py:35: PyGIWarning: AppIndicator3 was imported without specifying a version first. Use gi.require_version('AppIndicator3', '0.1') before import to ensure that the right version gets loaded.
  from gi.repository import AppIndicator3 as appindicator
^C%                                                                            /usr/lib/python3/dist-packages/redshift_gtk/statusicon.py:32: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, GLib, GObject
/usr/lib/python3/dist-packages/redshift_gtk/statusicon.py:35: PyGIWarning: AppIndicator3 was imported without specifying a version first. Use gi.require_version('AppIndicator3', '0.1') before import to ensure that the right version gets loaded.
  from gi.repository import AppIndicator3 as appindicator
^C%