From 7719997d89bb96034014bdd47ae6f1e29686997b Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Mon, 1 Oct 2012 16:57:01 -0600 Subject: [PATCH] Add patch to not switch tty's, so systemd-logind works right with startx. - Partially Fixes bug #806491 --- xorg-x11-xinit-1.3.2-systemd-logind.patch | 27 +++++++++++++++++++++++ xorg-x11-xinit.spec | 10 ++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 xorg-x11-xinit-1.3.2-systemd-logind.patch diff --git a/xorg-x11-xinit-1.3.2-systemd-logind.patch b/xorg-x11-xinit-1.3.2-systemd-logind.patch new file mode 100644 index 0000000..85261da --- /dev/null +++ b/xorg-x11-xinit-1.3.2-systemd-logind.patch @@ -0,0 +1,27 @@ +diff -Nur xinit-1.3.2.orig/startx.cpp xinit-1.3.2/startx.cpp +--- xinit-1.3.2.orig/startx.cpp 2012-09-29 11:55:06.661264745 -0600 ++++ xinit-1.3.2/startx.cpp 2012-09-29 11:56:24.849771316 -0600 +@@ -80,6 +80,7 @@ + defaultdisplay=":0" + clientargs="" + serverargs="" ++tty_num=$(tty | grep -oE '[0-9]+$') + + #ifdef __APPLE__ + +@@ -135,6 +136,15 @@ + enable_xauth=1 + #endif + ++if [ x"$tty_num" != x ]; then ++ # Specify TTY number directly to avoid recognizing startx session as ++ # inactive: RHBZ#820675 ++ serverargs=${serverargs}" vt"${tty_num} ++else ++ echo "Error getting tty num" ++ exit 1 ++fi ++ + XCOMM Automatically determine an unused $DISPLAY + d=0 + while true ; do diff --git a/xorg-x11-xinit.spec b/xorg-x11-xinit.spec index f27141b..73c636f 100644 --- a/xorg-x11-xinit.spec +++ b/xorg-x11-xinit.spec @@ -3,7 +3,7 @@ Summary: X.Org X11 X Window System xinit startup scripts Name: xorg-x11-%{pkgname} Version: 1.3.2 -Release: 6%{?dist} +Release: 7%{?dist} License: MIT Group: User Interface/X URL: http://www.x.org @@ -24,6 +24,9 @@ Source19: xinit-compat # Fedora specific patches Patch1: xinit-1.0.2-client-session.patch +# Fix startx to run on the same tty as user to avoid new session. +# https://bugzilla.redhat.com/show_bug.cgi?id=806491 +Patch2: xorg-x11-xinit-1.3.2-systemd-logind.patch Patch3: xinit-1.0.9-unset.patch BuildRequires: pkgconfig @@ -53,6 +56,7 @@ Allows legacy ~/.xsession and ~/.Xclients files to be used from display managers %prep %setup -q -n %{pkgname}-%{version} %patch1 -p1 -b .client-session +%patch2 -p1 -b .systemd-logind %patch3 -p1 -b .unset %build @@ -114,6 +118,10 @@ install -p -m644 -D %{SOURCE18} $RPM_BUILD_ROOT%{_datadir}/xsessions/xinit-compa %{_datadir}/xsessions/xinit-compat.desktop %changelog +* Mon Oct 01 2012 Kevin Fenzi 1.3.2-7 +- Add patch to not switch tty's, so systemd-logind works right with startx. +- Partially Fixes bug #806491 + * Sun Jul 22 2012 Fedora Release Engineering - 1.3.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild