- 可以从图片文件夹中选择图片,或者预先选定图片 - 可以按顺序或随机显示图片 - 可以每隔几分钟或在随机时间后更换图片
Shotwell
。文件
→ 设为桌面幻灯片
或按下 Ctrl+B:
Shotwell
的问题是它仅有有限数量的图像可供使用(大约2000张),在处理这些图像之前,Shotwell会复制这些图像(我想是为了提高性能),从而使它们在磁盘上的大小增加一倍。 - João Pimentel Ferreira在软件中心有两个壁纸更改器 - Wallch 适用于 Gnome-Shell/Unity/Gnome-Classic,Wally 适用于 KUbuntu。
我们来专注于 Wallch。
不幸的是,软件中心中的 Wallch 版本已经过时,并且在特别在 14.04 版本上存在许多问题!但是有一个包含最新版本的软件库。
要安装,请添加这个软件库(在 16.04 版本上不需要这样做):
sudo add-apt-repository ppa:wallch/wallch-daily
sudo apt-get update && sudo apt-get install wallch
保存 - 并添加一个图片文件夹 - 在这个例子中,使用 /usr/share/backgrounds
作为 Ubuntu 默认壁纸的位置
现在我们有两个选择:
启动选择 1
(感谢 @Naruto)
在启动器中保留 wallch
创业选择2
在登录时启动wallch,无需使用启动器
从Dash开始:
wallch --constant
创建一个新的创业应用程序。
sudo add-apt-repository ppa:wallch/wallch-daily
sudo apt-get update && sudo apt-get install wallch
软件中心的版本对我来说不起作用,但最新版本完美运行!我使用的是14.04 64位系统。 - steoiatsl有一个用于创建壁纸幻灯片的程序叫做CREBS。请查看这篇关于它的文章:http://www.omgubuntu.co.uk/2010/05/crebs-the-ultimate-wallpaper-slideshow-application
还有一个更简单、功能较少但易于使用的应用程序可以在这里找到:http://gnome-look.org/content/show.php/Wallpaper+Slideshow?content=125178
主页: http://peterlevi.com/variety
Github: https://github.com/varietywalls/variety
多样性是Linux系统的壁纸管理器。它支持多种桌面和壁纸来源,包括本地文件和在线服务:Flickr、Wallhaven、Unsplash等。
在支持的情况下,多样性作为托盘图标,方便暂停和恢复。否则,它的桌面入口菜单提供类似的选项。
多样性还包括一系列图像效果,如油画和模糊,以及将引用和时钟叠加到背景上的选项。
它可以在 Universe 软件源中找到。要安装它,请运行以下命令:
sudo apt install variety
sudo add-apt-repository ppa:peterlevi/ppa
sudo apt-get update
sudo apt-get install variety
#!/bin/bash
FILE="background.xml"
DURATION=10.0
TRANSITION=0.0
CURRENTDIR=$PWD
TRANSITION_XML="
<static>
<duration>$DURATION</duration>
<file>$CURRENTDIR/%s</file>
</static>
<transition>
<duration>$TRANSITION</duration>
<from>$CURRENTDIR/%s</from>
<to>$CURRENTDIR/%s</to>
</transition>
"
# Random order
shopt -s nullgob nocaseglob # ignore non-existant extensions, case-insensitve
IMGS=( *.{jpg,jpeg,png,gif} )
INDICES=( $(shuf -e ${!IMGS[@]}) ) # randomize indices of images
INDICES+=(${INDICES[0]}) # go back to first image after last
COUNTER=${#IMGS[@]}
exec > "$FILE" # all further output to the XML file
echo "<background><starttime></starttime>"
for ((i = 0; i < COUNTER; i++))
do
index=${INDICES[i]}
printf "$TRANSITION_XML" "${IMGS[index]}" "${IMGS[index]}" "${IMGS[index + 1]}"
done
echo "</background>"
操作说明:
生成了background.xml
文件后,右键单击桌面,选择更改背景图像,点击添加...,然后导航到包含XML文件的目录。在“打开”按钮上方,将选择器从“图像”更改为“所有文件”,然后选择background.xml文件并点击“打开”按钮。该文件可以重命名为更具描述性的名称,例如my_family.xml
,landscapes-3.xml
等,以便拥有多个幻灯片播放列表。
gsettings set org.gnome.desktop.background picture-uri 'file:///home/pykler/.backgrounds/realtime/background.xml'
mkdir -p ~/.local/share/gnome-background-properties/
cat >~/.local/share/gnome-background-properties/custom-wallpapers.xml <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">
<wallpapers>
<wallpaper deleted="false">
<name>Pykler</name>
<filename>/home/pykler/.backgrounds/realtime/background.xml</filename>
<options>zoom</options>
</wallpaper>
</wallpapers>
EOF
slideshow.py:
#!/usr/bin/env python
#coding=utf-8
# slideshow.py
import glob, os
import shutil
import time
import Image
filelist=[]
def filelie(path):
if os.path.isfile(path):
wenjian=os.path.splitext(path)[1][1:]
if wenjian=="jpg" or wenjian=="png" or wenjian=="gif":
try:
kuan,gao = Image.open(path).size
if kuan>=1024 and gao>=768:
filelist.append(path)
except IOError:
pass
elif os.path.isdir(path):
for item in os.listdir(path):
itemsrc = os.path.join(path, item)
filelie(itemsrc)
curdir = os.getcwd()
filelie(curdir)
currentImageFiles = filelist
#print filelist
if os.path.isfile('slideshow.xml'):
os.remove('slideshow.xml')
currentTime = time.localtime()
length = len(currentImageFiles)
f = file('slideshow.xml', 'w')
f.write('<background>\n')
f.write('\t<starttime>\n')
f.write('\t\t<year>' + str(currentTime.tm_year) + '</year>\n')
f.write('\t\t<month>' + str(currentTime.tm_mon) + '</month>\n')
f.write('\t\t<day>' + str(currentTime.tm_mday) + '</day>\n')
f.write('\t\t<hour>' + str(currentTime.tm_hour) + '</hour>\n')
f.write('\t\t<minute>' + str(currentTime.tm_min) + '</minute>\n')
f.write('\t\t<second>' + str(currentTime.tm_sec) + '</second>\n')
f.write('\t</starttime>\n')
f.write('<!--This animation will start at the time it created-->\n')
for i in currentImageFiles:
length = length - 1
f.write('\t<static>\n')
f.write('\t\t<duration>96.0</duration>\n')
f.write('\t\t<file>' + currentImageFiles[length] +'</file>\n')
f.write('\t</static>\n')
f.write('\t<transition>\n')
f.write('\t\t<duration>3.0</duration>\n')
f.write('\t\t<from>' + currentImageFiles[length] + '</from>\n')
if length >= 1:
f.write('\t\t<to>' + currentImageFiles[length-1] + '</to>\n')
if length <1:
f.write('\t\t<to>' + currentImageFiles[len(currentImageFiles)-1] + '</to>\n')
f.write('\t</transition>\n')
f.write('</background>\n')
f.close()
wallpapers.py:
#!/usr/bin/env python
#coding=utf-8
import glob, os
import shutil
import time
import Image
filelist=[]
def filelie(path):
if os.path.isfile(path):
wenjian=os.path.splitext(path)[1][1:]
if wenjian=="jpg" or wenjian=="png" or wenjian=="gif":
try:
kuan,gao = Image.open(path).size
if kuan>=1024 and gao>=768:
filelist.append(path)
except IOError:
pass
elif os.path.isdir(path):
for item in os.listdir(path):
itemsrc = os.path.join(path, item)
filelie(itemsrc)
curdir = os.getcwd()
filelie(curdir)
currentImageFiles = filelist
#print filelist
if os.path.isfile('mywallpapers.xml'):
os.remove('mywallpapers.xml')
currentTime = time.localtime()
length = len(currentImageFiles)
f = file('mywallpapers.xml', 'w')
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
f.write('<!DOCTYPE wallpapers SYSTEM "gnome-wp-list.dtd">\n')
f.write('<wallpapers>\n')
f.write('\t<wallpaper deleted="false">\n')
f.write('\t\t<name>My custom Wallpapers</name>\n')
f.write('\t\t<filename>/usr/share/backgrounds/contest/slideshow.xml</filename>\n')
f.write('\t\t<options>zoom</options>\n')
f.write('\t</wallpaper>\n')
for i in currentImageFiles:
length = length - 1
f.write('\t<wallpaper>\n')
f.write('\t\t<name>' + os.path.basename(currentImageFiles[length]) +'</name>\n')
f.write('\t\t<filename>' + currentImageFiles[length] +'</filename>\n')
f.write('\t\t<options>zoom</options>\n')
f.write('\t\t<pcolor>#000000</pcolor>\n')
f.write('\t\t<scolor>#000000</scolor>\n')
f.write('\t\t<shade_type>solid</shade_type>\n')
f.write('\t</wallpaper>\n')
f.write('</wallpapers>\n')
f.close()