6

I want to try out Wayland from a live USB session of 20.04.1. I tried the steps in https://askubuntu.com/a/988579/428527 which is regarding 17.04 without success (system settings still indicate X11 after following the steps).

How would I go about this?

Andreas
  • 921
  • 1
  • 9
  • 26

1 Answers1

10

The first thing you need to do, assuming you're already booted into the live instance of Ubuntu, is change the way you login. You can click in the bottom right and 'Show Applications.' Once there, you can enter the word 'users', click on the settings app offered, and disable logging in automatically.

When you're done with that, change the password. It turns out this is mandatory - and perhaps a bug. You'll need to deal with Ubuntu's need for a complex password, so just make sure it's at least 12 characters long, not a dictionary word, and has a mix of numbers and letters. Yes, even in the live instance that's temporary they want a complex password meeting whatever criteria they set.

Next, you want to edit /etc/gdm3/custom.conf and comment out the line that disables Wayland.

sudo nano /etc/gdm3/custom.conf

Find the line:

WaylandEnable=false

Change it to:

#WaylandEnable=false

Make sure to save it, obviously.

Restart gdm3 with:

sudo systemctl restart gdm3

Note: That may log you out, that's fine. If it doesn't automatically, log out manually.

Log back in, but after you click the user, there's an icon in the lower right. It's a gear icon. Click it and choose to Ubuntu on Wayland. Then enter your password and press ENTER.

If everything worked, you're logged in with Wayland.

Now, to verify this...

Press CTRL + ALT + T and open the terminal and enter:

echo $XDG_SESSION_TYPE

If done correctly, it looks like this:

Tada!

Good luck!

KGIII
  • 3,968
  • 1
    This worked, thanks! I was almost unable to reproduce it though. I was prevented from creating a password, because I was never allowed to confirm my new password by the absolutely ridiculous password change dialog. Not until I input some arbitrarily complex password that I did not want. No password? Fine. Generated password that's impossible to remember? Fine. A password of my choosing? Not allowed. ‍♂️ – Andreas Aug 17 '20 at 21:54
  • 1
    @Andreas You just have to not use a common word and throw in some numbers. I chose 'Myuserpass$10817200' or something of that nature - useful just long enough to remember it between logging in and logging out on a VM that was behaving remarkably slowly. Then, the VM didn't want to let me back to the login screen - it kept going blank. Still, it eventually worked. I had a hunch but wanted to confirm it before posting it as an answer. Anyhow, it's now on the site as an answer for anyone else wanting to know. I'll edit the post to remark on password complexity. – KGIII Aug 17 '20 at 22:00
  • 1
    I'll accept the answer in a day or two. I see you fixed left → right for the session select button already, so the only thing I have to add is that the password is indeed necessary in order to even get the opportunity to select the session type (i.e. a bug). – Andreas Aug 18 '20 at 09:23
  • Oh, I just care that it's now here. I'll change the text to indicate that the password is mandatory. I'm not too concerned with points, as I'm probably just back for the duration of the epidemic. And yes, I fixed it to say 'right' instead of 'left'. I have no idea why I typed left. There might be more graceful ways to accomplish this. Mine reads like a cheap hack - and kinda is. I can't think of any other ways to accomplish it. – KGIII Aug 18 '20 at 13:57
  • 1
    +1; When I want this, I install the package gnome-system-tools and use the program users-admin to create a new user with a new password (also in a [persistent] live system). If I remember correctly, it is not that finicky with password. – sudodus Aug 18 '20 at 14:12
  • 1
    The live instance was rather demanding with changing the live user's password. I didn't test it extensively, I just made more complex passwords until it worked. I did later come across this, but that doesn't seem to jive with my experience. I needed a fairly long and complicated password, or at least ended up with one. If I get some time, I'll boot to the live instance again and check the password complexity systematically. – KGIII Aug 18 '20 at 14:24
  • 1
    Worked in Ubuntu 22.10 after realizing the live session was using X11. After setting a password via Settings: Users, the switch to Wayland can be automated with sudo cp --no-clobber /etc/gdm3/custom.conf /etc/gdm3/custom.conf.original && sudo sed --in-place --regexp-extended 's/^WaylandEnable=false/#WaylandEnable=false/' /etc/gdm3/custom.conf && sudo systemctl restart gdm3;. My computer briefly showed a black screen before loading the Wayland desktop. – Patrick Dark Nov 11 '22 at 13:26
  • 1
    @PatrickDark, thanks for the confirmation that it works in 22.10. This was last tested (by me) with 20.04. – KGIII Nov 12 '22 at 17:58
  • 1
    @KGIII Sure. One additional detail I found in 22.10: setting a password is not required to switch to a Wayland session. (It was pointless anyway because one can use sudo without a password even after setting one while in a live session apparently.) – Patrick Dark Nov 13 '22 at 19:24
  • @PatrickDark, that's a good thing, I think. It never made much sense to me, but it was somehow required. As I mentioned in my answer, that seemed like a bug at the time. I didn't dig deeper at the time to verify and file it as a bug. Feel free to edit my answer with any of your own findings, or possibly create a new answer that's specifically for a newer version of Ubuntu. If you write a new answer, specify that it's for a newer version of Ubuntu. Ping me and I'll vote if it's a good answer. Crib from mine as much as you want/need. – KGIII Nov 14 '22 at 21:28