[problem help] 怎么用命令更换Deepin V23壁纸? Resolved
Tofloor
poster avatar
深蓝
deepin
2023-10-12 08:21
Author

这个命令在Deepin V20中已经不再生效了,Deepin V23怎么用命令更换Deepin V23壁纸?求助
gsettings set com.deepin.wrap.gnome.desktop.background picture-uri "/home/user/Desktop/1.jpg"

Reply Favorite View the author
All Replies
谢克辉
deepin beta test group
2023-10-12 09:45
#1

为什么要用命令行更新壁纸呢

Reply View the author
把一切操作变成GUI
deepin
Backbone of ecological co-construction group
2023-10-12 14:26
#2
谢克辉

为什么要用命令行更新壁纸呢

应该是编写程序用到了这个功能

Reply View the author
neko
deepin
Ecological co-builder
2023-10-12 14:41
#3

监听dbus信号,如何右键设置壁纸。然后找到设置壁纸的信号抄下来用

Reply View the author
dgmenghuan
deepin
2023-10-12 16:23
#4

为什么手动?

Reply View the author
忘记、过去
deepin
2023-10-12 19:08
#5

和 V20 没啥区别,除了 D-Bus 接口名称换了下

dbus-send --session --print-reply=literal --dest=org.deepin.dde.Appearance1 /org/deepin/dde/Appearance1 org.deepin.dde.Appearance1.SetMonitorBackground string:'屏幕名称' string:'图片绝对路径'

e.g. dbus-send --session --print-reply=literal --dest=org.deepin.dde.Appearance1 /org/deepin/dde/Appearance1 org.deepin.dde.Appearance1.SetMonitorBackground string:'VGA-0' string:'/usr/share/wallpapers/deepin/abc-124.jpg'

Reply View the author
vivian_me
deepin testing team
2023-10-12 19:30
#6
Reply View the author
深蓝
deepin
2023-10-15 22:40
#7
谢克辉

为什么要用命令行更新壁纸呢

写自动化脚本,用于初始化系统

Reply View the author
深蓝
deepin
2023-10-15 22:43
#8
忘记、过去

和 V20 没啥区别,除了 D-Bus 接口名称换了下

dbus-send --session --print-reply=literal --dest=org.deepin.dde.Appearance1 /org/deepin/dde/Appearance1 org.deepin.dde.Appearance1.SetMonitorBackground string:'屏幕名称' string:'图片绝对路径'

e.g. dbus-send --session --print-reply=literal --dest=org.deepin.dde.Appearance1 /org/deepin/dde/Appearance1 org.deepin.dde.Appearance1.SetMonitorBackground string:'VGA-0' string:'/usr/share/wallpapers/deepin/abc-124.jpg'

谢谢大佬,你这个命令测试可以

官网上org.deepin.dde.Appearance后边没有加1, 设置时报错is badly formed

使用xrandr命令来获取显示器的名字。

xrandr是一个用于配置和显示X服务器屏幕的命令行工具。

列出所有已连接的显示器,并提取出它们的名字。:

xrandr --query | grep " connected" | cut -d" " -f1

列出所有显示器

xrandr --query | grep "connected"

结果:

DP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm

HDMI-1 disconnected (normal left inverted right x axis y axis)

Reply View the author