No, it is a popup caused by indicator applet complete has quit unexpectedly.
https://www.dropbox.com/s/eqfaf4zfncsuw24/Simulate_Enter_Keypress.png?dl=0
I am using Ubuntu Mate 18.04.
This works with run from cli, but not when added to my Startup Applications.
#!/bin/bash
#
# Automatically close that popup windows that occurs with every boot up
#
# xdotool selectwindow This determines the window id or 2nd method
# xdotool search --name "Error"
id=$(xdotool search --name "Error")
xdotool key --window $id alt+F4
Your script IS working - the only problem is - at startup it will only run once. And if the popup is not present when it is auto-ran - your script will have no effect, because it has nothing to act upon.
So what you could do is add an infinite loop and then keep looping and checking for it and killing it whenever it pops up. This would help if the dialog tends to pop up multiple times during your sessions.
If it only tends to pop up once, you'd do all of the above, but as soon as you have killed the window once, you can use "exit" to end the script.
Like this:
Code:
#!/usr/bin/env bash
# Periodically check for the existence
# of an "Error" window
# and kill it if it exists
while true
do
id=$(xdotool search --name "Error")
if [ "$id" ]; then
xdotool key --window "$id" alt+F4
# uncomment the line below if the window only pops up once
#exit
fi
id="" # reset id to blank
# Sleep the thread for a while
# Use whatever period you feel is required
sleep 60s
done
If you put the above script into your startup - it will run indefinitely and will check whether the popup window exists. If it does not exist, it will sleep for 60 seconds before reiterating through the loop and checking again.
If the window does exist - the script will close it, before sleeping for 60 seconds and checking again for the existence of the window.
That will fix the problem if the error pops up more than once during your session. Whenever an "Error" window pops up - the next time the script wakes up, it will kill it for you.
If the error message only tends to pop up once per session - uncomment the line that says "#exit", to read "exit". Then the above script will run until the dialog eventually pops up and will end as soon as the offending window has been killed.
Again, feel free to tweak the amount of time that the script sleeps for.
I haven't tested this BTW. But off the top of my head - it should work!