masm11 / emacs

Mirror of GNU Emacs
http://www.gnu.org/software/emacs/
GNU General Public License v3.0
198 stars 14 forks source link

No need for GDK_BACKEND=wayland #40

Closed bhepple closed 4 years ago

bhepple commented 4 years ago

(compiled from fejfighter's repo - but the doco is here - maybe that should be migrated across)

There's no need for GDK_BACKEND=wayland when running emacs - it automatically runs as a wayland client.

GDK_BACKEND=x11 works as expected.

masm11 commented 4 years ago

Yes.

But how to know whether emacs is running on wayland native? GDK_BACKEND=wayland is a good way to make sure.

bhepple commented 4 years ago

AFAIK, the default in GDK is for an app to run with a Wayland backend if it is detected. Otherwise it will run x11. The only need for GDK_BACKEND is to force x11 in a wayland setup.

In short, when I run (pure-gtk) 'emacs', it comes up as a wayland app. If I run 'GDK_BACKEND=x11 emacs' then it comes up as x11.

If 'xeyes' follows the sprite in an app then it's x11 - that's how I tell.

masm11 commented 4 years ago

Normally, we run pgtk emacs without GDK_BACKEND=wayland. But after someone builds pgtk emacs for the first time, he/she should want to know whether it is really running on wayland native. If he/she built X emacs (with gtk3) by mistake, GDK_BACKEND=wayland ./src/emacs will fail.

If I rewrite README.md as follows, do you agree?


Running

./src/emacs

If you want to know whether it is really running on wayland native, then run as follows:

GDK_BACKEND=wayland ./src/emacs

bhepple commented 4 years ago

That's great, thanks. I think it clears it up.

masm11 commented 4 years ago

thanks. done.