3

This is an annoying problem I've been having for a couple years. I have ubuntu 16.04 installed on an intel PC, and also 18.04 installed on a Windows box under WSL 1. In both cases I am connecting to the ubuntu system with SSH (PuTTY, actually) tunnelling X11, and using Xming as the X server. I used apt-get to install the emacs25 distribution. It works fine except for one annoying problem. When I run emacs, using, for instance

emacs ex1.c &

I can see that the window initially pops up with some reasonable size, but then immediately resizes itself so that it only shows 3 lines of text. I can resize it manually (i.e., with the mouse), and after that it behaves reasonably. I get essentially the same result with

emacs -geometry 80x51 ex1.c &

The initial window is now 80x51, but as before, it immediately resizes itself to a squat 80x3 window. I have no ~/.emacs, and no .Xresources. The behavior is identical if I use emacs -q or emacs -Q.

Why is the emacs frame resizing itself? How do I stop it from doing that?

3
  • Can confirm this happens with MobaXterm as well - whether using its built-in X server or Xming on the local side. Curious. Feb 13, 2020 at 15:36
  • I know you say you don't have a .emacs file, but could you please confirm this still happens when you invoke "emacs -q" and "emacs -Q" just to completely rule out some option / config / site init file being responsible? Feb 13, 2020 at 19:33
  • @nickcrabtree: Yup, exactly the same behavior with both -q and -Q.
    – Leon Avery
    Feb 13, 2020 at 19:35

1 Answer 1

2

I see the same behaviour on CentOS 8.1 with Emacs 26.1.
I ended up adding the following lines to my ~/.emacs to workaround the issue.
Some values (like 36) caused emacs to still resize down to 3 lines.

(add-hook 'after-init-hook (lambda () (set-frame-height (selected-frame) 37 )))
4
  • That works! Thanks.
    – Leon Avery
    Apr 28, 2020 at 22:05
  • Is there any theory why this happens? I'm thinking it would be better to fix it at the root...
    – thoni56
    Jun 4, 2020 at 20:10
  • And BTW I see this with VcXsrv 1.18.30.0 also.
    – thoni56
    Jun 4, 2020 at 20:12
  • ... and VcXsrv 1.20.8.1 as well as with Xming.
    – thoni56
    Jun 4, 2020 at 20:20

You must log in to answer this question.

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