I am using Emacs on Kubuntu. On startup, I maximize my Emacs frame with this command in my init.el:

 '(initial-frame-alist (quote ((fullscreen . maximized)))))

This works, but leaves a small gap around the not quite maximized frame as you can see here:

Gap around a 'maximized' Emacs frame.

Is there a way to completely maximize Emacs and remove this gap?

1 Answer 1


This is more of a workaround than a fix. As proposed by Bastian Beischer in this thread you can change how the window obeys the changes in geometry.

As some names of menu entries have changed, here is an updated version:

  1. Right click on the title bar.
  2. Select More Actions → Special Application Settings
  3. In the Size & Positions-Tab activate Obey Geometry Restrictions
  4. Set the value in the drop-down list to Force and keep the radio button next to it on No

This solved the problem for me. It worked for all instances of Emacs on my machine and did so persistently after restart. It also works on Ubuntu 16.04 with Plasma 5.5.5 and Emacs 25.2. Emacs 29.0.50 and Kwin 5.25.5 also work.


I tried to figure out what the difference between Special Window Settings and Special Application Settings is. This answer over on SE Unix&Linux suggests this change would only apply for the specific window, but I could not reproduce this. For me it changes for all windows.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .