1

I want to access the alert function in Gnome Schedule.

I can run alert from my default Bash command-line but receive the following error in Gnome Schedule:

/tmp/tmpxi4X16: line 1: alert: command not found
Press ENTER to continue and close this window.

The following screenshot illustrates the problem. The visible notification comes from the right terminal window. The left terminal window is the result of me manually running the recurrent task Mackup in Gnome Schedule.

enter image description here

orschiro
  • 13,317
  • 17
  • 87
  • 161

1 Answers1

1

If you look into your ~/.bashrc file youll find the alias which defines alert.

# 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$//'\'')"'

Example: Try as input in your manual terminal:

notify-send "Hello World!"
Mark Kirby
  • 18,529
  • 19
  • 78
  • 114
Videonauth
  • 33,355
  • 17
  • 105
  • 120