Questions tagged «notify-send»

1
通知发送通知类别,提示和版本参数是什么意思?
该notify-send命令手册说 Usage: notify-send [OPTION...] <SUMMARY> [BODY] - create a notification Help Options: -?, --help Show help options Application Options: -u, --urgency=LEVEL Specifies the urgency level (low, normal, critical). -t, --expire-time=TIME Specifies the timeout in milliseconds at which to expire the notification. -i, --icon=ICON[,ICON...] Specifies an icon filename or stock icon …

3
从udev规则呼叫通知发送
我使用Linux Mint 13 MATE,并且尝试在插入/拔出设备时设置通知。 首先,我找到了udev-notify软件包,但不幸的是,它几乎对我不起作用:它只用了很少的时间(1-2分钟),然后,如果我连接/断开任何设备,它就会崩溃: Traceback (most recent call last): File "./udev-notify.py", line 319, in <module> notification.show() glib.GError: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.1061 was not provided by any .service files 我没有找到任何解决方案,因此我不得不将其删除。(日提交错误报告也) 令人惊讶的是,到目前为止我还没有找到类似的实用程序。然后,我尝试编写应与所有设备匹配的udev规则。我添加了新文件/etc/udev/rules.d/notify.rules: ACTION=="add", RUN+="/bin/bash /home/dimon/tmp/device_plug.sh" ACTION=="remove", RUN+="/bin/bash /home/dimon/tmp/device_unplug.sh" 还有两个脚本: device_plug.sh: #!/bin/bash export DISPLAY=":0" notify-send "device plugged" /usr/bin/play -q /path/to/plug_sound.wav & device_unplug.sh: …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.