如何设定精确位置?

如何设定精确位置?

我已启用定位服务。我在没有 GPS 的台式机上使用 Ubuntu 18.10。在 Windows 10 上,我可以使用地址手动设置位置。

答案1

由于配置目录在此版本中已被移动,因此您必须手动创建该目录,但如果目录不存在,则可以恢复:

mkdir ~/.config/redshift

使用您最喜欢的文本编辑器来创建和编辑配置文件,我将在这里使用 VS Code:

code ~/.config/redshift/redshift.conf

示例配置文件有大量注释。

; Global settings
[redshift]

; Set the location-provider: 'geoclue2', 'manual'
; type 'redshift -l list' to see possible values.
; The location provider settings are in a different section.
location-provider=manual

; this has changed since this version in favor of randr
; formerly vidmode has been mostly used from what I read
adjustment-method=randr

; Disable the smooth fade between temperatures when Redshift starts and stops.
; 0 will cause an immediate change between screen temperatures.
; 1 will gradually apply the new screen temperature over a couple of seconds.
fade=0

; Solar elevation thresholds.
; By default, Redshift will use the current elevation of the sun to determine
; whether it is daytime, night or in transition (dawn/dusk). When the sun is
; above the degrees specified with elevation-high it is considered daytime and
; below elevation-low it is considered night.
;elevation-high=3
;elevation-low=-6

; Custom dawn/dusk intervals.
; Instead of using the solar elevation, the time intervals of dawn and dusk
; can be specified manually. The times must be specified as HH:MM in 24-hour
; format.
;dawn-time=6:00-7:45
;dusk-time=18:35-20:15


; The location provider and adjustment method settings
; are in their own sections.
; 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=00.8
lon=00.1

; 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 only screen 0.
; Note that the numbering starts from 0, so this is actually the first screen.
; If this option is not specified, Redshift will try to adjust _all_ screens.
[randr]
screen=0

这将适用于位置。手动更新位置

[manual]
lat=00.8
lon=00.1

相关内容