80

Some of my applications don't work on Ubuntu 17.10 Wayland. How can I switch back to Xorg?

orschiro
  • 13,317
  • 17
  • 87
  • 161
  • Out of curiosity - which applications? – Thorbjørn Ravn Andersen Oct 28 '17 at 12:38
  • 6
    Shutter 1, for example. – orschiro Oct 28 '17 at 15:57
  • 3
    I can add x11vnc to the list – Gabriel Glenn Nov 23 '17 at 09:09
  • 1
    gparted does not work anymore, either, and according to this answer ( https://askubuntu.com/questions/961967/why-dont-gksu-gksudo-or-launching-a-graphical-application-with-sudo-work-with-w ) Wayland is to blame. I found this page looking for a solution, as a system on which I can't modify partitions is pretty f'ing useless. – Matthew Najmon Feb 23 '18 at 18:35
  • I can add configuring "Devices > Display Arrangement" to the list. It does not work properly in Wayland. Every time I wake my laptop I have to configure which external monitor should be on the left and which on the right - it just doesn't remember. – Marecky Mar 06 '18 at 07:57
  • I've tried to install Tilda, which is my Quake-like terminal of choice, and it doesn't work because of this change. Guake has some issues as well. – Agustín Lado Mar 20 '18 at 14:18
  • Add vlc as well to that list – madstap May 08 '18 at 14:48
  • @Thorbjørn Ravn Andersen 5 years later, x11vnc, out of the box didn't work, that's when I learned I had caught the waylands on ubuntu 21. So first task now is ripping out wayland. I don't understand why the wayland folks didn't as a first step ensure that their new doodad would be transparently compatible with the previous system. I have to report that setting WaylandEnable=false in /etc/gdm3/custom.conf did eliminate wayland from memory so yay ! – Shodan Feb 02 '22 at 09:35

4 Answers4

70

When you boot your system and get to the GDM login screen you should find a cogwheel (⚙️) next to the sign in button. If you click on the cogwheel you should find an Ubuntu on Xorg option which will start an Xorg session instead of a Wayland session.

enter image description here

pomsky
  • 68,507
  • 7
    I don't even see that option on my machine. I just see Ubuntu on Xorg and Unity. – khatchad Nov 06 '17 at 20:53
  • 3
    Wayland IS compatible with my system. I am using Wayland, but I want to switch to Xorg, because gparted doesn't work with Wayland – Aloso Dec 17 '17 at 22:36
  • @Aloso Hmm... not sure what's happening, but you might want to see this in order to make GParted work in a Wayland session. – pomsky Dec 18 '17 at 05:32
  • @pomsky I tried all the options in that other answer you linked, and none of them worked, I still can't use gparted. I found this answer from a link from that one, as I continued my search because that "answer" didn't solve the problem. – Matthew Najmon Feb 23 '18 at 18:37
  • @MatthewNajmon That means you have a new question, mention clearly that you tried all the answers to the older question and that all of them failed (explain how they failed). Then I believe it won't be closed as a duplicate. And no profanity please. – pomsky Feb 23 '18 at 18:52
  • Does one selection stays chosen for further logins? Or does one have to use the cogwheel every time to login to Xorg? – Marecky Mar 06 '18 at 08:05
  • 2
    @Marecky It should remember your choice for the next time. So no need to use the cogwheel every single time. – pomsky Mar 06 '18 at 08:05
62

If you wish to do it permanently, edit /etc/gdm3/custom.conf and uncomment the line:

#WaylandEnable=false

by removing the # in front of it.

Save the file and then on reboot you will never see the cog asking for which session to use.

EDIT: Apparently @doug beat me to this answer. I didn't see it earlier - It was in a comment that was hidden initially.

8

You may want to remove wayland session to prevent accidental logins.

<

Your package maintainers will be proud of you if you do it as follows:

sudo mkdir /usr/share/wayland-sessions/hidden
sudo dpkg-divert --rename \
      --divert /usr/share/wayland-sessions/hidden/ubuntu.desktop \
      --add /usr/share/wayland-sessions/ubuntu.desktop

What this does is to instruct the package manager to remember a new location for the file. This has several advantages over the other answers:

  • It guarantees a future package install/upgrade won't revert your change
  • It works with other display managers (lxdm for example lists .backup entries)
  • You can revert it easily if you change your mind with:

    sudo dpkg-divert --rename --remove /usr/share/wayland-sessions/ubuntu.desktop

>

Source: https://askubuntu.com/a/500813/602695

Artyom
  • 1,723
  • 4
    One could also simply edit /etc/gdm3/custom.conf & uncomment #WaylandEnable=false It will not be overwritten without user consent if at all – doug Oct 21 '17 at 19:24
  • 2
    @doug Your answer will only work with gdm3 though, one may be using LightDM -as I do-, My answer will work for both LightDM and gdm3. – Artyom Oct 23 '17 at 07:07
0

May be running app like this can help? Can someone try it? Because I don't know whether that will be helpful to others.

For example you need to run app called Putty from Wayland but it doesn't work because of font called "server:fixed" doesn't exist in Wayland, or may be it doesn't available for some reason. So you can change shortcut or run it from shell this way:

env GDK_BACKEND=x11 putty

Replace putty with something that you need. You need to set varibale exactly with env env GDK_BACKEND=x11, without env it will not work (for Putty at leased)

Found here:

Original: https://askubuntu.com/a/1402103/1586450