[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg-devel
Subject: Re: [PATCH 2/2] systemd-logind: Only use systemd-logind integration together with keeptty
From: Hans de Goede <hdegoede () redhat ! com>
Date: 2015-04-30 10:41:00
Message-ID: 554206BC.4090404 () redhat ! com
[Download RAW message or body]
Hi,
On 23-01-15 05:20, Peter Hutterer wrote:
> On Wed, Jan 21, 2015 at 10:36:16AM +0100, Hans de Goede wrote:
> > systemd-logind integration does not work when starting X on a new tty, as
> > that detaches X from the current session and after hat systemd-logind revokes
> > all rights any already open fds and refuses to open new fds for X.
> >
> > This means that currently e.g. "startx -- vt7" breaks, and breaks badly,
> > requiring ssh access to the system to kill X.
> >
> > The fix for this is easy, we must not use systemd-logind integration when
> > not using KeepTty, or iow we may only use systemd-logind integration together
> > with KeepTty.
> >
> > Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> > ---
> > hw/xfree86/os-support/linux/systemd-logind.c | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/hw/xfree86/os-support/linux/systemd-logind.c \
> > b/hw/xfree86/os-support/linux/systemd-logind.c index 49758f4..b061877 100644
> > --- a/hw/xfree86/os-support/linux/systemd-logind.c
> > +++ b/hw/xfree86/os-support/linux/systemd-logind.c
> > @@ -34,6 +34,7 @@
> >
> > #include "os.h"
> > #include "dbus-core.h"
> > +#include "linux.h"
> > #include "xf86.h"
> > #include "xf86platformBus.h"
> > #include "xf86Xinput.h"
> > @@ -595,6 +596,12 @@ static struct dbus_core_hook core_hook = {
> > int
> > systemd_logind_init(void)
> > {
> > + /* get vtno now as it may change keeptty */
> > + linux_get_vtno();
> > + /* systemd_logind integration requires keeptty */
> > + if (!linux_get_keeptty())
> > + return 1;
> > +
>
> I think this behaviour should be documented in the man page. And maybe even
> printf here that "-keeptty provided, disabling systemd-logind" as an Info.
> Otherwise there's too much quietly happening that's not obvious.
>
> with that, Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
> for both
Will fix both for v2.
Regards,
Hans
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic