• 周三. 4 月 22nd, 2026

物嫩软件资讯网

软件资讯来物嫩

linux系统下的动态壁纸,Ubuntu 10.04下实现动态桌面壁纸

admin@wunen

5 月 29, 2025

不知大家在使用Ubuntu时有没有注意到,Ubuntu下是可以实现多张壁纸动态切换的,好像Win7下也有类似的功能(曾经使用 win7一段时间)。我也是最近才注意到这点,下面是在Ubuntu 10.04下实验的,之前版本的应该也可以。

实现原理是使用一个xml文件 来记录可供切换选择的壁纸。下面展示的是Ubuntu 10.04中自带的一个样例。

首先说明一下,Ubuntu默认的壁纸存放在/usr/share /backgrounds/目录下的,www.linuxidc.com在该目录中还有一个cosmos(意思是“宇宙”)目录,cosmos里面的xml文件就是实现动态桌面壁纸切换功 能的了。

jarson@jarson-laptop:/usr/share/backgrounds/cosmos$ ls

background-1.xml      cloud.jpg  earth-horizon.jpg   helix-nebula.jpg  sombrero.jpg

blue-marble-west.jpg  comet.jpg  galaxy-ngc3370.jpg  jupiter.jpg       whirlpool.jpg

jarson@jarson-laptop:/usr/share/backgrounds/cosmos$ cat background-1.xml

starttime标签设置动画(幻灯片)开始的时间,可根据自己制作的时间设定,这个应该不影响实际要实现的功能

2009

08

04

00

00

00

“animation” 动画的意思

“static”静态的意思

1800.0  duration 标签设置持续的时间,以秒为单位。

/usr/share/backgrounds/cosmos/cloud.jpg  file标签指定壁纸存放的路径

“transition”切换的意思

5.0

/usr/share/backgrounds/cosmos/cloud.jpg from … to从壁纸A切换到壁纸B。

/usr/share/backgrounds/cosmos/comet.jpg

1800.0

/usr/share/backgrounds/cosmos/comet.jpg

5.0

/usr/share/backgrounds/cosmos/comet.jpg

/usr/share/backgrounds/cosmos/earth-horizon.jpg

1800.0

/usr/share/backgrounds/cosmos/earth-horizon.jpg

5.0

/usr/share/backgrounds/cosmos/earth-horizon.jpg

/usr/share/backgrounds/cosmos/blue-marble-west.jpg

1800.0

/usr/share/backgrounds/cosmos/blue-marble-west.jpg

5.0

/usr/share/backgrounds/cosmos/blue-marble-west.jpg

/usr/share/backgrounds/cosmos/galaxy-ngc3370.jpg

1800.0

/usr/share/backgrounds/cosmos/galaxy-ngc3370.jpg

5.0

/usr/share/backgrounds/cosmos/galaxy-ngc3370.jpg

/usr/share/backgrounds/cosmos/helix-nebula.jpg

1800.0

/usr/share/backgrounds/cosmos/helix-nebula.jpg

5.0

/usr/share/backgrounds/cosmos/helix-nebula.jpg

/usr/share/backgrounds/cosmos/jupiter.jpg

1800.0

/usr/share/backgrounds/cosmos/jupiter.jpg

5.0

/usr/share/backgrounds/cosmos/jupiter.jpg

/usr/share/backgrounds/cosmos/sombrero.jpg

1800.0

/usr/share/backgrounds/cosmos/sombrero.jpg

5.0

/usr/share/backgrounds/cosmos/sombrero.jpg

/usr/share/backgrounds/cosmos/whirlpool.jpg

1800.0

/usr/share/backgrounds/cosmos/whirlpool.jpg

5.0

/usr/share/backgrounds/cosmos/whirlpool.jpg

/usr/share/backgrounds/cosmos/cloud.jpg

注意from … to要构成一个循环。

设置动态桌面壁纸有两个好的功能:1、满足自己设置多张壁纸的需要;2、时间提醒,例如我这里设置半小时切换一次,这样每次桌面变换时,我就会知道半个小时 又过去了。。。

设置好后的应用方法:右键桌面->更改桌面背景->添加,在弹出对话框的右下方那里选择“全部文件”(默 认是“图像”),然后找到你定义好的动态桌面壁纸的xml文件,双击添加就可以了。

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注