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:
apt-get source libmutter-4-0
which gives a directory called mutter-3.32.2+git20190711
. Go inside that directory:
cd mutter-3.32.2+git20190711
Then make a change in the file src/core/display.c
on the line that looks like this:
#define PING_TIMEOUT_DELAY 5000
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:
#define PING_TIMEOUT_DELAY 5000000
Having made that change, we want to build the modified library. To do that, first configure like this:
meson _build
(at that point there may be errors due to missing dependencies, just install what is missing using sudo apt install
and try meson _build
again)
Then build:
ninja -C _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:
sudo install ./_build/src/libmutter-4.so.0.0.0 /usr/lib/x86_64-linux-gnu/
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
.