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

  • Kill the parent of the most recent notify-osd job. – Jos Nov 19 '15 at 11:44
  • How do I find its parent? – Anmol Singh Jaggi Nov 19 '15 at 11:54
  • Do ps -ef and look in the third column, that is the PPID or Parent Process ID. – Jos Nov 19 '15 at 11:57
  • Just restart GUI session – Sergiy Kolodyazhnyy Nov 19 '15 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. – Anmol Singh Jaggi Nov 19 '15 at 16:02
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.