LINUX.ORG.RU

Командование notification-daemon`ом через dbus-send

 ,


1

2

Делаю по спецификации: http://www.galago-project.org/specs/notification/0.9/x408.html#command-notify
Если слать

dbus-send --print-reply --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.Notify string: uint32:0 string: string:summary string:body array:string: dict:string:byte:urgency,1 int32:1000
Выдаёт
Error org.freedesktop.DBus.Error.InvalidArgs: Type of message, `(susssasa{sy}i)', does not match expected type `(susssasa{sv}i)'
Если слать
dbus-send --print-reply --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.Notify string: uint32:0 string: string:summary string:body array:string: dict:string:variant:urgency,byte:1 int32:1000
Выдаёт
dbus-send: Unknown type «variant»

Баг в dbus-send?

Ответ на: комментарий от ratvier

Also, dbus-send does not permit empty containers or nested containers (e.g. arrays of variants).

Вот блин. Ущербная утилита.

LinuxUser ★★★
() автор топика

Погуглил и нашёл альтернативу — gdbus. Пример использования:

gdbus call --session --dest org.freedesktop.Notifications --object-path /org/freedesktop/Notifications --method org.freedesktop.Notifications.Notify 'appname' 0 dialog-information «Title» «Message» [] {} 15000

http://stuckinbuttons.livejournal.com/6186.html?view=19242

LinuxUser ★★★
() автор топика
Последнее исправление: LinuxUser (всего исправлений: 1)
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.