I'm trying to test a "real" wayland gnome session. I know that not all applications can run on Wayland natively (for this we have XWayland) but at least I would like to have GTK+ applications to do so.

So, I created a ~/.profile file containing

export GDK_BACKEND=wayland
export CLUTTER_BACKEND=wayland

>>> Edit: instead of contents above, you may add this to ~/.profile in order to make it work for both X and Wayland sessions:

WAY=$(ps -aux | head -n -1 | grep "/usr/bin/gnome-shell --wayland")

if [ -z "$WAY" ]; then
    echo X11
    export GDK_BACKEND=wayland
    export CLUTTER_BACKEND=wayland


Then from my GDM login screen (Archlinux) I select gnome on wayland.

Once ready, I start (for example) nautilus (normally from the dash, not from terminal), then I open looking glass, I select "windows" section and I click on nautilus window and I get GType:MetaWindowWayland which tells me that Nautilus is actually running on Wayland instead of XWayland. Super!


However, if, again from looking glass, I select gnome-sell entry, I get GType:MetaWindowX11 telling me that the shell is running on XWayland.


Mutter seems to be running on Wayland (as for example the clipboard between X and W still does not work), all the GTK+ app that I launch after login are running on Wayland too (GType:MetaWindowWayland) however gnome-shell is still on X11.

My guess is that gnome-shell does not take into consideration ~/.profile while starting the session. Maybe because it is started by the system not by the user? So maybe I have to add

export GDK_BACKEND=wayland
export CLUTTER_BACKEND=wayland

somewhere else?

  • 2
    I think that's just the fake X11 root window created by gnome-shell to support XWayland clients. – Marius Gedminas Nov 7 '15 at 15:15

I think you have to add that to .bashrc which also works for non-login shells.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.