Skip to main content
Share Your Experience: Take the 2024 Developer Survey
553 votes

How to know whether Wayland or X11 is being used

Obtain the session ID to pass in by issuing: loginctl That will show you something like: SESSION UID USER SEAT TTY c2 1000 yourusername seat0 1 sessions listed. In that example,...
Andreas's user avatar
  • 5,647
441 votes

How to know whether Wayland or X11 is being used

How to know whether Wayland or X11 is being used? on X11 systems: $ echo $XDG_SESSION_TYPE x11 on some wayland system: $ echo $XDG_SESSION_TYPE wayland edit: This doesn't seem to work in some ...
Ayush's user avatar
  • 4,967
100 votes

How to know whether Wayland or X11 is being used

This works on Fedora and Ubuntu 18.04.5 LTS: loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type
antismap's user avatar
  • 1,101
69 votes

How does Linux's display work?

Linux display The Linux's display system, uses multiple technology, protocols, extensions, applications, servers (daemon), drivers and concepts to achieve the windowing system for instance: Xorg, ...
intika's user avatar
  • 14.5k
54 votes

Why is Gnome fractional scaling 1.7518248558044434 instead of 1.75?

The preset scale factors (100%, 125%, etc.) get adjusted to the closest values that give a whole number of pre-scaling virtual pixels both horizontally and vertically for your resolution; judging by ...
rakslice's user avatar
  • 1,177
44 votes

Does Wayland use XKB for keyboard layouts?

Yes, Wayland uses XKB for keyboard layouts. But it's not quite the right question, because things work different than in X. Remember that Wayland is only a protocol (plus a wrapper library). At the ...
whot's user avatar
  • 636
39 votes

How can I run a graphical application in a container under Wayland?

As you say you are running Fedora 25 with Wayland, I assume you are using Gnome-Wayland desktop. Gnome-Wayland runs Xwayland to support X applications. You can share Xwayland access like you did ...
mviereck's user avatar
  • 2,475
35 votes

How to know whether Wayland or X11 is being used

I like Ayush's answer the best, but thought I'd say that Andreas's answer can be done in one line: loginctl show-session "$XDG_SESSION_ID" -p Type You can additionally pass --value to drop the Type= ...
Alex Robbins's user avatar
33 votes

How to know whether Wayland or X11 is being used

The simplest thing to do is to check whether WAYLAND_DISPLAY variable is set or not.
DejanLekic's user avatar
31 votes

What is the Wayland equivalent of xinput list?

On Debian the command is: $ sudo libinput list-devices # requires the libinput-tools package On arch-linux: # libinput list-devices To list just the device names, no details, use grep: $ sudo ...
GAD3R's user avatar
  • 67.1k
22 votes

How to customise keyboard mappings with Wayland

Unfortunately modifying the system XKB database in /usr/share/X11/xkb is the only way; from your other question it looks like you've gotten that part working. The limitation is mostly due to the ...
quixotic's user avatar
  • 1,140
22 votes

Could not find the Qt platform plugin "wayland"

vlc is a Qt 5 application. According to ArchWiki, to run any Qt application in wayland you need to install qt5-wayland or qt6-wayland and use the QT_QPA_PLATFORM=wayland environment variable to ...
Pooya's user avatar
  • 583
21 votes

Configure extra mouse button as a second middle click under Wayland

I've spent 2 days googling, testing tens of methods I've found and struggling with remapping mouse buttons under Wayland... So sharing what I've learned: Logitech M570 trackball has 2 extra buttons. ...
MIchael's user avatar
  • 211
19 votes

How to identify window by clicking in Wayland

Good news, there IS something like this built into Gnome Shell, and unlike xprop works with Xorg and Wayland. Ultimately this may fall into the realm of other tooling if you're using KDE, i3, or ...
Brian Redbeard's user avatar
18 votes

How to customise keyboard mappings with Wayland

I've been using Interception Tools for Linux with success for this, and know of people producing other plugins for their custom mappings too. caps2esc is a first proof-of-concept plugin that I use ...
oblitum's user avatar
  • 965
