Bug 2252315

Summary: lightdm should start after systemd-hostnamed
Product: [Fedora] Fedora Reporter: Thomas <tg42>
Component: lightdmAssignee: Alternative GTK desktop environments <alt-gtk-de-sig>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 39CC: alt-gtk-de-sig, leigh123linux, raveit65.sun, rdieter, tdawson
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-12-30 17:52:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thomas 2023-11-30 20:41:45 UTC
On the machine in question, the host name is changed after lightdm is started.  This might have X reject connections from processes (esp. startxfce) started with a different host name than the one X itself was started with.

Solution would be: don't change the host name after lightdm was started, or, start lightdm only after the host name is settled.

Cf. https://github.com/canonical/lightdm/issues/291

Reproducible: Always

Steps to Reproduce:
1. Boot machine
2. Try to login
3.
Actual Results:  
Login kind of succeeds, but no session is started and the login screen is shown again.  .xsession-errors mentions X communication errors.

A second (and every further) login attempt succeeds.

Expected Results:  
Login succeeds on the first attempt.

Adding

After=systemd-hostnamed.service

to lightdm.service solves the problem.

Comment 1 Thomas 2023-12-30 17:52:45 UTC

*** This bug has been marked as a duplicate of bug 2167386 ***