Skip to content

Instantly share code, notes, and snippets.

@matzipan
Last active March 10, 2020 12:27
Show Gist options
  • Save matzipan/c129be7f5b42e76b6de4c25600f0d744 to your computer and use it in GitHub Desktop.
Save matzipan/c129be7f5b42e76b6de4c25600f0d744 to your computer and use it in GitHub Desktop.
Getting Gala to run with Wayland

If you're interested in helping with this, join us on IRC: #elementary-dev on irc.freenode.net

Prerequisite: install the xwayland package.

I managed to get Gala to run in a VT with:

dbus-run-session -- gala --display-server --wayland

It even works with just gala --display-server --wayland, but the session still doesn't start.

However, the desktop doesn't seem to start. Investigating.

Running plank --display=:1 crashes the Gala with

Fatal server error:
(EE) wl_drm@4: error 0: authenicate failed
(EE) 

(gala:23356): mutter-ERROR **: Connection to xwayland lost

The following seem to only work with when gala is run inside an X session with gala --wayland:

  • Running wingpanel --display=:1 works as long as wingpanel is closed in any other session. The indicators seem to open towards the top of the screen though.
  • Running pantheon-calculator --display=:1 launches the Calculator, but there are no close or maximize buttons.
@donadigo
Copy link

donadigo commented Nov 3, 2016

  • Some of the wingpanel's indicators use libwnck which is a library built on X and they won't work properly.
  • Plank uses libbamf and libwnck which also is a library that uses X, that also needs to be ported / removed to be able to get it work.

@matzipan
Copy link
Author

matzipan commented Nov 3, 2016

@matzipan
Copy link
Author

matzipan commented Nov 3, 2016

Peter [3:51 PM]
I remember Rico said that it was "luck" till now that the plugin could be compiled in wingpanel. With the new mutter it will be not possible. Maybe this is also the case in the context of wayland? Also the plugin does stuff that is not needed in wayland, wingpanel also

@matzipan
Copy link
Author

matzipan commented Nov 5, 2016

I managed to get applications running under wayland with the environment variable GDK_BACKEND=wayland

@naftulikay
Copy link

@matzipan thanks so much for looking into this. I'm happy to contribute some work toward elementary to port to Wayland, as I see this as a very important feature.

@roidm
Copy link

roidm commented Nov 15, 2016

I can start a pantheon-session under wayland from gdm on archlinux and it seems to work ok, (no plank)
all compiled from src using mutter/gtk 3.22.2

sorry for the bad quality pics, screenshot tools doesnt work on wayland and pantheon-session, (it does on gshell)


@matzipan
Copy link
Author

Hey guys,

If you're interested in contributing towards making this happen, join us on IRC in #elementary-dev on irc.freenode.net

@soloturn
Copy link

soloturn commented Jul 11, 2018

@matzipan if you start gala with dbus-run-session -- gala --display-server --wayland how do you exit it again, or start any program like a terminal?

@roidm what gdm is using as command line to start pantheon-session?

because i read on ::
startx /usr/bin/gnome-session --session=pantheon
what i tried is, on arch:

pacaur -S gala-git
pacaur -S pantheon-session-git
XDG_SESSION_TYPE=wayland  dbus-run-session gnome-session --session=pantheon

and it did not work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment