Go to file
Hans de Goede 1dba5a0b19 linux: Add linux_parse_vt_settings and linux_get_keeptty helpers
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 on 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.

But the final KeepTty value is not known until the code to chose which vtno to
run on has been called, which currently happens after intializing
systemd-logind.

This commit is step 1 in fixing the "startx -- vt7" breakage, it factors out
the linux xf86OpenConsole bits which set xf86Info.vtno and keepTty so that
these can be called earlier. Calling this earlier is safe as this code has
no side effects other than setting xf86Info.vtno and keepTty.

Note this basically only moves a large chunk of xf86OpenConsole() into
linux_parse_vt_settings() without changing a single line of it, this is
hard to see in the diff because the identation level has changed.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-06-03 11:31:30 +02:00
composite Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
config config: remove 10-evdev.conf, let the evdev driver install that file 2015-05-18 13:41:09 +10:00
damageext Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
dbe Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
dix dix: hook up the unaccelerated valuator masks 2015-05-20 12:44:58 +10:00
doc Remove remaining doc references to Xalloc, Xrealloc, and Xfree 2015-04-21 16:57:07 -07:00
dri3 dri3: unvalidated lengths in DRI3 extension swapped procs [CVE-2014-8103 1/2] 2014-12-08 18:09:48 -08:00
exa Convert exa & fb to new *allocarray functions 2015-04-21 16:58:07 -07:00
fb Convert exa & fb to new *allocarray functions 2015-04-21 16:58:07 -07:00
glamor glamor: don't do render ops with matching source/dest (v3) 2015-06-02 14:16:26 +10:00
glx Revert "glx/dri2: Disable AIGLX if indirect GLX is disabled" 2015-05-14 21:29:40 -07:00
hw linux: Add linux_parse_vt_settings and linux_get_keeptty helpers 2015-06-03 11:31:30 +02:00
include os: support new implicit local user access mode [CVE-2015-3164 2/3] 2015-05-26 11:22:21 -07:00
m4 configure.ac: remove remaining TLS references 2015-03-24 17:20:26 +00:00
man Add -iglx & +iglx to Xserver.man 2014-11-30 11:32:21 -08:00
mi Convert mi & miext to new *allocarray functions 2015-04-21 16:58:08 -07:00
miext Convert mi & miext to new *allocarray functions 2015-04-21 16:58:08 -07:00
os backtrace.c: Fix word cast to a pointer 2015-05-26 14:35:55 -07:00
present present: Copy unflip contents back to the Screen Pixmap 2015-05-26 15:09:32 -07:00
pseudoramiX Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
randr Merge remote-tracking branch 'evelikov/master' 2015-05-11 16:50:43 -07:00
record Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
render Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
test test: add tests for new valuator mask features 2015-05-20 12:44:58 +10:00
Xext Merge remote-tracking branch 'ajax/xserver-next' 2015-05-11 16:34:48 -07:00
xfixes Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
Xi Convert top level extensions to new *allocarray functions 2015-04-21 16:57:08 -07:00
xkb Convert XKB to new *allocarray functions 2015-04-21 16:57:54 -07:00
.dir-locals.el Add .dir-locals.el 2013-08-17 12:17:36 +02:00
.gitignore .gitignore: Add new autotools file 'test-driver' 2014-04-21 13:41:42 -07:00
autogen.sh autogen.sh: use quoted string variables 2015-03-13 12:31:21 +10:00
configure.ac Xephyr: Don't crash when no command line argument is specified 2015-05-12 09:49:49 -07:00
COPYING modesetting: Merge modesetting's COPYING into the xserver's. 2014-09-15 12:46:02 -07:00
devbook.am doc: Create a script to filter xmlto output 2015-01-05 14:24:06 -08:00
docbook.am docbook.am: embed css styles inside the HTML HEAD element 2011-09-21 14:07:49 -07:00
fix-miregion Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-miregion-private Change region implementation names to eliminate the 'mi' prefix 2010-06-05 17:47:32 -07:00
fix-patch-whitespace Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
fix-region Rename region macros to eliminate screen argument 2010-06-05 18:59:00 -07:00
Makefile.am DIST_SUBDIRS needs to include glamor, even if it isn't built 2014-02-13 15:25:56 -08:00
manpages.am Xorg: Add a suid root wrapper 2014-03-12 08:50:05 +01:00
README packaging: provide a default README file #24206 2010-01-27 14:00:17 -08:00
xorg-server.m4 macros: clarify documentation 2012-11-05 13:24:57 -06:00
xorg-server.pc.in xfree86: link modules against Xorg symbols on Cygwin 2012-04-05 21:57:07 -05:00
xserver.ent.in doc: relocate xserver.ent in the package root directory 2011-05-14 11:22:26 -07:00

					X Server

The X server accepts requests from client applications to create windows,
which are (normally rectangular) "virtual screens" that the client program
can draw into.

Windows are then composed on the actual screen by the X server
(or by a separate composite manager) as directed by the window manager,
which usually communicates with the user via graphical controls such as buttons
and draggable titlebars and borders.

For a comprehensive overview of X Server and X Window System, consult the
following article:
http://en.wikipedia.org/wiki/X_server

All questions regarding this software should be directed at the
Xorg mailing list:

        http://lists.freedesktop.org/mailman/listinfo/xorg

Please submit bug reports to the Xorg bugzilla:

        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg

The master development code repository can be found at:

        git://anongit.freedesktop.org/git/xorg/xserver

        http://cgit.freedesktop.org/xorg/xserver

For patch submission instructions, see:

	http://www.x.org/wiki/Development/Documentation/SubmittingPatches

For more information on the git code manager, see:

        http://wiki.x.org/wiki/GitPage