notify-send

发送桌面通知、通知用户某个事件或显示某种形式的信息而不妨碍用户的程序

语法

  notify-send [OPTIONS] 

选项




   -u, --urgency=LEVEL
               紧急程度 (low,  normal,  critical).
 
   -t, --expire-time=TIME
               通知的超时时间(以毫秒为单位)
 
   -i, --icon=ICON[,ICON...]
               要显示的图标文件名或库存图标
 
   -c, --category=TYPE[,TYPE...]
               指定通知类别
 
   -?, --help
               help显示帮助信息
 
   -h, --hint=TYPE:NAME:VALUE
                传递额外数据。有效的TYPE是int,double,string和byte。

要使用notify-send,您可能需要安装以下软件包:

$ sudo apt-get install libnotify-bin

例子

$ notify-send "Hello World"

$ notify-send -t 5000 -u low "Hello World"

如果所有信息都已成功写入,则返回状态为零

notify-send 命令实例:

linux命令:notify-send ["<title>"] "<body>" "<body>" ["<title>"] notify-send notify-send ["<title>"] "<body>"rootopen.com
linux命令:notify-send ["<title>"] "<body>" "<body>" ["<title>"] notify-send notify-send ["<title>"] "<body>"rootopen.com
2018-06-03 07:46:48

linux命令:notify-send --hint=int:transient:1 -u low -t 100 "Command" "Finished" "Finished" "Command" 100 -t low -u --hint=int:transient:1 notify-send notify-send --hint=int:transient:1 -u low -t 100 "Command" "Finished"rootopen.com
linux命令:notify-send --hint=int:transient:1 -u low -t 100 "Command" "Finished" "Finished" "Command" 100 -t low -u --hint=int:transient:1 notify-send notify-send --hint=int:transient:1 -u low -t 100 "Command" "Finished"rootopen.com
2018-03-09 09:21:48

linux命令:notify-send " " -i notification-display-brightness-low -h int:value:50 -h string:x-canonical-private-synchronous:brightness string:x-canonical-private-synchronous:brightness -h int:value:50 -h notification-display-brightness-low -i " " notify-send notify-send " " -i notification-display-brightness-low -h int:value:50 -h string:x-canonical-private-synchronous:brightnessrootopen.com
linux命令:notify-send " " -i notification-display-brightness-low -h int:value:50 -h string:x-canonical-private-synchronous:brightness string:x-canonical-private-synchronous:brightness -h int:value:50 -h notification-display-brightness-low -i " " notify-send notify-send " " -i notification-display-brightness-low -h int:value:50 -h string:x-canonical-private-synchronous:brightnessrootopen.com
2018-05-16 17:33:48

linux命令:notify-send -t 5000 "date" "$(date)" "$(date)" "date" 5000 -t notify-send notify-send -t 5000 "date" "$(date)"rootopen.com
linux命令:notify-send -t 5000 "date" "$(date)" "$(date)" "date" 5000 -t notify-send notify-send -t 5000 "date" "$(date)"rootopen.com
2018-03-11 20:13:48

Linux的Bash命令行(A-Z排序)