systemd-logind sessions are not set up properly if `startx` is used

Bug #1247484 reported by Paul Donohue
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xinit (Debian)
Fix Released
Unknown
xinit (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

In Raring and earlier, ConsoleKit was used for session management, and /etc/X11/Xsession.d/90consolekit took care of preparing ConsoleKit sessions via `ck-launch-session` when X was started via `startx` instead of a graphical login manager.

In Saucy, ConsoleKit has been replaced with systemd-logind, which has no equivalent for ck-launch-session and requires X to be started on the same terminal as the console used to run `startx`.

Could /etc/X11/xinit/xserverrc be replaced with the following to accommodate this and ensure that systemd-logind works properly with `startx`?

#!/bin/bash

TTY="${TTY:-$(tty)}"
TTY="${TTY#/dev/}"
if [[ $TTY != tty* ]]; then
  printf '==> ERROR: invalid TTY\n' >&2
  exit 1
fi
printf -v VT 'vt%02d' "${TTY#tty}"

exec /usr/bin/X -nolisten tcp -dpi 100 "$VT" "$@"

This script comes from http://blog.falconindy.com/articles/back-to-basics-with-x-and-systemd.html
Some additional references:
http://askubuntu.com/questions/362403/how-to-create-a-new-logind-session-while-running-xinit-from-the-console
https://bugzilla.redhat.com/show_bug.cgi?id=806491
https://bugs.freedesktop.org/show_bug.cgi?id=71171

Revision history for this message
Laurent Bigonville (bigon) wrote :

This should be fixed in 1.3.3-1 that I just uploaded in debian

Changed in xinit (Debian):
status: Unknown → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xinit - 1.3.4-1

---------------
xinit (1.3.4-1) unstable; urgency=medium

  * Team upload.
  * New upstream release.
    - Drop d/p/07-Pass-files-to-cpp-via-CLI-arg-instead-of-stdin-to-wo.patch,
      d/p/08-Bump-required-util-macros-version-to-1.19.patch,
      d/p/09-Replace-RAWCPPFLAGS-with-TRADITIONALCPPFLAGS-when-pr.patch,
      d/p/10-startx-Under-Linux-start-X-on-the-current-VT.patch,
      d/p/11-startx-Pass-vtX-as-long-as-the-user-did-not-specify-.patch:
      Merged upstream
    - debian/patches/001_debian_xinitrc.diff: Refreshed
  * Fix debian/patches/03_debian_startx_manpage.diff, a Debian specific note
    was not shown anymore
  * debian/rules: Make /etc/X11/xinit/xinitrc executable to make lintian happy
    and also to fix LP: #491696

 -- Laurent Bigonville <email address hidden> Fri, 12 Sep 2014 16:00:29 +0200

Changed in xinit (Ubuntu):
status: New → Fix Released
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.