kdm does not emit well-known upstart events

Bug #715093 reported by James Hunt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kdebase-workspace (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: kdebase-workspace

As an analog to bug #706842, kdm needs to emit two "well-known" upstart events as gdm does:

1) login-session-start
2) desktop-session-start

Event (1) should be emitted just prior to the display manager starting whilst event (2) should be emitted when a user logs in (manually or auto-login).

Additionally, the upstart config file /etc/init/kdm.conf should list these two events as being emitted by kdm.

For the list of "well-known" events that will be included in natty as a new manual page, see:

  lp:~jamesodhunt/+junk/upstart-docs

or,

  http://people.canonical.com/~jhunt/upstart/man/upstart-events.pdf

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: kdm (not installed)
ProcVersionSignature: Ubuntu 2.6.35-25.44-generic-pae 2.6.35.10
Uname: Linux 2.6.35-25-generic-pae i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Tue Feb 8 09:16:03 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: kdebase-workspace

Revision history for this message
James Hunt (jamesodhunt) wrote :

From what I can see, the changes that need to be made are:

File /etc/kde4/kdm/Xsession needs to specify the following:

  /sbin/initctl -q emit desktop-session-start DISPLAY_MANAGER=kdm USER=$USER

File /etc/kde4/kdm/Xstartup needs to specify the following:

  /sbin/initctl -q emit login-session-start DISPLAY_MANAGER=kdm

Revision history for this message
Felix Geyer (debfx) wrote :

Xstartup and Xsetup are the right scripts.
Xsession isn't run as root.

Changed in kdebase-workspace (Ubuntu):
assignee: nobody → Felix Geyer (debfx)
status: New → In Progress
Revision history for this message
James Hunt (jamesodhunt) wrote :

@Felix: thanks for picking this one up. The fact that Xsession doesn't run as root is fine. With gdm, we have:

File /etc/gdm/Init/Default emitting the login-session-start event (as root)

File /etc/

Revision history for this message
James Hunt (jamesodhunt) wrote :

Oops! and we have

File /etc/gdm/PreSession/Default emitting desktop-session-start as the user that is logging in.

Revision history for this message
James Hunt (jamesodhunt) wrote :

If we have any lightdm gurus reading, it would be good to get the same functionality with lightdm (see bug 715094).

Revision history for this message
Felix Geyer (debfx) wrote :

> @Felix: thanks for picking this one up. The fact that Xsession doesn't run as root is fine. With gdm, we have:

Only root is allowed to emit upstart signals, right?

Changed in kdebase-workspace (Ubuntu):
assignee: Felix Geyer (debfx) → nobody
status: In Progress → Fix Committed
Revision history for this message
James Hunt (jamesodhunt) wrote :

@Felix - ah! sorry, I see your point, so ignore comment #3. Is there another script we can use with kdm to emit the desktop-session-start event?

Revision history for this message
Felix Geyer (debfx) wrote :

> Is there another script we can use with kdm to emit the desktop-session-start event?

Yes, Xstartup.

I've already committed the fix:
https://bazaar.launchpad.net/~kubuntu-members/kdebase-workspace/ubuntu/revision/481

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kdebase-workspace - 4:4.6.1-0ubuntu2

---------------
kdebase-workspace (4:4.6.1-0ubuntu2) natty; urgency=low

  [ Felix Geyer ]
  * Emit upstart login-session-start and desktop-session-start events.
    (LP: #715093)
    - Add kubuntu_118_upstart_session_events.diff

  [ Colin Watson ]
  * Start on stopped udev-fallback-graphics instead of stopped udevtrigger
    (LP: #702090)
  * Add udev (>= 166-0ubuntu4) to kdm Depends
 -- Scott Kitterman <email address hidden> Fri, 18 Mar 2011 20:49:32 -0400

Changed in kdebase-workspace (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
xrichard (xrichard) wrote :

this patch has bug:

debian/kdm.upstart has:

emits login-session-started
emits desktop-session-start

but debian/kdm.upstart must be:

emits login-session-start
emits desktop-session-start

I see to gdm.upstart where is:

emits login-session-start
emits desktop-session-start

Revision history for this message
Felix Geyer (debfx) wrote :

Good catch, fixed in bzr.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.