I’m currently doing some screen recording for an upcoming Ubuntu video and while doing so reminded myself of a hidden setting I use that I don’t think I’ve written about before.

I use the term “hidden” loosely as it’s the switch is not hard to find but, unless you know it’s there at all, you’d probably never think to go and look for it.

Anyway, when it’s turned all app windows open in the middle of the screen, like so:

Animated GIF showing app windows opening in the middle of the screen on Ubuntu
Portions of this GIF were shortened for dramatic effect ;)

I find this “center spawning” behaviour predictable, reliable, and a few other -bles as well.

I also think centred windows are incredibly useful when recording my screen as the ‘center’ of the screen is where viewers are generally looking anyway. Plus, knowing where new windows appear makes video editing easier too.

So if you want to make new app windows open in the center of the screen in Ubuntu you can. You just need to make use of a system setting not exposed in the standard GUI (though you can access a GUI toggle for it if you install the GNOME Tweaks tool).

You can also run a command to “Center New Windows” in Ubuntu (or any Linux distribution using GNOME Shell as its default desktop environment):

  • Open a new Terminal window
  • Paste: gsettings set org.gnome.mutter center-new-windows true
  • Hit the enter key

The change takes effect instantly.

Go test it; click on any app you have pinned to the Ubuntu Dock (assuming it’s not already open, of course) and watch as the app window spawns directly in middle of the screen.

Simple as that!

If you want to turn this behaviour off you can do so easily.

Re-run the command above, this time replacing true at the end of the input with false. Again, hit enter to apply the change immediately. Thereon, new windows will spawn …somewhere on your display — I’m not sure of the exact default placement heuristic as it can be quite random!

Let me know if you find this setting useful by leaving a comment.

GNOME Tweak Tool mutter