2

I wanted to schedule a job to run at a specific time just once. So, I used the at command:

at now -f /path/to/task.sh

Now, in the task script, I wrote code to display notifications using notify-send in an infinite loop:

while true
do
 notify-send "Reminder!!" "Reminder text"
done

I did this because I did not want the notification to go away by itself, and thought that I will be able to stop the notifications manually by killing its process.

So, I executed pkill notify-osd, but another instance of the process starts as soon as I do this.
I also tried by removing this job from that at queue by executing atrm <job-id>, but the notifications did not stop.

So, now I have got notifications being displayed continuously displayed on my screen.
How do I stop it?

I am using Ubuntu 14.04 LTS

12
  • Kill the parent of the most recent notify-osd job.
    – Jos
    Nov 19, 2015 at 11:44
  • How do I find its parent? Nov 19, 2015 at 11:54
  • Do ps -ef and look in the third column, that is the PPID or Parent Process ID.
    – Jos
    Nov 19, 2015 at 11:57
  • Just restart GUI session Nov 19, 2015 at 15:44
  • @Jos Its parent was the atd job. I killed it but it restarted. Also its parent pid is '1', so I don't think we can kill the parent. Nov 19, 2015 at 16:02

1 Answer 1

0

The solution was to logout and login back, as mentioned by @Serg in the comments here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .