When debugging UI programs, I see frequently the "Wait or force quit" Dialog.
This is super annoying, since this dialog blocks basically everything. The whole graphical system is not usable anymore until I select one of the options.
I would like to disable this completely or at least have an option to ignore this window.
In versions of mutter ≥ 3.35.92, you can set the timeout used to check if a window is still alive. This is also useful for X-forwarding over ssh with high latency. For example, you can set the timeout to 60 s (60000 ms) using:
This is a known issue. See "Program" is not responding when debugging in gdb.
Judging from the other bug report <something> is not responding window is constantly showing when debugging a program, which appears to be related, the problem seems to be fixed in
gnome-shell
version 3.28.4.Run
apt-cache policy gnome-shell
to know your installed version.If you are using an old version, try to upgrade your Ubuntu18 by running:
However, this issue remains opened for gdb debugging.
As an alternative, delay "Window not responding" Dialog could be a good solution. How to increase waiting time for non responding programs? relates to this, but I couldn't find details on how to do it.
A simpler workaround if update and patch not possible or inconvenient.
zenity
. (Check $PATH, for exact~/.../bin
location).mutter-dialog
or specific argument by checking parameters./usr/bin/zenity $@
)Reference: RH bug: Annoying zenity "forced quit" or "wait" pop up for everything while prelink/compiling/loaded
One way to achieve this is to change how long time a window is allowed to be "not responding" before the dialog is shown. The code that handles this is in the
libmutter-4-0
library, where the time is hard-coded to 5 seconds. Beware that the following is kind of a hack, not very elegant, but it does work. (And I had some fun doing it!)We can get the source code for the
libmutter-4-0
package like this:which gives a directory called
mutter-3.32.2+git20190711
. Go inside that directory:Then make a change in the file
src/core/display.c
on the line that looks like this:That means it will wait 5000 milliseconds before showing the "not responding" dialog. Change it to something much larger, I used 5000000 which corresponds to 5000 seconds:
Having made that change, we want to build the modified library. To do that, first configure like this:
(at that point there may be errors due to missing dependencies, just install what is missing using
sudo apt install
and trymeson _build
again)Then build:
After that, the new library file is in
./_build/src/libmutter-4.so.0.0.0
-- now all we need to do is to install it:and then reboot to make sure the window manager is restarted using the new library file. After reboot, the "not responding" dialog should be effectively disabled (strictly speaking it may still show up eventually, depending on what
PING_TIMEOUT_DELAY
value you used).If you want to revert this change and reinstall the original library file, that can be done using
sudo apt reinstall libmutter-4-0
.