Bug 882037 - race between adding liveuser and gdm autologin
Summary: race between adding liveuser and gdm autologin
Alias: None
Product: Fedora
Classification: Fedora
Component: spin-kickstarts
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Jeroen van Meeuwen
QA Contact: Fedora Extras Quality Assurance
: 854722 (view as bug list)
Depends On:
Blocks: F18-accepted, F18FinalFreezeExcept
TreeView+ depends on / blocked
Reported: 2012-11-30 00:43 UTC by Mads Kiilerich
Modified: 2013-03-18 22:29 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-02-14 15:53:25 UTC
Type: Bug

Attachments (Terms of Use)
patch to fix things (2.75 KB, patch)
2013-02-13 17:38 UTC, Richard Hughes
no flags Details | Diff

Description Mads Kiilerich 2012-11-30 00:43:31 UTC
liveuser is added by the SysV init script /etc/init.d/livesys . But at the same time gdm starts and try to login as liveuser. There is apparently no ordering, and sometimes (some hardware and some spins/remixes) gdm will try to login and fail before the user is added.

systemd should be told to ensure that livesys has to complete before starting gdm.

The best solution would be to convert livesys to a systemd service and use a Before. That is probably not feasible now.

According to systemd.special(7):
           The display manager service. Usually this should be aliased
           (symlinked) to gdm.service or a similar display manager service.

           systemd automatically adds dependencies of type After for this
           target unit to all SysV init script service units with a LSB header
           referring to the $x-display-manager facility, for compatibility
           with Debian.

something like this should work:

# Provides: $x-display-manager

- but it didn't work for me ...

gdm-3.6.2-1.fc18.x86_64 / gdm-3.6.2-1.fc18.usefamilywild.i686

Comment 1 Jóhann B. Guðmundsson 2012-11-30 11:38:39 UTC
seems like gdm.service ( and probably other dm service too ) are missing After=livesys.service or livesys or the livesys lsb header is missing X-Start-Before: gdm or gdm.service

Comment 2 Jóhann B. Guðmundsson 2012-11-30 11:45:42 UTC
This is the after order in F17 and probably should be the same in each *dm.service

After=livesys-late.service rc-local.service systemd-user-sessions.service

Comment 3 Mads Kiilerich 2012-11-30 12:39:51 UTC

 # chkconfig: 345 00 99
 # description: Init script for live image.
+#  X-Start-Before: gdm.service
 . /etc/init.d/functions
 if ! strstr "\`cat /proc/cmdline\`" rd.live.image || [ "\$1" != "start" ]; then


+sed -i 's,^After=,After=livesys.service livesys-late.service rc-local.service systemd-user-sessions.service ,g' /lib/systemd/system/gdm.service

worked for me.

A change like that should be nth for f18, but it should probably be figured out exactly what is needed.

A full conversion to systemd service would probably be too late for f18.

Comment 4 Ray Strode [halfline] 2012-11-30 16:44:52 UTC
probably better to use display-manager.service instead of gdm.service (which is an alias for gdm.service when appropriate and an alias for other display managers when appropriate)

Comment 5 Ray Strode [halfline] 2012-11-30 18:10:27 UTC
is the sed required?  The X-Start-Before should be enough right?

Comment 6 Ray Strode [halfline] 2013-02-13 16:41:11 UTC
*** Bug 854722 has been marked as a duplicate of this bug. ***

Comment 7 Ray Strode [halfline] 2013-02-13 17:02:00 UTC
Richard did some testing and discovered the sed isn't required, but the the .service suffix on the X-Start-Before line is wrong.

Comment 8 Richard Hughes 2013-02-13 17:38:24 UTC
Created attachment 696962 [details]
patch to fix things

This is what I pushed.

Comment 9 Adam Williamson 2013-03-18 22:29:34 UTC
confirmed fixed in f19, fwiw.

Note You need to log in before you can comment on or make changes to this bug.