Ubuntu – How to use the eOS terminal notification in Ubuntu
command lineelementarygnome-terminalnotification
elementaryOS has the following feature to notify the user of a finished terminal process.
Is it possible to use this feature in Ubuntu?
Figure 1: Example of eOS terminal notification
Best Answer
What you want most probably already is available via your ~/.bashrc courtesy this and this:
Note: this assumes you have libnotify-bin installed. If it isn't, just run sudo apt-get install libnotify-bin to get it.
Check that your ~/.bashrc has lines like 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)" "Task finished" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
Note that "Task finished" isn't present in the original code.
So, in your specific example, you'll run
sudo apt-get update; alert
If you want the notification to remain on-screen a little longer, use -t 3000 (in milliseconds). Or, if you want the notification to display until you dismiss it, use --urgency=critical.
Best Answer
What you want most probably already is available via your
~/.bashrc
courtesy this and this:Note: this assumes you have
libnotify-bin
installed. If it isn't, just runsudo apt-get install libnotify-bin
to get it.Check that your
~/.bashrc
has lines like this:Note that "Task finished" isn't present in the original code.
So, in your specific example, you'll run
If you want the notification to remain on-screen a little longer, use
-t 3000
(in milliseconds). Or, if you want the notification to display until you dismiss it, use--urgency=critical
.Here's what I see: