KDE vs. GDM : Rocky Linux 9.x vs. 8.x

Hi,

I have Rocky Linux 8.x and 9.x running on all my desktop clients, with KDE from EPEL as desktop environment.

Since SDDM is buggy and doesn’t play well with NVidia drivers, I replaced it with GDM, which works quite nicely.

Here’s the configuration I’m using on Rocky Linux 9:

- name: Install GNOME Display Manager
  ansible.builtin.dnf:
    name: gdm
    state: present
    install_weak_deps: false

- name: Default to Plasma X11 session
  ansible.builtin.copy:
    src: "{{item}}"
    dest: /etc/accountsservice/user-templates/
    owner: root
    group: root
    mode: 0644
  with_items:
    - administrator
    - standard

- name: Custom logo for GDM
  ansible.builtin.copy:
    src: microlinux-logo.png
    dest: /usr/share/pixmaps/fedora-gdm-logo.png
    owner: root
    group: root
    mode: 0644

- name: Hide Wayland sessions in GDM menu
  ansible.builtin.lineinfile:
    path: "/usr/share/wayland-sessions/{{item}}.desktop"
    line: NoDisplay=true
  with_items:
    - gnome
    - gnome-wayland
    - plasma

And here’s the corresponding /etc/accountsservice/user-templates/standard file:

[Template]
EnvironmentFiles=/etc/os-release;

[com.redhat.AccountsServiceUser.System]
id='${ID}'
version-id='${VERSION_ID}'

[User]
Session=plasmax11
Icon=${HOME}/.face

This configuration makes sure GDM fires up KDE as the default environment.

Unfortunately this doesn’t work on Rocky Linux 8.x. Every user still has to choose PlasmaX11 explicitly. If he or she doesn’t do that, than a minimal GNOME environment gets started. There seems to be no way to prevent GNOME from starting up.

I don’t know exactly how this works under the hood, but if there’s one single binary (something like /usr/bin/startgnome) that fires up GNOME, I could wipe that and replace it with a symlink to something like /usr/bin/startkde. That one exists, but I don’t know if such a thing would work.

Any suggestions ?

I’ll answer that, since I just found the bug. Developers love moving targets. Looks like the sessions are named differently under Rocky Linux 8.x (plasma) and 9.x (plasmax11).

1 Like

Probably a “keep the default simple and the alternative not”.
The el9 made the Wayland the default.


You probably want to hide the ‘plasmawayland’, the
/usr/share/wayland-sessions/plasmawayland.desktop
too.

… or does GDM of el8 support

[daemon]
WaylandEnable=false

in /etc/gdm/custom.conf (to totally avoid the Wayland)?