也许我做错了什么,但是命令不应该单独运行吗?
notify-send -t 1 "test"
notify-send -t 1000 "test"
notify-send -t 10000 "test"有不同的暂停吗?第一个是几乎瞬间的,第二个是1秒,第三个是10秒?在任何情况下,我似乎都需要六秒钟的时间。
有办法绕过这种行为吗?由于开发人员将此标记为“特性”而不是bug,我想要一些替代方案。
发布于 2012-04-22 10:43:38
这是一个已知的bug:https://bugs.launchpad.net/ubuntu/+source/notify-osd/+bug/390508
(维护人员认为这是一个“设计决策”。)
发布于 2014-11-02 18:27:07
正如在上面的一篇文章中提到的,有一个设计决定不允许这个特性。幸运的是,其他人也不同意,并且已经建立了一个PPA,您也可以为您的系统逆转这一决定。
要解决你的问题,只需:
sudo add-apt-repository ppa:leolik/leolik
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install libnotify-bin
pkill notify-osdsudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt update
sudo apt install notifyosdconfigsudo add-apt-repository ppa:amandeepgrewal/notifyosdconfig
sudo apt-get update
sudo apt-get install notifyosdconfig有关上述解决方案的更多信息,请阅读本文:
可配置的Ubuntu通知气泡
发布于 2018-01-25 10:17:40
有一个小的方便的脚本notify-send.sh作为通知的插入替代-发送,使您能够关闭或替换以前发送的通知。
编辑:正如@Glutanimate所指出的,这个脚本默认支持过期时间。
最后,我无法获得工作的到期时间,因此我采用了一种非常讨厌的方式,在2秒超时时间内发送通知,如下所示:
notify-send.sh --print-id test | xargs -I {} bash -c "sleep 2 && notify-send.sh --close={}" &https://askubuntu.com/questions/110969
复制相似问题