求用命令修改壁纸方法,用gsettings设置桌面壁纸错误
Tofloor
poster avatar
vowers
deepin
2017-09-01 22:31
Author
看到论坛之前的帖子试了下gsettings但是不行啊
  1. vowers@vowers-PC:~$ gsettings set org.gnome.desktop.background picture-uri file:///home/vowers/Pictures/Wallpapers/a.jpg
  2. GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
Copy the Code
加上sudo 就没有报错也没有反应了

求大佬指点命令设置壁纸的方法
Reply Favorite View the author
All Replies
avatar
yanbowen
deepin
Community Developer
2017-09-01 23:03
#1

  1. qdbus --literal com.deepin.wm /com/deepin/wm com.deepin.wm.ChangeCurrentWorkspaceBackground ""
Copy the Code


注意传入的参数是 uri 格式的, 如你的壁纸路径是 /home/xx/bg.jpg 那就传入 file:///home/xx/bg.jpg 就是在路径前添加 file://
Reply View the author
avatar
yanbowen
deepin
Community Developer
2017-09-01 23:05
#2
另外现在壁纸是分工作区了, 不同工作区的壁纸不同, 可以使用 'gsettings get com.deepin.dde.appearance background-uris' 查看所以工作区的壁纸,  同样设置也相同.
Reply View the author
avatar
vowers
deepin
2017-09-01 23:13
#3
https://bbs.deepin.org/post/144934
注意传入的参数是 uri 格式的, 如你的壁纸路径是 /home/xx/bg.jpg 那就传入 file:///home/xx/bg.jpg 就是 ...

谢谢~~~
Reply View the author
avatar
186******39
deepin
2017-09-21 23:19
#4
请问还能用吗?为什么我这里运行的时候显示这个
Cannot find 'com.deepin.wm.ChangeCurrentWorkspaceBackground' in object /com/deepin/wm at com.deepin.wm
Reply View the author
avatar
186******39
deepin
2017-09-21 23:31
#5
额,知道了,不能用root用户?什么鬼……
然后有个新问题产生了,设置完后,不会自动模糊,打开主菜单看起来好可怕,求救……
Reply View the author
avatar
186******39
deepin
2017-09-21 23:35
#6
赞美我自己,把命令换成 com.deepin.wm.SetTransientBackground 就可以啦,哈哈哈
Reply View the author
avatar
海天鹰
deepin
2017-09-21 23:55
#7
为什么我的有效?
Reply View the author
avatar
dengbuqi
deepin
2018-02-11 19:09
#8
https://bbs.deepin.org/post/144934
另外现在壁纸是分工作区了, 不同工作区的壁纸不同, 可以使用 'gsettings get com.deepin.dde.appearance ba ...

没领悟到,大佬能写一个不同工作区换壁纸的例子出来吗?
Reply View the author
avatar
danceiny
deepin
2019-02-28 08:41
#9
https://bbs.deepin.org/post/144934
没领悟到,大佬能写一个不同工作区换壁纸的例子出来吗?

export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules/

这个亲测有效。
Reply View the author
avatar
danceiny
deepin
2019-02-28 08:41
#10
https://bbs.deepin.org/post/144934
没领悟到,大佬能写一个不同工作区换壁纸的例子出来吗?

export GIO_EXTRA_MODULES=/usr/lib/x86_64-linux-gnu/gio/modules/

这个亲测有效。
Reply View the author
avatar
kevanhan
deepin
2019-03-04 19:56
#11
本帖最后由 kevanhan 于 2019-3-4 13:32 编辑

大佬们 crontab 跑的时候会提示 Service 'com.deepin.wm' does not exist.  咋解决
Reply View the author
avatar
kevanhan
deepin
2019-03-05 00:24
#12
https://bbs.deepin.org/post/144934
大佬们 crontab 跑的时候会提示 Service 'com.deepin.wm' does not exist.  咋解决

https://stackoverflow.com/questions/10374520/gsettings-with-cron/19666729#19666729
Reply View the author