Saturday, October 26, 2013

Tạo Background Slideshow trên centOS 6

Hướng dẫn tạo Background Slideshow (ảnh Desktop thay đổi sau một thời gian) trên centOS 6:
1. Copy những file ảnh cần dùng vào /usr/share/backgrounds/cosmos dưới quyền root( ví dụ ở đây tôi đã copy file ảnh background.jpeg từ desktop vào thư mục này) command:
cp /home/namnt/Desktop/background.jpeg  /usr/share/backgrounds/cosmos/
2. Chỉnh sửa file background-1.xml trong thư mục /usr/share/backgrounds/cosmos. Với file xml này bạn sẽ để ý có dạng cấu trúc của mỗi ảnh hiện tại và ảnh tiếp theo có dạng như sau :
<static>
    <duration>1795.0</duration>
    <file>/usr/share/backgrounds/cosmos/cloud.jpg</file>
  </static>
  <transition>
    <duration>5.0</duration>
    <from>/usr/share/backgrounds/cosmos/cloud.jpg</from>
    <to>/usr/share/backgrounds/cosmos/ABSTRACT-Aurora_1280x1024.jpg</to>
  </transition>
<static>
    <duration>1795.0</duration>
    <file>/usr/share/backgrounds/cosmos/ABSTRACT-Aurora_1280x1024.jpg</file>
  </static>
  <transition>
    <duration>5.0</duration>
    <from>/usr/share/backgrounds/cosmos/ABSTRACT-Aurora_1280x1024.jpg</from>
    <to>/usr/share/backgrounds/cosmos/ABSTRACT-CrunchyBranch_1680x1050.png</to>
  </transition>
Rất đơn giản, muốn chèn ảnh  background.jpeg chạy xen giữa 2 ảnh này bạn chỉ cần sửa thành:
<static>
    <duration>1795.0</duration>
    <file>/usr/share/backgrounds/cosmos/cloud.jpg</file>
  </static>
  <transition>
    <duration>5.0</duration>
    <from>/usr/share/backgrounds/cosmos/cloud.jpg</from>
    <to>/usr/share/backgrounds/cosmos/background.jpeg</to>
  </transition>
<static>
    <duration>1795.0</duration>
    <file>/usr/share/backgrounds/cosmos/ background.jpeg</file>
  </static>
  <transition>
    <duration>5.0</duration>
    <from>/usr/share/backgrounds/cosmos/ background.jpeg</from>
    <to>/usr/share/backgrounds/cosmos/AABSTRACT-Aurora_1280x1024.jpg</to>
  </transition>
<static>
</static>
  <transition>
    <duration>5.0</duration>
    <from>/usr/share/backgrounds/cosmos/ABSTRACT-Aurora_1280x1024.jpg</from>
    <to>/usr/share/backgrounds/cosmos/ABSTRACT-CrunchyBranch_1680x1050.png</to>
  </transition>
Lưu file này lại sau đó chuột phải vào Desktop -> Change Desktop Background, chuyển sang tab Background -> chọn slideshow bạn tạo sau đó bấm vào Make defaults

No comments:

Post a Comment