Redshift 是否需要有效的互联网连接才能工作?

Redshift 是否需要有效的互联网连接才能工作?

似乎没有有效的互联网连接,redshift 就无法运行。如果是这样,有没有办法在没有互联网连接的情况下运行它?

答案1

更新:请注意,修复程序正在路上。您可以等待它到达官方存储库,也可以按照帖子 #53 中的建议自行应用它,然后继续错误报告


正如 Anwar 指出的那样,Redshift 默认在线获取地理位置数据。不过,有一个解决方法:

手动配置地理位置数据


a.) 使用配置文件

从项目的主页

Redshift 将在“~/.config/redshift.conf”中查找配置文件。以下是示例:

; Global settings
[redshift]
temp-day=5700
temp-night=3500
transition=1
gamma=0.8:0.7:0.8
location-provider=manual
adjustment-method=vidmode

; The location provider and adjustment method settings
; are in their own sections.
[manual]
lat=55.0
lon=12.0

; In this example screen 1 is adjusted by vidmode. Note
; that the numbering starts from 0, so this is actually
; the second screen.
[vidmode]
screen=1`

查找上面提供的目录。如果配置文件不存在,请创建一个并附加您喜欢的任何自定义选项。

您将需要包含location-provider=manual并修改lat=long=的位置。此对话框将帮助您确定您的坐标。


b.) 使用命令行参数

发射启动应用程序

在此处输入图片描述

找出红移在启动应用列表中输入并点击编辑. 在命令下输入以下字符串:

gtk-redshift -l LAT:LONG

其中 LAT 和 LONG 与您的坐标相对应。点击保存,然后重新登录以激活红移

答案2

答案是肯定的。Redshift 需要有效的互联网连接。它依赖于libgeoclue0从互联网获取地理位置的包。

$ apt-cache depends redshift 
redshift
  Depends: libc6
  Depends: libgconf2-4
  Depends: libgeoclue0
  Depends: libglib2.0-0
  Depends: libx11-6
  Depends: libxcb-randr0
  Depends: libxcb1
  Depends: libxxf86vm1

您也可以通过从终端运行 redshift 来验证这一点。终端将显示类似以下消息:

Started Geoclue provider `Geoclue Master'.
Using provider `geoclue'.
According to the geoclue provider we're at: 22.36, 91.80
Using method `randr'.

这表明它正在使用互联网。

但是,如果您从没有互联网连接的终端启动 redshift,终端将显示以下类型的消息:

Started Geoclue provider `Geoclue Master'.
Using provider `geoclue'.
Could not get location (3 retries left): Geoclue master client has no usable Position providers.
Unable to get location from provider.

相关内容