Prevent Gnome Terminal Closing on Middle Button Click in Ubuntu 22.04 LTS
If you are running Ubuntu 22.04 LTS with the Lubuntu LXQt Openbox window manager and have encountered the issue of accidentally closing the Gnome Terminal using the middle button click, you have come to the right place. This article will guide you through the process of preventing Gnome Terminal from closing on middle button click in Ubuntu 22.04 LTS.
Understanding the Problem
The default behavior of the middle button click in Gnome Terminal is to close the terminal window. While this behavior can be useful in some cases, it can also be frustrating if you accidentally close the terminal window while scrolling through the output. This issue can be particularly problematic if you have important commands or processes running in the terminal.
Preventing Gnome Terminal from Closing on Middle Button Click
To prevent Gnome Terminal from closing on middle button click, you can modify the terminal settings as follows:
Launch Gnome Terminal by clicking on the terminal icon in your application menu or by using the terminal shortcut key.
Right-click on the terminal window to open the terminal context menu.
Select
Preferencesfrom the context menu to open the terminal preferences window.In the preferences window, select the
Generaltab.Under the
Default Profilesection, click on theEditbutton to open the profile editor.In the profile editor, select the
Scrollingtab.Under the
Scrollingtab, uncheck theAllow middle-click pastecheckbox.Click on the
Closebutton to close the profile editor.Click on the
Closebutton to close the terminal preferences window.
After unchecking the Allow middle-click paste checkbox, Gnome Terminal will no longer close on middle button click. Instead, the middle button click will paste the contents of the clipboard into the terminal window.
In this article, we have discussed the issue of accidentally closing Gnome Terminal on middle button click in Ubuntu 22.04 LTS. We have also provided a step-by-step guide to prevent Gnome Terminal from closing on middle button click by modifying the terminal settings. By following the steps outlined in this article, you can avoid accidentally closing the terminal window and ensure that your commands and processes are not interrupted.
References
# This is a code block
echo "Hello, World!"