Except sometimes it repeated 30, 40, I don't know how many times. I spent several minutes clicking and clicking to erase all the popups. This was insane.
Then as I was reading man pgrep I saw a crossreference to pkill. Instead of killing a process by the PID number, it can kill by name. When it does it kills every instance of the process.
Both pgrep and pkill are limited to the processes that one user with their -u option.
So I made a Bash program:
Code: Select all
#!/bin/bash
pkill -f -u $UID xfce4-screensho
Today I simplified it. In the launcher itself I I entered:
Code: Select all
pkill -f -u AAAA xfce4-screensho
The -f option is optional. It means kill only processes with that exact name. Let me explain. The same option is in pgrep:
Code: Select all
pgrep -u $UID display
not only listed every running occurence in ImageMagick's display but also a program displaytest.sh.
Code: Select all
pgrep -x -u $UID display