Fedora 21 will come with GNOME 3.14, which already runs reasonably well on Wayland. Want to find out? It’s super easy to try it out! Let’s take a look at how to run GNOME on Wayland in Fedora 21, what already works, and what is yet to be finished.
To run GNOME on Wayland, you need to install a package called gnome-session-wayland-session (this package most likely will be pre-installed in F21 Beta). Then you just need to log out and choose GNOME on Wayland as a session on the login screen. That’s it. Once you hit the “Sign In” button, you’re in GNOME that is running on Wayland.
Before we look at how GNOME runs on Wayland I think it’s necessary to explain what Wayland is. A widespread misconception is that Wayland is a display server, a layer between clients (applications) and the kernel, like X or Mir. The truth is that Wayland is only a protocol that defines how a compositor communicates with clients. GNOME developers had to write the Wayland support into Mutter which is a compositor for this desktop environment and can now work as a Wayland compositor. Because we cannot expect that all applications will support Wayland any time soon, and some applications most likely will never be ported to Wayland, XWayland has been introduced. XWayland runs X as a client and the app that requires X runs on the top of it.
Interesting fact: Do you know where Wayland got its name? It’s a small town in Massachusetts. The father of the Wayland procotol Kristian Høgsberg was driving through the town when he was finishing the the concept of the protocol and named it after it. Weston, the reference Wayland compositor, is named after a small town which lies just 4 miles east of Wayland.
How does GNOME run on Wayland in Fedora 21? I must say that I was surprised how far the GNOME developers had gotten with the Wayland support. Almost all standard desktop functionality is already there. I’m also impressed by its stability. I ran GNOME on Wayland for several days and it never crashed.
Almost all GNOME apps already support Wayland. You can check the status page. However, all apps are set to use XWayland in Fedora 21. If you want to run an app on Wayland, you need to run this command: GDK_BACKEND=wayland gedit (replace gedit with an app of your choice). The list of apps that don’t support Wayland yet is: Terminal, Empathy, Totem, PiTiVi, Sushi. From my experience the list is in fact longer. I couldn’t, for example, run GNOME’s “Software” application on Wayland. This also applies to pretty much all other applications (Firefox, LibreOffice, etc.) and you need to run them using XWayland. Fullscreen apps don’t work at all from my experience. I tried to run several Steam games and I received an error message even before the app was launched.
What still doesn’t work very well in GNOME on Wayland:
- Features that require resources outside the app don’t work and won’t work. That’s how Wayland is designed. Apps cannot get into someone else’s resources unlike on X where clients can access pretty much everything. Apps are isolated on the display server level which improves security. It’s easy to write a keylogger for X, it won’t be so easy for Wayland. Unfortunately, it currently has a negative impact on user experience. Apps cannot make screenshots (I tried Shutter and it indeed failed) and features such as a color picker also don’t work. In the future, there will be a D-Bus API available for an app to ask for permission to access resources outside the app. It’s not implemented yet.
- The mouse cursor in XWayland doesn’t change to e.g. indicate a web link or an ability to resize a window when you hover it over the edge of the window.
- Window resizing in XWayland is very snatchy. Resizing windows running on Wayland is on the other hand smoother than it has ever been on X.
- When GNOME Shell is restarted (I did it on purpose because as I said it never crashed) windows are not restored. I’m not sure if this feature is easily achievable with Wayland because Mutter now serves as a display server and if it crashes there is nothing to save and restore the session.
- Windows running on Wayland also claim borders around them, so when you want to snap a window to half the screen it doesn’t fill the space completely, but leaves a border around the window. The same border is also in the Activities overview between a window thumbnail and a line that highlights the window when you hover the cursor over it.
- Some gestures in GNOME Shell are not supported yet. For example scrolling in app picker in the Activities overview. The gesture for the left upper hot corner or for the message tray is also altered. Since GNOME 3.8 you need to make an determined push against the edge of the screen to switch to the overview or pop up the message tray and you much less often trigger such an action accidentally. GNOME on Wayland currently uses the old solution where you just need to move the cursor to the edge.
- Setups with multiple screens. I’m not sure whether GNOME on Wayland should already support this. But my external monitor was not even recognized.
And what about other desktop environments? GNOME has gotten furthest with Wayland support. The only other environment that currently supports Wayland is Enlightenment 0.19, but I don’t know how well it works and you won’t find E19 in Fedora anyway.
KDE Plasma on Wayland still has a long journey to walk to provide an experience similar to the one GNOME already provides.
KDE developers are planning to use Weston as a Wayland compositor instead of implementing their own. (according to Martin Gräßlin, the lead developer of Kwin, they are working to make Kwin a Wayland compositor and won’t use Weston).
Other desktop environments are not likely to support Wayland any time soon mainly due to lack of developer resources. For example Xfce doesn’t have any short-term plans to support Wayland. According to one of their contributors, their current priority is to switch to GTK+ 3 which may take as much as two years and then they can start thinking about Wayland.
If you like trying bleeding edge stuff, switch to GNOME on Wayland and get your hands dirty! It’s surprisingly stable and it offers close-to-complete desktop experience.