15

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?

Wilf
  • 30,194
  • 17
  • 108
  • 164
scdmb
  • 1,167
  • running the command in terminal with 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

3 Answers3

16

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.

Hinz
  • 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 can also launch dconf-editor in the GUI. It has an icon and all. ;) – Hinz Oct 25 '21 at 09:56
3

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 AppsGnome-terminalglobal and uncheck the option confirm_window_close.

Source

Fabby
  • 34,259
zian
  • 31
0

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.

Parto
  • 15,325
  • 24
  • 86
  • 117