2
GUI applications executed from a script try to connect to the X server specified by the DISPLAY
variable. If you clear that variable, programs will not be able to open a window, so that should effectively prevent any popups. For example, if you try to run this:
DISPLAY= xterm
You'll get an error like this:
xterm: Xt error: Can't open display: xterm: DISPLAY is not set
Either you can write DISPLAY=
right in front of the command you want to run like I showed with xterm
above, or you can write DISPLAY=
on its own line somewhere earlier in the script.
However, some programs might not start at all if DISPLAY
is not set.
If that's the case for the program generating the popup,
and if this program does something useful other than the popup,
then you won't be able to use this technique. It's worth a shot anyway.
Indeed, the program refuses to start in this case. – Daniyal Shahrokhian – 2017-03-24T11:52:58.400
1Some more details, like which command is executed etc., would help. – dirkt – 2017-03-23T21:53:35.493
It's a c++ binary from this open source project. My bad, I just found a quiet option in the Wiki section for the command line argument.
– Daniyal Shahrokhian – 2017-03-24T11:46:22.453