Search code examples
desktopkde-plasmawayland

Wayland session and XWayland configuration at example of KDE


Dear stackoverflow users,
I am trying to understand how a Wayland session gets invoked at the example KDE to configure XWayland for sandboxing. The Wayland manual for XWayland is unclear about my sections and neither explains the commands/utils how to handle Wayland/XWayland.

  1. How can I check via command which programs are getting (in future) invoked as Xwayland server?
  2. Are the XWayland configuration files also at /etc/X11/xinit/xinitrc for the client and /etc/X11/xinit/xserverrc for the one global server?
  3. These instructions are abit unlucky without command examples. Does this mean I just need to set $DISPLAY and the Wayland server will start/connect to a xserver?
DISPLAY=":5" application        #will this use x11 or Wayland before running it?
  1. kdestart5 starts KDE, but where do I see the configs?
  2. If setting $DISPLAY yourself is possible, does this mean that multiple x11 instances can coexist on the same Wayland session?

Solution

    1. To my knowledege, I cant, since the feature is not provided yet. The compositor simply falls back to Xwayland, which may be provide a false sense of security for the user. Retrospectively you can use xeyes. [correct me, if I am wrong]
    2. Xwayland/Wayland configuration files are not standartized and thus the display manager decides where to put things.
    3. The compositor does handle this. The code is the documentation how/no documentation exists. ls /tmp/.X11-unix/ shows up X0 X1, so X0 is still the xorg display server.
    4. The config is given by sddm --example-config.
    5. The display manager handles the x11 instance, which for simplicity is exactly 1.

    All in all there is lacking of documentation and utilities like checking in shell what display an application uses for Wayland and Xwayland. Common things like using ps auxww | grep X do not work anymore under Wayland.

    However even these settings were not reliable on Xorg, which is just painful with respect to availability of XDG_BASE as standard.