Ubuntu默认的壁纸存放在/usr/share /backgrounds/目录下,该目录下有个cosmos子目录, cosmos里面的background-1.xml文件就是实现 动态桌面(background)壁纸切换功能
其实很简单
-------------------------------------------------------------------------
<background>
<starttime>
<year>2009</year>
<month>08</month>
<day>04</day>
<hour>00</hour>
<minute>00</minute>
<second>00</second>
</starttime>
<!-- This animation will start at midnight. -->
<!-- duration 标签设置持续的时间,以秒为单位
transition 标签设置图片切换 from.. to.. -->
<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/comet.jpg</to>
</transition>
<static>
<duration>1795.0</duration>
<file>/usr/share/backgrounds/cosmos/comet.jpg</file>
</static>
<transition>
<duration>5.0</duration>
<from>/usr/share/backgrounds/cosmos/comet.jpg</from>
<to>/usr/share/backgrounds/cosmos/earth-horizon.jpg</to>
</transition>
<static>
<duration>1795.0</duration>
<file>/usr/share/backgrounds/cosmos/earth-horizon.jpg</file>
</static>
<transition>
<duration>5.0</duration>
<from>/usr/share/backgrounds/cosmos/earth-horizon.jpg</from>
<to>/usr/share/backgrounds/cosmos/blue-marble-west.jpg</to>
</transition>
<static>
<duration>1795.0</duration>
<file>/usr/share/backgrounds/cosmos/blue-marble-west.jpg</file>
</static>
<transition>
<duration>5.0</duration>
<from>/usr/share/backgrounds/cosmos/blue-marble-west.jpg</from>
<to>/usr/share/backgrounds/cosmos/galaxy-ngc3370.jpg</to>
</transition>
<static>
<duration>1795.0</duration>
<file>/usr/share/backgrounds/cosmos/galaxy-ngc3370.jpg</file>
</static>
<transition>
<duration>5.0</duration>
<from>/usr/share/backgrounds/cosmos/galaxy-ngc3370.jpg</from>
<to>/usr/share/backgrounds/cosmos/helix-nebula.jpg</to>
</transition>
<static>
<duration>1795.0</duration>
<file>/usr/share/backgrounds/cosmos/helix-nebula.jpg</file>
</static>
<transition>
<duration>5.0</duration>
<from>/usr/share/backgrounds/cosmos/helix-nebula.jpg</from>
<to>/usr/share/backgrounds/cosmos/jupiter.jpg</to>
</transition>
<static>
<duration>1795.0</duration>
<file>/usr/share/backgrounds/cosmos/jupiter.jpg</file>
</static>
<transition>
<duration>5.0</duration>
<from>/usr/share/backgrounds/cosmos/jupiter.jpg</from>
<to>/usr/share/backgrounds/cosmos/sombrero.jpg</to>
</transition>
<static>
<duration>1795.0</duration>
<file>/usr/share/backgrounds/cosmos/sombrero.jpg</file>
</static>
<transition>
<duration>5.0</duration>
<from>/usr/share/backgrounds/cosmos/sombrero.jpg</from>
<to>/usr/share/backgrounds/cosmos/whirlpool.jpg</to>
</transition>
<static>
<duration>1795.0</duration>
<file>/usr/share/backgrounds/cosmos/whirlpool.jpg</file>
</static>
<transition>
<duration>5.0</duration>
<from>/usr/share/backgrounds/cosmos/whirlpool.jpg</from>
<to>/usr/share/backgrounds/cosmos/cloud.jpg</to>
</transition>
</background>
--------------------------------------------------------------------------------------
转载:http://hi.baidu.com/mcmlxxxviii/blog/item/ebad683a7902b93070cf6cb2.html
Ubuntu设置动态壁纸(background)
最新推荐文章于 2024-09-05 22:18:32 发布