Ubuntu 14.04 - Redshift 启动时无法启动

Ubuntu 14.04 - Redshift 启动时无法启动

我发布此信息是为了解决我在 Google 上找不到的问题。

Redshift 无法在启动时启动,因为它无法从 geoclue 收集经度和纬度。问题似乎是 geoclue 无法获取用户位置。

在终端中尝试以下操作对我来说不起作用:

redshift-gtk -l 55.7:12.6

我收到一个错误,指出参数太多。

答案1

以下是我为使其工作所做的事情:

1) 在应用程序下,转到启动应用程序。如果 Redshift 的条目已经存在,则单击它,然后单击编辑。否则,单击添加。将名称设置为 Redshift,并将注释设置为您想要的任何内容。对于命令,输入:

gtk-redshift -l manual

单击保存。

2) 在您的主文件夹中按 ctrl+h,这将列出所有隐藏文件夹(以“。”开头的文件夹)。进入您的 .config 文件夹并创建一个新文件并将其命名为 redshift.conf。粘贴以下内容:

; Global settings
[redshift]
temp-day=6500K
temp-night=5000
transition=1
;gamma=0.8:0.7:0.8
gamma=1.000:1.000:1.000
location-provider=geoclue
;location-provider=manual
adjustment-method=vidmode
;brightness=1.0:0.5

; The location provider and adjustment method settings
; are in their own sections.
; This is an example lat long for Portland, OR
[manual]
lat=YOURLAT
lon=YOURLON

; 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

这里获取您的纬度和经度,并将“YOURLAT”和“YOURLON”替换为相应的值。保存并关闭文件。重新启动计算机,Redshift 应该已经启动(菜单栏中的灯泡图标表示)。

所以,希望这能对某些人有所帮助。如果这违反了规则或出于任何原因,我深表歉意。希望这能对某些人有所帮助。

答案2

虽然上述答案让我走上了正确的道路,但仍有几件事情可以改进。如果您添加配置,location-provider=manual那么您不需要任何额外的命令行参数,只需运行redshiftredshift-gtk将加载您的配置文件纬度/经度。

我不知道为什么 geoclue 在 ubuntu 上坏了,但因为这是我的台式电脑,所以位置不会有太大变化

这是我修改后的配置。请参阅此处的文档http://jonls.dk/redshift/#配置文件

; Global settings
[redshift]
temp-day=5700
temp-night=3500

transition=0

; Set the screen gamma (for all colors, or each color channel
; individually)
gamma=0.8

;location-provider=geoclue
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

;brightness=1.0:0.5

; The location provider and adjustment method settings
; are in their own sections.
; This is an example lat long for Portland, OR
[manual]

lat=49.000  ;  YOUR LAT GOES HERE
lon=-123.000 ; YOUR LONG GOES HERE

相关内容