what is notify-send (Ubuntu)

本文介绍了如何通过notify-send命令自定义Thunderbird邮件客户端的通知时间,包括安装依赖、使用notify-send命令显示弹窗消息及调整消息显示时长,并提供了一个在脚本中周期性提醒的示例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I am try to use Thunderbird of my Email client. but I found the notify time is too short when a new message coming. so I try to modify it....
the notify-send !
This was pretty cool , Wanted to share with you all !!!!

Notify-send is a great application for notifying you when an event has occurred. An event such as a script running to completion.

If notify-send is not installed on your machine already, install the package "libnotify1" (or possibly just "libnotify") and  "libnotify-bin" from your repositories.

Once installed you can simply type the following, at the command line, to display a pop-up message near your system tray:

Code:
notify-send "hello"

By default the message will be displayed for 5 seconds. To change how long a message stays displayed use the "-t" switch. This will change, in milliseconds, how long the message is displayed. Enter "-t 0" to leave the message up until the user closes it.

Code:
notify-send "This message will be displayed for 3 seconds" -t 3000
notify-send "Click me to close me." -t 0

You can even add a title and an icon to the notification.

Code:
notify-send "This is the Title" /
"Check out the cool icon" /
-i /usr/share/pixmaps/gnome-terminal.png

When used in a script you could set it to notify you periodically by placing the command in a loop:

Code:
#!/bin/bash

while [ 1 ]; do
notify-send "Up Time" "`uptime`"
sleep 5m
done
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值