LoginSignup
0
0

More than 3 years have passed since last update.

Ubuntu 18.04 LTS 時間の経過とともに画像が変化する自分用の壁紙を作る

Last updated at Posted at 2019-09-18

1.画像を用意する

壁紙にしたい複数の画像ファイルを用意してください。

2.所定のフォルダに移す

壁紙用のフォルダにコピーします。
ドラッグ・アンド・ドロップではうまくコピーできないのでコマンドで実行します。
ダウンロードフォルダにあるP01.jpg、P02.jpgを移動する場合以下のようになります。

sudo cp /home/iritani/ダウンロード/P0*.jpg /usr/share/backgrounds/.

3.xmlを作る

表示する画像と表示時間、画像を切り替えるときに出す画像と切り替え時間を定義するxmlを作ります。
以下の形式でファイルを作成し、以下フォルダに任意の名前.xmlで保存します(ここでは仮にiritani.xmlとします)。
/usr/share/backgrounds/contest
一から作るんじゃなくて、もともとあるbionic.xmlをコピーして編集すると楽ですね。

cd /usr/share/background/contest
sudo cp ./bionic.xml ./iritani.xml
sudo gedit ./iritani.xml

今回はgedit使いましたが、もちろんviでもかまいませんよ。
そして以下のように編集します。

<background>          ← 全体をこれで囲む
  <starttime>          ← 開始時間を定義
    <year>2009</year>
    <month>08</month>
    <day>04</day>
    <hour>00</hour>
    <minute>00</minute>
    <second>00</second>
  </starttime>
  <static>           ← 表示する時間と画像を定義
    <duration>1795.0</duration>
    <file>/usr/share/backgrounds/P01.jpg</file>
  </static>
  <transition>         ← 画像を切り替える時、前後に出す画像と、切り替え時間を定義
    <duration>5.0</duration>
    <from>/usr/share/backgrounds/P01.jpg</from>
    <to>/usr/share/backgrounds/P02.jpg</to>
  </transition>
  <static>           ← 表示する時間と画像を定義
    <duration>1795.0</duration>
    <file>/usr/share/backgrounds/P02.jpg</file>
  </static>
  <transition>         ← 画像を切り替える時、前後に出す画像と、切り替え時間を定義
    <duration>5.0</duration>
    <from>/usr/share/backgrounds/P02.jpg</from>
    <to>/usr/share/backgrounds/P01.jpg</to>
  </transition>

この場合P01.jpgとP02.jpgが交互に表示されることになります。

4.背景として設定する

設定画面から[背景]を選び、さらに[背景(B)]をクリックします。
すると以下のような背景の選択画面が出ます。
Screenshot from 2019-09-18 20-35-08.png
自分で追加した画像で、かつ右下に時計のマークがついているものを選びます。
これで設定完了です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0