当我使用notify-send在桌面上显示通知,然后再次使用它来显示不同的通知时,我注意到第二个仅在第一个消失后才显示。
有没有办法notify-send立即用不同的通知替换现有通知?
我正在尝试使用dbus-monitor来尝试了解 dbus 在 Ubuntu 环境中的工作方式。在这方面我有几个问题:
你能告诉我如何正确阅读以下内容吗?我了解大意,但不了解细节。
signal sender=:1.1948 -> dest=(null destination) serial=1829990 path=/org/ayatana/menu/DA00003; interface=org.ayatana.dbusmenu; member=ItemPropertyUpdated
int32 23
string "enabled"
variant boolean true
method call sender=:1.6 -> dest=org.freedesktop.Notifications serial=1399 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications;
member=GetCapabilities
Run Code Online (Sandbox Code Playgroud)
我知道第一个是信号,而第二个是方法。目的地是否意味着信号可以有特定的接收器/插槽?什么是会员?信号后面的列表项是信号中传递的参数吗?什么是发件人和连续出版物?
我注意到音量控制和通知之间的关系。从我从 dbus-monitor 输出中读到的
method call sender=:1.6 -> dest=org.freedesktop.Notifications serial=1400 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
string "gnome-settings-daemon"
uint32 0
string "notification-audio-volume-medium"
string " "
string ""
array [
]
array [
dict entry(
string "value"
variant int32 38
)
dict entry( …Run Code Online (Sandbox Code Playgroud)我在以字典格式(字符串,变体)传递函数的参数时遇到问题;我尝试在 gnome 中运行截屏视频并启动我需要传递这些参数的功能:
-method name="Screencast"-
-arg type="s" direction="in" name="file_template"/-
-arg type="a{sv}" direction="in" name="options"/-
-arg type="b" direction="in" name="flash"/-
-arg type="b" direction="out" name="success"/-
-arg type="s" direction="out" name="filename_used"/-
-/method-
Run Code Online (Sandbox Code Playgroud)
这是我的电话:
~$ gdbus call --session --dest org.gnome.Shell.Screencast --object-path /org/gnome/Shell/Screencast --method org.gnome.Shell.Screencast.Screencast "test_ %d_ %t.webm" {dict:string:variant:"draw-cursor",true,"framerate",35,pipeline,"vp8enc min_quantizer=13 max_quantizer=13 cpu-used=5 deadline=1000000 threads=%T ! queue ! webmmux"}
Run Code Online (Sandbox Code Playgroud)
这是错误输出:“a{sv}”:0-33:无法解析为“a{sv}”类型的值。错误在语法中?谢谢
bash ×2
dbus ×2
notification ×2
command-line ×1
gnome ×1
notify-osd ×1
python ×1
screencast ×1