[Bug 1067774] Re: 'alert' alias creates notifications that don't go away in GNOME 3
Anders Christensen
eddiedog99 at gmail.com
Sun Jun 29 12:59:22 UTC 2014
** Changed in: bash (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash in Ubuntu.
https://bugs.launchpad.net/bugs/1067774
Title:
'alert' alias creates notifications that don't go away in GNOME 3
Status in “bash” package in Ubuntu:
Confirmed
Bug description:
The default .bashrc has this:
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
This creates a libnotify popup showing your last command. The problem
is that it creates a notification in the system tray, which only goes
away when you right click and choose "Remove". This is annoying since
now instead of just getting a notification and handling it, you need
to go into the system tray and remove the notification, then handle
whatever it is you actually wanted to do.
Red Hat has a bug report on this:
https://bugzilla.redhat.com/show_bug.cgi?id=693207
Their solution is to add this to notify-send when you want it to be
transient:
--hint=int:transient:1
So I think the default alias should be this:
alias alert='notify-send --hint=int:transient:1 --urgency=low -i
"$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed
-e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
I've tested this on my machine and it does what I was wanting: A
notification pops up, then goes away.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1067774/+subscriptions
More information about the foundations-bugs
mailing list