Each time when I want to close terminal there is a popup with question "Close this terminal?" because some process is running in terminal. I don't care about this process. How to prevent terminal from showing this popup?
3 Answers
In 16.04 you'll find that choice in dconf-editor. You can install it, if necessary, with
sudo apt install dconf-editor
Then go to
org -> gnome -> terminal -> legacy
and uncheck confirm-close
.

- 562
-
for begginers like me: after install it, run:
dconf-editor
in the terminal and you will see a gui and follow the next instructions. – Stav Alfi Sep 25 '21 at 15:10 -
You will have to install gconf-editor
first. Just open the terminal using Ctrl+Alt+T and type the following command:
sudo apt-get install gconf-editor
After that, hit Alt+F2 or open the Dash and type gconf-editor
and the configuration editor window will appear. Then you go to Apps→Gnome-terminal→global and uncheck the option confirm_window_close
.
-
It seems like there is nothing under Apps called Gnome-Terminal. However, there is desktop
/
→desktop
→applications
→terminal
under which such option does not seem to exist, onlyexec
andexec_arg
. – Anders Lindén Dec 27 '16 at 21:57 -
1This works for MATE terminal too, but you have to use
dconf-editor
, the key is underorg.mate.terminal.global
– Joril May 09 '17 at 08:37 -
This answer is out-of-date now. The correct answer for modern Ubuntu installations is Hinz's answer – Jonathan E. Landrum Feb 28 '18 at 16:04
Just press Ctrl + C to cancel any background process that may be running and then you can close the terminal without the popup showing up.
Note:
You can affect your system by closing the terminal with background processes running. A good example is if there is an update or upgrade running, the apt command can get locked up and you may start getting these errors:
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?
Luckily, they have been solved in this question.
That is just an example of what may happen if you close the terminal when a background process is running. Other things may happen depending on the process itself.
-
2+0. You meant well, but I don't think Ctrl+C stops background processes at all. Please test your answers before you post them. – unforgettableidSupportsMonica Aug 04 '17 at 00:20
-
nohup COMMAND & disown
can sometime fix it - this is useful if it is a GUI program like gedit or nautilus. – Wilf Jul 18 '14 at 21:44