1. Overview
Although Linux systems are often headless, there are times when we might want to customize the desktop experience. For instance, one such customization is the arrangement of the window control buttons. This task is essential in different scenarios, such as providing quick access to manage open windows or creating a more organized desktop according to personal preferences.
In this tutorial, we’ll check out methods for adding the minimize and maximize buttons to the GNOME shell window on an Ubuntu 22.04 installation.
Specifically, we use the gsettings command, the dconf Editor, and the Tweaks tool on a GNOME desktop.
2. Using the gsettings Command
gsettings is a command-line tool used to configure different settings in the GNOME desktop environment. Moreover, we can use it to set the layout of the window control buttons.
For instance, let’s run the gsettings command to rearrange the minimize and maximize buttons of a shell window:
$ gsettings set org.gnome.desktop.wm.preferences button-layout "close,minimize,maximize:"
Here, we set button-layout as close,minimize,maximize: to display the close and minimize buttons followed by the maximize button on the title bar of GNOME shell windows:
In the gsettings command, we can also change the button-layout style to place all buttons on the right side of the window:
$ gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close"
Let’s check the result:
The above command places the minimize button on the far left, followed by the maximize button, and then adds the close button on the right side of the window.
Another scenario is to only add the minimize and maximize to the right side of the window, while the close button remains on the left side.
For this, let’s modify the button-layout style in the gsettings command:
$ gsettings set org.gnome.desktop.wm.preferences button-layout "close:minimize,maximize"
Here, we passed close:minimize,maximize as our desired button-layout style of GNOME shell window:
As a result, we can see the close button positioned at the left side followed by the minimize and maximize buttons at the right side of the window.
3. Using the dconf Editor
The dconf Editor provides a graphical interface to directly edit the configuration settings in GNOME.
In this case, we use the dconf Editor to modify the button layout style of the GNOME shell window.
For this, first, we open a terminal and install dconf Editor on the system using apt:
$ sudo apt-get install dconf-editor
After a successful installation, we launch the Activities menu, type dconf Editor, and open it:
Then, we navigate to the /org/gnome/desktop/wm/preferences/ path, look for the button-layout option, and click it:
Next, we set :minimize,maximize,close as the Custom value of the button-layout and click Apply:
Let’s check the result:
Thus, we can see the minimize and maximize buttons on the left side of the opened window.
4. Using the GNOME Tweaks Tool
Alternatively, we can also use the GNOME Tweaks tool to customize the layout of the window control buttons.
However, first, we need to install the GNOME Tweaks tool on our system. To do so, let’s open the terminal and install the gnome-tweaks package via apt:
$ sudo apt-get install gnome-tweak-tool
After a successful installation, we bring up the Activities menu, type Tweaks, and launch it:
Next, we go to the Window Titlebars from the left-side panel:
Under the Titlebar Buttons section, we enable Maximise and Minimise toggles and set their Placement as Left:
Now, let’s check the result:
Consequently, we can see the added minimize and maximize buttons on the left side of our GNOME shell window.
5. Conclusion
In this article, we learned different methods for adding minimize and maximize buttons to the GNOME shell window.
Particularly, we can use the gsettings command if we prefer to set the button layout using a shell. On the other hand, the dconf Editor and the GNOME Tweaks tool enable us to perform the same operation through more user-friendly interfaces.
Ultimately, we can select any of these methods based on our preferences for using the system interface or a shell.