17 votes

Set environment variables for gnome on wayland and bash on virtual terminals (or ssh)

Systemd version 233 (March 2017) added support for setting environment variables in ~/.config/environment.d/*.conf. See the environment.d man page and the discussion that led to the feature on this ...
Jack O'Connor's user avatar
17 votes

How to get a list of active windows when using wayland

Update Sadly, this no longer works on Gnome 41 for security reasons Running global.context.unsafe_mode = true in Looking Glass re-enables the functionality, but only temporarily. Original answer Yeah, ...
ZimbiX's user avatar
  • 368
16 votes

Why Wayland is using OpenGL ES instead of OpenGL?

The premise of your question is wrong. Wayland does not use OpenGL ES or OpenGL at all. Lets get things in order to achieve proper understanding of the software stack: Wayland is an IPC protocol that ...
j_kubik's user avatar
  • 269
16 votes

How does one run GNOME Shell in a window? (nested session)

env GNOME_SHELL_SLOWDOWN_FACTOR=2 \ MUTTER_DEBUG_DUMMY_MODE_SPECS=1024x768 \ dbus-run-session -- gnome-shell --nested \ --wayland Source
Scrooge McDuck's user avatar
13 votes

Configure extra mouse button as a second middle click under Wayland

There is a graphical way to do this now. All of the command-line solutions hurt. The GUI program I found is called Key Mapper and it works for X11 and Wayland. It uses root privileges and solves all ...
Poikilos's user avatar
  • 254
12 votes

Display is not capable of DPMS After GNOME Wayland update

So this here works for GNOME 3.24 Wayland: put all displays in standby: busctl --user set-property org.gnome.Mutter.DisplayConfig /org/gnome/Mutter/DisplayConfig org.gnome.Mutter.DisplayConfig ...
user229115's user avatar
12 votes

Keyboard emulation in Wayland

EDIT Feb 2021/Mar 2024: Finally I found a project doing it right: I'm using this little script. It needs the package evemu installed and sudo-confguration ...
blaimi's user avatar
  • 1,175
12 votes

Will Wayland ever support graphical sudo?

Is this a permanent feature of Wayland (there by design) No. This has nothing to do with the wayland protocol. It is rather a question of environment setup. Wayland uses a socket, its name is stored ...
mviereck's user avatar
  • 2,475
12 votes

Can I run wayland application in X?

Weston, the reference compositor for Wayland, has a special feature where instead of running it directly on hardware, you can also use it to run Wayland clients under X. At an X terminal, type weston ...
Damian Yerrick's user avatar
12 votes

Enable Wayland in PopOS 22.04

The accepted answer did not provide the solution for me. Instead I found the right hint in this video. I followed these steps to enable Wayland on Pop OS 22.04 as explained in the video: set ...
lumbric's user avatar
  • 399
11 votes

How to customise keyboard mappings with Wayland

The top answer in addition to is very helpful, but it is not necessary to edit the system xkb files.
h33925's user avatar
  • 126
11 votes

How to know whether Wayland or X11 is being used

Tell which session type with POSIX-shell grammar and no sub-shell: printf 'Session is: %s\n' "${DISPLAY:+X11}${WAYLAND_DISPLAY:+WAYLAND}" Alternative handling all 4 states: case $((0${...
Léa Gris's user avatar
  • 477
11 votes

Fedora 25 is NOT using wayland by default!

Nvidia does not yet support Wayland, so Fedora 25 falls back to X11. From the Nvidia forum I see someone has used packages from the in-development Fedora 26 plus some patches to get it working, but ...
mattdm's user avatar
  • 40.3k
11 votes

How to set device-specific mouse settings in Wayland under Libinput (Debian Gnome)?

Wayland expects all mice motion to have been normalised, so there is only one global changeable configuration. You may have to edit your hwdb entry for one of your devices to correct it if it is wrong,...
meuh's user avatar
  • 51.7k

Only top scored, non community-wiki answers of a minimum length are eligible