So I just installed the latest Kali Linux on my laptop which was based on Debian 7 (oldstable). I then dist-upgrad-ed the whole thing to Debian 8.

I've always wanted Wayland instead of X11, so I installed the necessary packages. Then created a minimal ~./config/weston.ini configuration. Now, from the Gnome log-in screen: Login Screen

I can boot to Gnome on Wayland or LXDE (among others). The previous with very limited success and the latter (LXDE) almost perfectly, though the panel needs setting up (I have to look up freedesktop).

Anyways, in LXDE, the GUI is more responsive than it was on the oldstable and possibly as fast when it was running windows 7. I was pleased.

But I want to know if this is because of all the library/module upgrades from Debian 7 to 8 or from using Wayland (if I really am using Wayland at all). I skimmed through htop and found a /usr/bin/Xorg running and no process named "wayland". So which one am I currently running?

  • run xprop, this tool will work on xapplications running under emulation but not wayland or gnome-shell on wayland. – Mike Mestnik Aug 10 '15 at 1:40
  • 3
    I guess I'm the only one to notice that while the OP said he was operating on debian, the screenshot he presented is clearly fedora... – user1404316 Mar 22 at 13:28

Obtain the session ID to pass in by issuing:

loginctl

Then:

loginctl show-session <SESSION_ID> -p Type

Use the one corresponding to your user name.

Refer to: https://fedoraproject.org/wiki/How_to_debug_Wayland_problems

So, for me it is:

$ loginctl show-session 2 -p Type                                                  
Type=wayland
  • 3
    Thanks for the great answer. Please add that OP should run loginctl first to see the sessions. – Ho1 Nov 25 '16 at 10:33
  • 5
    loginctl show-session `loginctl|grep <YOUR_USER_NAME>|awk '{print $1}'` -p Type – solsTiCe Dec 7 '17 at 7:06
  • 1
    According to Fedora 28 docs you can also use echo $WAYLAND_DISPLAY which prints nothing if wayland is not used. – robsch Jun 25 at 9:14
  • 1
    @DSJustice your backticks have been markdown'd. One can copy this: loginctl show-session $(loginctl|grep $(whoami) |awk '{print $1}') -p Type – Andreas Nov 6 at 7:30
  • 1
    @Andreas, thanks, deleted. – DS Justice Nov 6 at 17:48

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
  • 21
    What does it mean if this variable is unset? – g.rocket May 26 '17 at 6:03
  • Is there a way to show also the version of the running wayland protocols? – saitam Aug 31 at 8:31

This works on fedora

loginctl show-session $(loginctl | grep $(whoami) | awk '{print $1}') -p Type
  • Power of pipes and unix philosophy. Nice. – Talespin_Kit Sep 10 at 13:07
  • /me mumbles something about grep ... | awk, but hey, that's fine. – rahmu Nov 12 at 14:58

Give the command

ps aux | grep gnome-shell

It will give the output

/usr/bin/gnome-shell --wayland --display-server

If Wayland is active.

  • 4
    And what if wayland is the default? – anatoly techtonik Sep 21 '16 at 11:34
  • My "gnome-shell" process was not running with the --wayland option, but when I ran ps aux | grep wayland, I found that /usr/bin/Xwayland was running. – paulie4 Nov 5 '16 at 2:15
  • Often you have two gnome-shell processes: one used for gdm, and one used for the user session. Often gdm's gnome-shell uses wayland but the user session's gnome-shell uses X11. – Marius Gedminas Nov 23 '16 at 8:38
  • Xwayland is a process that bridges between X11 applications and the Wayland display server. Its presence implies that you are running Wayland already -- but check the above caveat, it's possible Wayland is only used for the login screen. – Marius Gedminas Nov 23 '16 at 8:39
  • gnome-shell only works if you are using gnome as DM. – Sebastian Mar 27 '17 at 19:55

(try to) Run the command 'r' in the Alt+F2 menu. It will restart the environment in Xorg (without losing windows and processes) but in wayland it will give the message "Restart is not available in Wayland".

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= prefix.

No, I've noticed a pid called Wayland in htop, when I've switched to Wayland for giggles. Unless it's changed that's what one should see. Update: Here is a screengrab showing Wayland process.

enter image description here

  • 4
    I don't see a wayland process in your screengrab; the line you've highlighted is a dbus-launch process, starting a session called gnome-wayland. – Stephen Kitt May 16 '15 at 21:30

if you want a visual hint, I wrote a simple GNOME Shell extension that shows an icon that tells you whether you are running Wayland or Xorg

http://www.fepede.net/blog/2017/04/gnome_shell_extension_xorwayland/

You could run the xdpyinfo command. It gives information about your current X11 server (and display). It would fail if you don't have one (e.g. in a pure Wayland setting).

  • seems to be working fine on my wayland session ... – don_crissti Mar 22 at 12:05
  • IMHO, that just means that your wayland session is not pure Wayland. – Basile Starynkevitch Mar 22 at 12:06
  • sure but the Q is "how to know whether wayland or xorg is used" for the current session... not how to know if there's a X11 server running – don_crissti Mar 22 at 12:08

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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