1

When I use fish shell and try to close the terminal without exiting from fish, it gives me a warning before closing. How to get rid of the warning?

screenshot of popup warning on terminal that states: Close this terminal? There is a still a process running in this terminal. CLosing the terminal will kill it.

mchid
  • 44,904
  • 8
  • 102
  • 162
Ravi
  • 33

1 Answers1

2

This is actually a warning from the gnome-terminal and is independent of the shell you're using.

According to other users, the following command will disable the warning:

gsettings set org.gnome.Terminal.Legacy.Settings confirm-close false

However, it will also disable the warning when there are other processes "still running" besides fish so it's kind of a tradeoff.

To enable the warning again, run the following command:

gsettings set org.gnome.Terminal.Legacy.Settings confirm-close true

Alternatively, if you normally use fish instead of bash, you can avoid this problem altogether by setting your default shell to fish. To do so, use bash to run the following command:

chsh -s $(which fish)

Close the terminal and open a new one or log out and log back in to apply the changes.

To change the default shell back to bash, use fish to run the following command:

chsh -s (which bash)

Again, log out and log back in or close the terminal and open a new one to apply the changes.

Click here for different methods of setting fish as the default shell.

mchid
  • 44,904
  • 8
  • 102
  • 162