如何在Redshift上设置一定的温度?

我刚刚切换到Ubuntu,在Windows上我使用的是f.lux。 我能够将温度设定到一定时间并保持不变,它根本不会改变。

现在我安装了Redshift,我不能再这样做了。 请帮帮忙吗?

您可以从命令行永久设置色温:
打开( gnome-terminal ,输入命令:

 redshift -O  

然后按Return

将其设置为(例如)3700:

 redshift -O 3700 

要重置为“中立”:

 redshift -x 

有关更多(命令行)选项,请参阅:

 man redshift 

(鉴于已安装Redshift的事实:))

如果你使用redshift-gtk那么@ Jacob的方法将无效。

您需要在$HOME/.config目录中创建配置文件以更改其设置。 在其官方页面中描述的示例配置文件创建,引用如下:

配置文件

可以创建配置文件,但文档有点稀疏。 您必须手动创建它并将其放在〜/ .config / redshift.conf中。 以下是配置文件的示例:

 ; Global settings for redshift [redshift] ; Set the day and night screen temperatures temp-day=5700 temp-night=3500 ; 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 (eg the Americas) ; are negative numbers. [manual] lat=48.1 lon=11.6 ; 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 

另一个示例配置也可以在Ubuntu文档中找到。

对于那些正在寻找这个问题答案的人来说“当我输入redshift -O ,它可以工作大约一秒钟,然后恢复正常……在这种情况下我该怎么办?”

尝试 – 转到屏幕顶部 – >红色图标 – >单击启用以禁用它 – >启用终端并键入

 redshift -O  

为我工作

可以使用选项运行Redshift GTK(和正常的redshift )来指定它的运行方式:

  redshift-gtk -l 52.6:1.6 -t 5700:3500 -g 0.82 -m randr -v 

在上面的命令中,使用了以下命令:

  • -l指定您的位置粗略坐标,因此它可以与日出/日落同步。 通常redshift-gtk尝试查找你的位置,但这不起作用unles你的电脑有GPS所以更容易手动设置,使用地图服务来给出你的位置的近似值(例如使用OpenStreetMap )
  • -t设置屏幕的色温 ,白天和黑夜。
  • -g设置适用的伽马校正
  • -m使用的方法。 这可能取决于您的桌面合成器。
  • -b也可用于设置屏幕亮度(也是DAY:NIGHT ,值介于.11之间)。

这与redshift大致相同(并且使用与man redshift相同的选项),除了它以图标运行,因此您可以通过切换到终端来关闭它。 您可以在终端,桌面命令启动器(通常为Alt + F2 )中运行上述命令,甚至可以创建启动器 。

否则,最好使用配置文件,如@Mahmudul Hasan Shohag的回答。