mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-07 03:58:03 +02:00
Merge branch 'server-1.8-branch' of git://people.freedesktop.org/~alanc/xserver into server-1.8-branch
This commit is contained in:
commit
f7a2da6df8
3 changed files with 90 additions and 39 deletions
|
|
@ -100,12 +100,12 @@ specifies a file which contains a collection of authorization records used
|
|||
to authenticate access. See also the \fIxdm\fP(1) and
|
||||
\fIXsecurity\fP(__miscmansuffix__) manual pages.
|
||||
.TP 8
|
||||
.B \-bs
|
||||
disables backing store support on all screens.
|
||||
.TP 8
|
||||
.B \-br
|
||||
sets the default root window to solid black instead of the standard root weave
|
||||
pattern.
|
||||
pattern. This is the default unless -retro or -wr is specified.
|
||||
.TP 8
|
||||
.B \-bs
|
||||
disables backing store support on all screens.
|
||||
.TP 8
|
||||
.B \-c
|
||||
turns off key-click.
|
||||
|
|
@ -117,17 +117,6 @@ sets key-click volume (allowable range: 0-100).
|
|||
sets the visual class for the root window of color screens.
|
||||
The class numbers are as specified in the X protocol.
|
||||
Not obeyed by all servers.
|
||||
.ig
|
||||
.TP 8
|
||||
.B \-config \fIfilename\fP
|
||||
reads more options from the given file. Options in the file may be separated
|
||||
by newlines if desired. If a '#' character appears on a line, all characters
|
||||
between it and the next newline are ignored, providing a simple commenting
|
||||
facility. The \fB\-config\fP option itself may appear in the file.
|
||||
.BR NOTE :
|
||||
This option is disabled when the Xserver is run with an effective uid
|
||||
different from the user's real uid.
|
||||
..
|
||||
.TP 8
|
||||
.B \-core
|
||||
causes the server to generate a core dump on fatal errors.
|
||||
|
|
@ -184,6 +173,9 @@ sets the maximum big request to
|
|||
.I size
|
||||
MB.
|
||||
.TP 8
|
||||
.B \-nocursor
|
||||
disable the display of the pointer cursor.
|
||||
.TP 8
|
||||
.B \-nolisten \fItrans-type\fP
|
||||
disables a transport type. For example, TCP/IP connections can be disabled
|
||||
with
|
||||
|
|
@ -584,11 +576,11 @@ Security: \fIXsecurity\fP(__miscmansuffix__), \fIxauth\fP(1), \fIXau\fP(1),
|
|||
Starting the server: \fIstartx\fP(1), \fIxdm\fP(1), \fIxinit\fP(1)
|
||||
.PP
|
||||
Controlling the server once started: \fIxset\fP(1), \fIxsetroot\fP(1),
|
||||
\fIxhost\fP(1)
|
||||
\fIxhost\fP(1), \fIxinput\fP(1), \fIxrandr\fP(1)
|
||||
.PP
|
||||
Server-specific man pages:
|
||||
\fIXorg\fP(1), \fIXdmx\fP(1), \fIXephyr\fP(1), \fIXnest\fP(1),
|
||||
\fIXvfb\fP(1), \fIXDarwin\fP(1), \fIXWin\fP(1).
|
||||
\fIXvfb\fP(1), \fIXquartz\fP(1), \fIXWin\fP(1).
|
||||
.PP
|
||||
Server internal documentation:
|
||||
.I "Definition of the Porting Layer for the X v11 Sample Server"
|
||||
|
|
|
|||
|
|
@ -6,4 +6,5 @@ endif
|
|||
|
||||
EXTRA_DIST = \
|
||||
README.DRI \
|
||||
README.modes \
|
||||
README.rapidaccess
|
||||
|
|
|
|||
|
|
@ -33,8 +33,21 @@
|
|||
# include <sys/kd.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Applications see VT number as consecutive integers starting from 1.
|
||||
* VT number VT device
|
||||
* -------------------------------------------------------
|
||||
* 1 : /dev/vt/0 (Alt + Ctrl + F1)
|
||||
* 2 : /dev/vt/2 (Alt + Ctrl + F2)
|
||||
* 3 : /dev/vt/3 (Alt + Ctrl + F3)
|
||||
* ... ...
|
||||
*/
|
||||
#define CONSOLE_VTNO 1
|
||||
#define SOL_CONSOLE_DEV "/dev/console"
|
||||
|
||||
static Bool KeepTty = FALSE;
|
||||
static Bool Protect0 = FALSE;
|
||||
static Bool UseConsole = FALSE;
|
||||
#ifdef HAS_USL_VTS
|
||||
static int VTnum = -1;
|
||||
static int xf86StartVT = -1;
|
||||
|
|
@ -112,8 +125,30 @@ xf86OpenConsole(void)
|
|||
vtEnabled = 0;
|
||||
}
|
||||
}
|
||||
#endif /* HAS_USL_VTS */
|
||||
|
||||
if (UseConsole)
|
||||
{
|
||||
strlcpy(consoleDev, SOL_CONSOLE_DEV, sizeof(consoleDev));
|
||||
|
||||
#ifdef HAS_USL_VTS
|
||||
xf86Info.vtno = CONSOLE_VTNO;
|
||||
|
||||
if (vtEnabled == 0)
|
||||
{
|
||||
xf86StartVT = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ioctl(fd, VT_GETSTATE, &vtinfo) < 0)
|
||||
FatalError("xf86OpenConsole: Cannot determine current VT\n");
|
||||
xf86StartVT = vtinfo.v_active;
|
||||
}
|
||||
#endif /* HAS_USL_VTS */
|
||||
goto OPENCONSOLE;
|
||||
}
|
||||
|
||||
#ifdef HAS_USL_VTS
|
||||
if (vtEnabled == 0)
|
||||
{
|
||||
/* VT not enabled - kernel too old or Sparc platforms
|
||||
|
|
@ -123,32 +158,31 @@ xf86OpenConsole(void)
|
|||
xf86StartVT = 0;
|
||||
xf86Info.vtno = 0;
|
||||
strlcpy(consoleDev, xf86SolarisFbDev, sizeof(consoleDev));
|
||||
goto OPENCONSOLE;
|
||||
}
|
||||
|
||||
if (ioctl(fd, VT_GETSTATE, &vtinfo) < 0)
|
||||
FatalError("xf86OpenConsole: Cannot determine current VT\n");
|
||||
|
||||
xf86StartVT = vtinfo.v_active;
|
||||
|
||||
if (VTnum != -1)
|
||||
{
|
||||
xf86Info.vtno = VTnum;
|
||||
from = X_CMDLINE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ioctl(fd, VT_GETSTATE, &vtinfo) < 0)
|
||||
FatalError("xf86OpenConsole: Cannot determine current VT\n");
|
||||
|
||||
xf86StartVT = vtinfo.v_active;
|
||||
|
||||
if (VTnum != -1)
|
||||
if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) ||
|
||||
(xf86Info.vtno == -1))
|
||||
{
|
||||
xf86Info.vtno = VTnum;
|
||||
from = X_CMDLINE;
|
||||
FatalError("xf86OpenConsole: Cannot find a free VT\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) ||
|
||||
(xf86Info.vtno == -1))
|
||||
{
|
||||
FatalError("xf86OpenConsole: Cannot find a free VT\n");
|
||||
}
|
||||
}
|
||||
|
||||
xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno);
|
||||
snprintf(consoleDev, PATH_MAX, "/dev/vt/%d", xf86Info.vtno);
|
||||
}
|
||||
|
||||
xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno);
|
||||
snprintf(consoleDev, PATH_MAX, "/dev/vt/%d", xf86Info.vtno);
|
||||
|
||||
if (fd != -1)
|
||||
{
|
||||
close(fd);
|
||||
|
|
@ -156,6 +190,7 @@ xf86OpenConsole(void)
|
|||
|
||||
#endif /* HAS_USL_VTS */
|
||||
|
||||
OPENCONSOLE:
|
||||
if (!KeepTty)
|
||||
setpgrp();
|
||||
|
||||
|
|
@ -163,11 +198,10 @@ xf86OpenConsole(void)
|
|||
FatalError("xf86OpenConsole: Cannot open %s (%s)\n",
|
||||
consoleDev, strerror(errno));
|
||||
|
||||
#ifdef HAS_USL_VTS
|
||||
|
||||
/* Change ownership of the vt */
|
||||
/* Change ownership of the vt or console */
|
||||
chown(consoleDev, getuid(), getgid());
|
||||
|
||||
#ifdef HAS_USL_VTS
|
||||
if (vtEnabled)
|
||||
{
|
||||
/*
|
||||
|
|
@ -179,6 +213,13 @@ xf86OpenConsole(void)
|
|||
if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
|
||||
xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
|
||||
|
||||
#ifdef VT_SET_CONSUSER /* added in snv_139 */
|
||||
if (strcmp(display, "0") == 0)
|
||||
if (ioctl(xf86Info.consoleFd, VT_SET_CONSUSER) != 0)
|
||||
xf86Msg(X_WARNING,
|
||||
"xf86OpenConsole: VT_SET_CONSUSER failed\n");
|
||||
#endif
|
||||
|
||||
if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0)
|
||||
FatalError("xf86OpenConsole: VT_GETMODE failed\n");
|
||||
|
||||
|
|
@ -220,6 +261,13 @@ xf86OpenConsole(void)
|
|||
if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0)
|
||||
xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n");
|
||||
|
||||
#ifdef VT_SET_CONSUSER /* added in snv_139 */
|
||||
if (strcmp(display, "0") == 0)
|
||||
if (ioctl(xf86Info.consoleFd, VT_SET_CONSUSER) != 0)
|
||||
xf86Msg(X_WARNING,
|
||||
"xf86OpenConsole: VT_SET_CONSUSER failed\n");
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If the server doesn't have the VT when the reset occurs,
|
||||
* this is to make sure we don't continue until the activate
|
||||
|
|
@ -330,6 +378,15 @@ xf86ProcessArgument(int argc, char **argv, int i)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Use /dev/console as the console device.
|
||||
*/
|
||||
if (!strcmp(argv[i], "-C"))
|
||||
{
|
||||
UseConsole = TRUE;
|
||||
return 1;
|
||||
}
|
||||
|
||||
#ifdef HAS_USL_VTS
|
||||
|
||||
if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
|
||||
|
|
@ -364,4 +421,5 @@ void xf86UseMsg()
|
|||
ErrorF("-dev <fb> Framebuffer device\n");
|
||||
ErrorF("-keeptty Don't detach controlling tty\n");
|
||||
ErrorF(" (for debugging only)\n");
|
||||
ErrorF("-C Use /dev/console as the console device\n");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue