见图
这个有办法通过程序控制吗
ubuntu 播放音乐等的提示信息的方块是怎么实现的?
-
- 帖子: 29
- 注册时间: 2013-10-16 12:43
- 系统: ubuntu 12.04
- astolia
- 论坛版主
- 帖子: 6494
- 注册时间: 2008-09-18 13:11
Re: ubuntu 播放音乐等的提示信息的方块是怎么实现的?
这是linux的桌面通知框架,算是一个标准了。ubuntu现在用的是notify-osd实现,以前用的是notification-daemon。
程序中一般通过libnotify库进行处理,直接通过dbus发消息也行
有命令行工具notify-send,包含在libnotify-bin包中。一般的脚本编程可以考虑用这个
程序中一般通过libnotify库进行处理,直接通过dbus发消息也行
有命令行工具notify-send,包含在libnotify-bin包中。一般的脚本编程可以考虑用这个
代码: 全选
notify-send -i face-cool 标题 这是内容
代码: 全选
$ notify-send --help
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.
-a, --app-name=APP_NAME Specifies the app name for the icon
-i, --icon=ICON[,ICON...] Specifies an icon filename or stock icon to display.
-c, --category=TYPE[,TYPE...] Specifies the notification category.
-h, --hint=TYPE:NAME:VALUE Specifies basic extra data to pass. Valid types are int, double, string and byte.
-v, --version Version of the package.
-
- 帖子: 29
- 注册时间: 2013-10-16 12:43
- 系统: ubuntu 12.04