[Seek Help] 通过命令行修改控制中心的某一个设置项
Tofloor
poster avatar
onetwo
deepin
2022-04-14 00:29
Author

请问一下有没有一种方式让我可以在终端命令行修改控制中心里面的某一项设置,比如修改显示器亮度或者多显示器下的投影模式切换(两台显示器拓展或者copy)?

找了好久都没找到相关的配置文件,特来社区寻求帮助。谢谢

Reply Favorite View the author
All Replies
onetwo
deepin
2022-04-14 00:38
#1

使用xrandr?

Reply View the author
忆往
deepin
2022-04-14 00:40
#2

你可以安装一下 d-feet 这个软件。 sudo apt install d-feet

我们跨进程调用都是使用dbus服务,像控制中心相关的接口部分可以在

image.png

这里找到,其他接口同理~

Reply View the author
liwl
deepin
2022-04-14 00:42
#3

有的,我找找,今天刚摸索

Reply View the author
onetwo
deepin
2022-04-14 00:43
#4
忆往

你可以安装一下 d-feet 这个软件。 sudo apt install d-feet

我们跨进程调用都是使用dbus服务,像控制中心相关的接口部分可以在

image.png

这里找到,其他接口同理~

好的,感谢指点!我去学习学习

Reply View the author
liwl
deepin
2022-04-14 00:52
#5

gsettings set com.deepin.xsettings scale-factor 1.25 屏幕缩放1.25倍,不过屏幕缩放一般都需要注销生效,不如直接设置

Reply View the author
liwl
deepin
2022-04-14 00:53
#6

com.deepin.xsettings:primary-monitor-name:'eDP-1' 这个应该是设置屏幕的,我没有环境,没法测试

Reply View the author
onetwo
deepin
2022-04-14 01:40
#7
忆往

你可以安装一下 d-feet 这个软件。 sudo apt install d-feet

我们跨进程调用都是使用dbus服务,像控制中心相关的接口部分可以在

image.png

这里找到,其他接口同理~

奇怪,我用dbus-monitor 监控这个服务,点击里面的设置时没有事件产生的

Reply View the author
忆往
deepin
2022-04-14 17:01
#8
onetwo

奇怪,我用dbus-monitor 监控这个服务,点击里面的设置时没有事件产生的

这仅是个例子,系统中调用的dbus服务分别再不同的路径下。

Reply View the author
onetwo
deepin
2022-04-14 17:32
#9
liwl

com.deepin.xsettings:primary-monitor-name:'eDP-1' 这个应该是设置屏幕的,我没有环境,没法测试

感谢指点,我试了下设置其中几个key,但看起来好像没有反应,T^T

Reply View the author
onetwo
deepin
2022-04-14 18:57
#10
忆往

这仅是个例子,系统中调用的dbus服务分别再不同的路径下。

找到了,在dfeet里面不显示user的接口,命令行里面busctl --user出现了很多。一开始都是查system和session的,哈哈

Reply View the author
忆往
deepin
2022-04-14 22:15
#11

😁 Good Job

Reply View the author