How do I hide/disable close buttons for GNOME windows?
You may try one of the following.
1. Tweak Pixel Saver code
You may tweak Pixel Saver to get rid of the buttons by following these steps:
- Go to Pixel Saver directory viz.
~/.local/share/gnome-shell/extensions/[email protected]/
(if it is installed locally). - Open the
extension.js
file with a text editor. -
Look for the three lines
Buttons.init(extensionMeta);
-
Buttons.enable();
Buttons.disable();
and comment them out by putting
//
before the lines (i.e. changeButtons.init(extensionMeta);
to//Buttons.init(extensionMeta);
and so on). - Save the
extension.js
file. - Restart GNOME shell by pressing alt+f2 and then entering
r
and pressing enter.
Note: These changes to the extension.js
file will most probably be overwritten by each update of the extension.
This will get rid of window buttons for maximised windows from the "Activities" bar at the top. I believe that's what you wish to achieve.
2. GNOME settings
If you want to get rid of all the buttons from all windows, run the following command in Terminal:
gsettings set org.gnome.desktop.wm.preferences button-layout :
3. Use a different extension
No Title Bar is a fork of Pixel Saver that specifically implements this functionality.