Bookmark this page

Guided Exercise: Displaying the Desktop with Wayland and X

In this exercise, you will examine workstation to determine which applications use Wayland natively, and practice switching between Wayland and Xorg.

Outcomes

You should be able to determine which applications use Wayland, and which use X11 with the XWayland compatibility layer. You should also be able to switch between Wayland and Xorg, which is helpful when troubleshooting issues with graphical applications.

Log in to workstation as student using student as the password.

On workstation, run the lab core-wayland start command.

[student@workstation ~]$ lab core-wayland start
  1. Launch the Cheese photo application.

    1. Press Alt+F2 to open the Enter a Command dialog box.

    2. Type cheese to launch the application.

  2. Launch Looking Glass, the Gnome integrated debugger and inspector.

    1. Press Alt+F2 to open the Enter a Command dialog box.

    2. Type lg to launch the inspector.

  3. Use Looking Glass to determine which applications are using Wayland natively.

    1. Click Windows at the upper right.

    2. Click the text gnome-shell to display the object inspection dialog box.

      The first line in the object inspection dialog box lists the object type, which includes the text MetaWindowXwayland. This indicates that Gnome Shell is using the XWayland display server and so is still configured to use X11.

      Close the dialog box.

    3. Click the text student@workstation:~, which represents the open Gnome terminal.

      The first line in the object inspection dialog box includes the text MetaWindowWayland, confirming that Gnome terminal is a native Wayland application.

      Close the dialog box.

    4. Click the text Take a photo, which represents the Cheese application.

      The first line in the object inspection dialog box includes the text MetaWindowWayland, confirming that Cheese is a native Wayland application.

      Close the dialog box.

      Press Esc to exit from Looking Glass.

  4. From the terminal, verify the session type using the loginctl command.

    1. Run the loginctl command to find your session number.

      [student@workstation ~]$ loginctl
      SESSION  UID USER    SEAT  TTY
            2 1000 student seat0 tty2
           c1   42 gdm     seat0 tty1
      
      2 sessions listed.
    2. Run the loginctl show-session command to find the session type.

      [student@workstation ~]$ loginctl show-session 2 -p Type
      Type=wayland
  5. From the terminal, become root and then edit /etc/gdm/custom.conf. Uncomment the line containing WaylandEnable, save your changes, and then reboot workstation.

    # Uncomment the line below to force the login screen to use Xorg
    WaylandEnable=False
  6. Log in as student and verify the session type using the loginctl command.

    1. Open a terminal and run the loginctl command to find your session number.

      [student@workstation ~]$ loginctl
      SESSION  UID USER    SEAT  TTY
            2 1000 student seat0 tty2
           c1   42 gdm     seat0 tty1
      
      2 sessions listed.
    2. Run the loginctl show-session command to find the session type.

      [student@workstation ~]$ loginctl show-session 2 -p Type
      Type=x11
  7. From the terminal, become root and edit /etc/gdm/custom.conf. Comment the line containing WaylandEnable, save your changes, and then reboot workstation.

    # Uncomment the line below to force the login screen to use Xorg
    #WaylandEnable=False

Finish

On workstation, run lab core-wayland finish to clean up any resources created for this exercise.

[student@workstation ~]$ lab core-wayland finish

This concludes the guided exercise.

Revision: rh354-8.0-0e36520