V20 换壁纸的命令改成什么了[已解决]
Tofloor
poster avatar
ghostry
deepin
2020-09-10 00:23
Author
本帖最后由 ghostry 于 2020-9-10 09:44 编辑

以前用
  1. gsettings set org.gnome.desktop.background picture-uri 文件地址
Copy the Code
现在无效了,执行后只会在壁纸里增加一个记录, 当前壁纸不变化了.

--------------------------

答案在5楼
Reply Favorite View the author
All Replies
1 / 2
To page
辉夜
deepin
2020-09-10 00:43
#1
为啥要用命令行?
Reply View the author
ghostry
deepin
2020-09-10 00:47
#2
https://bbs.deepin.org/post/201649
为啥要用命令行?

因为我在做这个 https://bbs.deepin.org/post/201574

得用命令行.
Reply View the author
ghostry
deepin
2020-09-10 01:27
#3
Reply View the author
enforcee
deepin
2020-09-10 04:39
#4
dbus-send --dest=com.deepin.daemon.Appearance /com/deepin/daemon/Appearance --print-reply com.deepin.daemon.Appearance.SetMonitorBackground string:"屏幕名称" string:"file:///图片路径"
屏幕名称可以在设置里面 显示->亮度 查看
或者xrandr(我的这里叫"eDP-1")

Reply View the author
Comments
l0rraine
2020-09-12 01:03
牛皮,终于找到了啊
lenke
deepin
2020-09-10 05:04
#5
给你个提示
Reply View the author
Comments
ghostry
2020-09-10 17:45
这个也无效了.
观摩
deepin
2020-09-10 06:11
#6
https://bbs.deepin.org/post/201649
dbus-send --dest=com.deepin.daemon.Appearance /com/deepin/daemon/Appearance --print-reply com.deepin ...

厉害,这个可以用,就是比之前显得复杂了点
Reply View the author
enforcee
deepin
2020-09-10 06:35
#7
https://bbs.deepin.org/post/201649
厉害,这个可以用,就是比之前显得复杂了点

确实复杂
因为d-bus是为了桌面应用的通信设计的 而非命令交互或脚本
他有各种程序语言的绑定 可以不需要shell 而且shell上的dbus-send功能不如其他语言相应库功能全
有关桌面应用的规范可以在 freedesktop.org 看

大家看这个命令特别长觉得很厉害
实际上用d-feet查看接口 然后用dbus-monitor监听传入信息 最后翻译成dbus-send或者其他语言的调用
大家都能写出便利人生的脚本啦
Reply View the author
观摩
deepin
2020-09-10 06:56
#8
https://bbs.deepin.org/post/201649
确实复杂
因为d-bus是为了桌面应用的通信设计的 而非命令交互或脚本
他有各种程序语言的绑定 可以不需要s ...
用d-feet查看接口 然后用dbus-monitor监听传入信息 最后翻译成dbus-send或者其他语言的调用


这一段不会搞,d-feet 或者 dbus-feet 都没有这个命令
Reply View the author
观摩
deepin
2020-09-10 07:24
#9
https://bbs.deepin.org/post/201649
确实复杂
因为d-bus是为了桌面应用的通信设计的 而非命令交互或脚本
他有各种程序语言的绑定 可以不需要s ...

摸索到了一点门道
  1. dbus-send --dest=com.deepin.daemon.Appearance /com/deepin/daemon/Appearance --print-reply com.deepin.daemon.Appearance.List string:"background"
Copy the Code


这样可以查看所有的壁纸图片列表 json
Reply View the author
enforcee
deepin
2020-09-10 07:30
#10
https://bbs.deepin.org/post/201649
摸索到了一点门道

加油
刚才弄了个获取屏幕名称和路径的
dbus-send --dest=com.deepin.daemon.Display --print-reply=literal /com/deepin/daemon/Display com.deepin.daemon.Display.GetBuiltinMonitor
提取出第一个屏幕名称
dbus-send --dest=com.deepin.daemon.Display --print-reply=literal /com/deepin/daemon/Display com.deepin.daemon.Display.GetBuiltinMonitor | awk -F ' ' '{print $1}'
Reply View the author
enforcee
deepin
2020-09-10 07:32
#11
https://bbs.deepin.org/post/201649
摸索到了一点门道

这个用shell真的要哭了x
这时候python就有优势了x
Reply View the author
观摩
deepin
2020-09-10 07:47
#12
https://bbs.deepin.org/post/201649
加油
刚才弄了个获取屏幕名称和路径的
dbus-send --dest=com.deepin.daemon.Display --print-reply=liter ...

这些预设的 destination、path、interface 都是从哪里查询到的,不会就这么盯着 monitor 跟踪吧
Reply View the author
enforcee
deepin
2020-09-10 08:01
#13
hope250 发表于 2020-9-9 23:47
这些预设的 destination、path、interface 都是从哪里查询到的,不会就这么盯着 monitor 跟踪吧 ...

d-feet啊
没有就装一个嘛
sudo apt install d-feet
Reply View the author
ghostry
deepin
2020-09-10 17:37
#14
https://bbs.deepin.org/post/201649
加油
刚才弄了个获取屏幕名称和路径的
dbus-send --dest=com.deepin.daemon.Display --print-reply=liter ...

主屏幕名称我用的这句

  1. xrandr|grep 'connected primary'|awk '{print $1}'
Copy the Code
Reply View the author
观摩
deepin
2020-09-10 18:16
#15
https://bbs.deepin.org/post/201649
主屏幕名称我用的这句

既然使用了dbus,可以尽量全部采用dbus
Reply View the author
ghostry
deepin
2020-09-10 18:33
#16
https://bbs.deepin.org/post/201649
既然使用了dbus,可以尽量全部采用dbus

确实保持一致是好习惯.
Reply View the author
神末shenmo
Moderator
Spark-App
2020-09-11 01:04
#17
https://bbs.deepin.org/post/201649
dbus-send --dest=com.deepin.daemon.Appearance /com/deepin/daemon/Appearance --print-reply com.deepin ...

你好,最近星火后端需要dbus支持,您是否介意提供些技术辅助?https://bbs.deepin.org/user/194903
客户端apt能dbus拉那就更好了
Reply View the author
enforcee
deepin
2020-09-11 01:38
#18
https://bbs.deepin.org/post/201649
你好,最近星火后端需要dbus支持,您是否介意提供些技术辅助?@moshengren
客户端apt能dbus拉那就更好了 ...

我只会用轮子 不会造轮子
解决点小问题有点伎俩 至于做大工程未必帮上忙

有什么要求尽管提 解决与否我也难说
Reply View the author
神末shenmo
Moderator
Spark-App
2020-09-11 06:05
#19
https://bbs.deepin.org/post/201649
我只会用轮子 不会造轮子
解决点小问题有点伎俩 至于做大工程未必帮上忙

@moshengren
Reply View the author
陌生人
deepin
2020-09-11 17:23
#20
https://bbs.deepin.org/post/201649
我只会用轮子 不会造轮子
解决点小问题有点伎俩 至于做大工程未必帮上忙

呃,是这样的,目前有一个dbus的完整后端,需要帮忙搞一个qt的前端,不晓得可不可以
Reply View the author
1 / 2
To page