編集

編集

赤い片

ほとんどのディストリビューションで利用可能なパッケージの日付は2016-01-02で、2.5年前です。

私のシステムと同じです - Linux Mint 19 Cinnamon 64ビット - 専用バージョン 1.11書くことができる:

$ apt-cache policy redshift
redshift:
  Installed: (none)
  Candidate: 1.11-1ubuntu1
  Version table:
     1.11-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

Linux Mint 19は最新のUbuntu 18.04に基づいていることに注意してください。

これは、次のコードでコミットが少なすぎるために発生する可能性があります。バージョン 1.12

とにかく個人的な考えではバージョン 1.12これは非常に重要な進歩です。


質問

とにかく私の質問は、PPAを追加せずに新しいバージョンをインストールする方法です。

言い換えれば。どのようにインストールしますか赤い片が1.12Linux Mint 19 Cinnamonのソースコードは何ですか?

まだ設定に慣れていないので、デフォルト設定と設定を必ず含めてください。

答え1

Debian派生製品を使用しているので、バージョン1.12のパッケージングソースを再構築できます。

cd ${TMPDIR:-/tmp}
sudo apt install devscripts debian-keyring
dget -x http://deb.debian.org/debian/pool/main/r/redshift/redshift_1.12-2.dsc
cd redshift-1.12
sudo apt build-dep redshift
dpkg-buildpackage -us -uc
sudo dpkg -i ../redshift{,-gtk}_1.12-2_*.deb

ソースから直接インストールするよりも多くの利点があります。

  • 既存のパッケージを消去する必要はありません。
  • 更新されたソフトウェアは依然としてパッケージ管理システムによって管理されます。
  • 今後このパッケージをアップグレードすると、再構築する必要はありません(または手動でインストールされたソフトウェアをアンインストールしてパッケージをインストールする必要があります)。

設定を再確認する必要がある場合は、次を参照してください。ウラジミール~の回答もっと学ぶ。

答え2

編集

経験がある場合は、ここで新しいものが見つからないため、このセクションをスキップできます。

まず、システムで以前のバージョンを消去する必要があります。

通常、一部のパスが変更されるため、コンパイル時に常に削除するのではなくクリアします。

sudo apt-get purge redshift redshift-gtk

これでコンパイルする準備が整いました。幸いなことに、この場合は次のように簡単に実行できます。

sudo apt-get build-dep redshift-gtk

それはおそらく、最後のパッケージバージョン以降の依存関係が変更されていないためです。

これでソースコードが必要です。私はいつもコンパイルされたプログラムのための新しいフォルダを作成します。

mkdir redshift && cd redshift

以下は、ソースコードをダウンロードすることです。

wget https://github.com/jonls/redshift/releases/download/v1.12/redshift-1.12.tar.xz

アーカイブを解凍し、再作成されたディレクトリに直接移動します。

tar -xJf redshift-1.12.tar.xz && cd redshift-1.12

configure適切なスイッチを使用してスクリプトを実行しましょう。

./configure # --enable-gui --enable-ubuntu

ところで、デフォルト--enable-guiでは有効になっていますが、私のLinux Mintではデフォルトでは有効になっていません。--enable-ubuntuそうすべきだと思います。とにかく星の違いはないようですね。したがって、基本的な構成は大丈夫でしょう。

その後、コンパイルします。

make

構成

このリリースでは構成ディレクトリが移動されるため、手動で構成ディレクトリを作成する必要があります。ディレクトリがない場合は置き換えます。

mkdir ~/.config/redshift

好みのテキストエディタを使用して設定ファイルを作成および編集します。VSコードここで:

code ~/.config/redshift/redshift.conf

サンプル構成ファイルには多くのコメントがあります。

; Global settings file for Redshift application.
[redshift]


; The location provider for solar elevation.
; ------------------------------------------------------------------------------
; Set the location-provider: 'geoclue2' or 'manual'.
; The actual provider settings are in a separate section.
location-provider=manual


; 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


; Day and night screen temperatures.
; ------------------------------------------------------------------------------
; Default temperatures:
; - Day time  : 6500K
; - Night time: 4500K
temp-day=6000
temp-night=4500


; Custom dawn / dusk times.
; ------------------------------------------------------------------------------
; 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=00:00
dusk-time=15:00


; The adjustment method: 'randr', 'vidmode'.
; ------------------------------------------------------------------------------
; This has changed since the 1.12 version in favor of randr
; formerly vidmode has mostly been used from what I read.
adjustment-method=randr


; Manual GPS of the location for solar elevation.
; ------------------------------------------------------------------------------
; Standard longitude and latitude coordinates.
[manual]
lat=00.8111306
; EDIT THIS ^^
lon=00.1414300
; EDIT THIS ^^


; Adjustment method settings.
; ------------------------------------------------------------------------------
; Note that the numbering starts from 0, so 1 is actually the second screen.
; This actually works for all monitors, needs clarification!
[randr]
screen=0

インストールする

実際にインストールする前に、コンパイルされたバージョンを試してみることをお勧めします。

何らかの理由でコンパイルされたGTKバイナリが実行されないため、次のことを試してください。

chmod u+x ./src/redshift-gtk/redshift-gtk
./src/redshift-gtk/redshift-gtk

正常に動作したらインストールしてください。

sudo make install

関連情報