notification - notify-send (alert) not popping-up GUI bubble messages - Ask Ubuntu


when discovered alias last night encountered 1 called alert calls notify-send should pop gui bubble messages on desktop. in case it's mulit-monitor tv defined on built-in laptop in virtual screen. such notification bubbles (for example volume control) show on tv.

last night when tested:

alert "weather update: it's raining red states" 

nothing appeared. @ first au user , myself thought because youtube running full screen , google chrome window defined "always on top". turns out wasn't real problem , it's on-again off-again problem.

how can alert alias work?

ps: searched similar questions either went unanswered and/or not reference alert alias want use because native command hard remember, necessary control paramters.

aliases automatically created in ~/.bashrc

when in ~/.bashrc see these lines:

# add "alert" alias long running commands.  use 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$//'\'')"' 

the problem code --urgency=low flag. message pops up, times doesn't. after low priority right?

to make message appear set urgency critical. rather changing system default created new line own purposes:

# add "redalert" alias pop-up on gui desktop screens.  use so: #   redalert "weather update: it's raining red states" alias redalert='notify-send --urgency=critical -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' 

now can use:

redalert "weather update: it's raining red states" 

and works perfectly!


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User