WSL: Graphical emacs doesn't work; spins on poll()/writev()/recvmsg()

Splitting this out from #187 so that it doesn’t get lost.

Steps to reproduce:

  • Install Xming on Windows
  • Install emacs in WSL: sudo apt-get install emacs24
  • Set export DISPLAY=localhost:0 in a WSL terminal
  • Run emacs in the same WSL terminal

Expected:

  • A graphical emacs window should appear, rendered by Xming

Actual:

  • This appears:

2016-07-01 1

And emacs hangs / is unresponsive. The X button in the top-right corner does not close it. Ctrl-C in the WSL terminal window doesn’t close it either. It’s necessary to get a shell prompt and do a kill -9 to get it to close.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Reactions: 3
  • Comments: 22 (7 by maintainers)

Most upvoted comments

You can fix the resizing issue by compiling a Lucid version instead of GTK. The problem seems to be something with the GTK resizing code. Get emacs from the git repo (I recommend the GitHub mirror btw, Savannah is slow), and build with ./configure --with-x-toolkit=lucid

You can get all the dependencies worked out before hand too with apt-get build-dep emacs24-lucid.

@fehrin

sudo add-apt-repository ppa:ubuntu-elisp/ppa sudo apt-get update

Seems it’s fixed in Creator’s update, follow the instructions on the link: https://www.reddit.com/r/bashonubuntuonwindows/comments/65dpjd/getting_xapplications_running_in_ubuntu_16041/

@aseering @redviper Do you guys have any problem with maximize emacs window? This is my problem emacs-snapshot with Xming. It doesn’t refresh current frame fit to maximized window width & height.

capture

$ emacs -fs
$ emacs -mm
$ emacs -fh -fw

These doesn’t work for me. Any ideas?

  • Surface book
  • Build 14379
  • Xming
  • emacs-snapshot on ppa:ubuntu-elisp

This has, oddly, been fixed in emacs-25 pretest. I am using graphical emacs atm.