我花了一些时间尝试了很多事情,但都没有用。下面是我到目前为止尝试过的(手动更改幻灯片):
/usr/share/backgrounds/mywallpapers中创建一个新文件夹并在那里添加我的background-1.xml。/usr/share/backgrounds/中/usr/share/backgrounds/Contest/background-1.xml复制到/usr/share/backgrounds/我登出和进入,仍然没有改变外观应用程序。
我听说过Wallch,但我不希望某个应用程序一直在后台运行。我甚至不确定Wallch是否会与Gnome 3合作。我也尝试了gnome-3-wp(Gnome 3壁纸幻灯片应用程序),但对于Ubuntu11.10的Oneiric来说,它似乎坏了。
有人有解决办法吗?
发布于 2011-10-29 03:47:55
我想我迟到了但是..。
我创建了一个xml背景(带有完整的路径描述),并将其保存在/usr/share/backgrounds/my-back背景.xml中。
然后我编辑了/usr/share/gnome-background-properties/ubuntu-wallpapers.xml
<wallpaper deleted="false">
<name>My background</name>
<filename>/usr/share/backgrounds/my-background.xml</filename>
<options>zoom</options>
</wallpaper> 只需保存文件,新幻灯片壁纸将显示在“外观”窗口中。
希望它对你有用。
发布于 2011-11-01 20:11:25
此外,在编辑/usr/share/gnome-background-properties/ubuntu-wallpapers.xml,时,将所有选项标记组合在一起将允许您在设置中的外观GUI中选择平铺、缩放、中心、缩放、填充或跨越。
使用上面Locutus的示例:
<wallpaper deleted="false">
<name>My background</name>
<filename>/usr/share/backgrounds/my-background.xml</filename>
</wallpaper>发布于 2012-11-17 02:14:19
我使用我编写的以下脚本,并使用gnome‘’启动程序启动它。为了提高系统性能,脚本在运行XMBC或VLC或系统负载超过指定阈值时挂起幻灯片。
将脚本保存到文件和chmod +x中,使其自动执行。
wallpaper-slideshow.sh
#!/usr/bin/python
import os
import random
import time
import re
import subprocess
# directory where Pictures are stored
pictureDirectory = os.getenv("HOME") + "/.xbmc/userdata/Thumbnails/Video/Fanart"
# time in seconds to wait between transitions
duration=60
# maximum system load before the slideshow is suspended
maxSysLoad=0.5
def getPictureList():
result = []
for root, sub, files in os.walk(pictureDirectory):
for f in files:
if f.endswith(('.jpeg','.jpg','png','.tbn')):
result.append(os.path.join(root, f))
return result
def getSystemLoad():
uptimeString = subprocess.check_output(["uptime"])
return float(re.match(r".*load average: ([^,]+),.*", uptimeString).group(1))
def isProcRunning(name):
with open(os.devnull, "w") as devnull:
return subprocess.call(["pidof", name], stdout=devnull) == 0
def setDesktopBackgroundPicture(filename):
return subprocess.call(["gsettings", "set",
"org.gnome.desktop.background",
"picture-uri", '"file://' + filename + '"'])
def main():
time.sleep(10) # startup delay
pictureList = getPictureList()
while 1:
if getSystemLoad() > maxSysLoad or isProcRunning("vlc") or isProcRunning("xbmc.bin") :
print "slide show suspended while VLC or XMBC is running or system load is high"
else:
picture = random.choice(pictureList)
print picture
setDesktopBackgroundPicture(picture)
time.sleep(duration)
if __name__ == "__main__":
main() https://askubuntu.com/questions/71008
复制相似问题