3

On this site:

https://docs.fedoraproject.org/en-US/quick-docs/configuring-xorg-as-default-gnome-session/

I was told the way to set Ubuntu on Xorg by default in the file /etc/gdm3/custom.conf:

# GDM configuration storage
#
# See /usr/share/gdm/gdm.schemas for a list of available options.

[daemon]

Uncomment the line below to force the login screen to use Xorg

#WaylandEnable=false

Enabling automatic login

AutomaticLoginEnable = true

AutomaticLogin = user1

Enabling timed login

TimedLoginEnable = true

TimedLogin = user1

TimedLoginDelay = 10

DefaultSession=ubuntu-xorg.desktop

[security]

[xdmcp]

[chooser]

[debug]

Uncomment the line below to turn on debugging

More verbose logs

Additionally lets the X server dump core if it crashes

#Enable=true

But it doesn't work.
The name ubuntu-xorg.desktop I took it from the path /usr/share/xsessions.
Uncommenting (as the guide explains) or not the WaylandEnable=false line, the DefaultSession=ubuntu-xorg.desktop line has no effect.

I don't want the option Wayland to disappear (uncommenting the line WaylandEnable=false), I just want that when creating any user (therefore for all users, therefore globally) Ubuntu on Xorg is selected as default is not Ubuntu (Ubuntu on Wayland). Which file should I go to touch?

Don't tell me /var/lib/AccountService/users/<user> because I've already pointed out that I want to set this option globally but I don't want a way that uses the /usr/local/sbin/adduser.local file to do this if there is an already foreseen and more appropriate method.

3 Answers3

4

I had upgraded from 20.04 to 22.04 and this approach worked for me on 22.04:

  1. Confirm you're on Wayland. Typing echo $XDG_SESSION_TYPE in a terminal should return wayland.
  2. Backup the configuration file: cp /etc/gdm3/custom.conf /etc/gdm3/custom.bak.
  3. Edit file: sudo nano /etc/gdm3/custom.conf.
  4. Insert new line DefaultSession=gnome-xorg.desktop. It should look something like this:

enter image description here

  1. Reboot and Ubuntu On Xorg is now selected by default at the Ubuntu 22.04 login screen, and Ubuntu (on Wayland) is still available as an option.
Jaydin
  • 1,571
1

As of September 2024, version 24.04.1 LTS, whichever option you pick from the "login/password", screen cogwheel icon, either it's ubuntu (with wayland) or ubuntu on xorg, for the next time onwards, it will be set to default and selected automatically. So don't worry about it, just selecting your favourite option once, automatically sets it as default.

When, you want to use another one than default, then only you need to select it explicitly, which in turn, makes the newly selected option as default.

navinrangar
  • 111
  • 3
0
sudo sed -i '/^\[daemon\]/a DefaultSession=gnome-xorg.desktop' /etc/gdm3/custom.conf

should solve the issue for you

unxed
  • 121