Ubuntu – How to remove rounded borders from windows in Ubuntu 18.04 with GNOME shell

18.04gtkgtk3themeswindow

How can I make window edges squared (instead of round) in Ubuntu 18.04? I am using the Ambiance theme.

enter image description here

What I tried (without any success on 18.04):

  1. The solution from How do I remove rounded borders in GNOME Shell?, which was from an older version of Ubuntu (11.04?) that used GNOME shell.

  2. The solution from How to make ambiance title bar corners squared?, which worked for me in Ubuntu 16.04 when Unity was the default.

Interestingly, the question Rounded corners of windows is trying to remove square corners (which it achieved by removing ~/.config/gtk-3.0/gtk.css) so presumably I need to add some code to that file.

Any ideas on what CSS code is needed?

Best Answer

  • Adding the following lines to ~/.config/gtk-3.0/gtk.css have made the corners square:

    .titlebar,
    .titlebar .background {
      border-top-left-radius: 0px;
      border-top-right-radius: 0px;
      border-bottom-left-radius: 0px;
      border-bottom-right-radius: 0px;
    }
    

    As an alternative, you can use border-radius: 0px 0px 0px 0px.