2

I'm looking at the Wayland session in Ubuntu 18.04.

I've thought that things like conky won't run or won't run properly. So I installed conky (and its dependencies). Then, I ran conky from a terminal. There was flickering and so I commented out no_buffers = true, in ~/.config/conky/conky.conf and added double_buffer = true,. That fixed the flickering but man conky has:

-b | --double-buffer
       Use double buffering (eliminates "flicker"). 
       Only available with build flag BUILD_X11  
       enabled.

So that puzzled me and I ran ps -aux | grep wayland

dkb@dkb:~$ ps -aux | grep wayland
gdm        750  0.0  0.1 197792  5548 tty1     Ssl+ 21:56   0:00 /usr/lib/gdm3/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart
gdm        850  0.0  0.8 202732 35992 tty1     S+   21:56   0:00 /usr/bin/Xwayland :1024 -rootless -terminate -accessx -core -listen 4 -listen 5 -displayfd 6
dkb       1925  0.0  0.1 197792  5376 tty2     Ssl+ 22:09   0:00 /usr/lib/gdm3/gdm-wayland-session env GNOME_SHELL_SESSION_MODE=ubuntu  gnome-session --session=ubuntu
dkb       1977  0.1  1.3 263692 56052 tty2     S+   22:09   0:00 /usr/bin/Xwayland :0 -rootless -terminate -accessx -core -listen 4 -listen 5 -displayfd 6
dkb       2469  0.0  0.0  21536  1076 pts/0    S+   22:17   0:00 grep --color=auto wayland
dkb@dkb:~$ 

That shows an Xwayland process running as well even though echo $XDG_SESSION_TYPE returns wayland.

So is it that a wayland session automatically includes Xwayland?

DK Bose
  • 42,548
  • 23
  • 127
  • 221
  • 1
    Yes xwayland is used as a fallback for apps not yet running on wayland – Panther Aug 26 '18 at 17:11
  • @Panther I rebooted and ran ps -aux | grep wayland again without running conky or any other application besides gnome-terminal first. There was an Xwayland process running. So that seems to be included by default. – DK Bose Aug 26 '18 at 17:25
  • 1
    But isn't 18.04 supposed to dump Wayland in favor of Xorg? Why is XWayland still running? – endolith Dec 10 '18 at 03:44
  • Because I logged into the Wayland session. That session is available for those who want to use or have a taste of Wayland. Whatever you choose when logging in will be remembered. So make sure you choose properly at the time of logging in to ensure you enter the session you want. – DK Bose Dec 10 '18 at 05:49

1 Answers1

2

The best answer comes from Wayland authors:

X Clients under Wayland (XWayland)

Wayland is a complete window system in itself, but even so, if we're migrating away from X, it makes sense to have a good backwards compatibility story. With a few changes, the Xorg server can be modified to use wayland input devices for input and forward either the root window or individual top-level windows as wayland surfaces. The server still runs the same 2D driver with the same acceleration code as it does when it runs natively. The main difference is that wayland handles presentation of the windows instead of KMS.

xwayland.png


When you boot with Wayland you still may need to access X-based applications: Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?

To summarize many Q&A's on running an X applicatin within Wayland you need to use:

xhost +si:localuser:root