source: x/installing/xorg-server.xml@ adf287b

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since adf287b was adf287b, checked in by Xi Ruoyao <xry111@…>, 13 months ago

xorg-server: Mark both elogind and systemd dependencies runtime

xorg-server itself does not need libelogind/libsystemd to invoke the
logind D-Bus API. elogind/systemd-logind works for Xorg server when you
login: once you've logged in on a TTY, pam_systemd or pam_elogind
invokes systemd-logind or elogind to modify the ACL of the device node
of GPU for you:

$ getfacl /dev/dri/card1
getfacl: Removing leading '/' from absolute path names
# file: dev/dri/card1
# owner: root
# group: video
user::rw-
user:xry111:rw-
group::rw-
mask::rw-
other::---

Note that the "user:xry111:rw-" line allows the user logged in (in this
example, xry111, my user account) to operate on the GPU. If
systemd-logind or elogind is not installed, there will be no such a line
and you need to setuid bit for Xorg executable, which is not
recommended.

FWIW logind is smart enough not to add the ACL entry if you've logged in
via SSH.

You may need to logout and login again to use startx if you've installed
pam_{elogind,systemd} and Xorg server & xinit in a continous login
session, but this is already mentioned on xorg-config.xml.

You may ask why Xorg server links to libsystemd or libelogind. It uses
sd_notify and sd_listen_fds API so the Xorg server can function as a
socket-activated systemd service. This is useless in SysV: elogind is
a logind, not a service manager. In Systemd the libsystemd.so installed
in LFS should be enough, and we've never provided instructions to run
Xorg server in BLFS as a systemd service.

Reported-by: Rainer Fiebig <jrf@…>

  • Property mode set to 100644
File size: 9.7 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY xorg-server-download-http "&xorg-download-http;/xserver/xorg-server-&xorg-server-version;.tar.xz">
8 <!ENTITY xorg-server-download-ftp "&xorg-download-ftp;/xserver/xorg-server-&xorg-server-version;.tar.xz">
9 <!ENTITY xorg-server-md5sum "277a842f1e223820a31a9bd7887d2aab">
10 <!ENTITY xorg-server-size "4.8 MB">
11 <!ENTITY xorg-server-buildsize "187 MB (with tests)">
12 <!ENTITY xorg-server-time "0.4 SBU (using parallelism=4; with tests)">
13]>
14
15<sect1 id="xorg-server" xreflabel="Xorg-Server-&xorg-server-version;">
16 <?dbhtml filename="xorg-server.html"?>
17
18
19 <title>Xorg-Server-&xorg-server-version;</title>
20
21 <indexterm zone="xorg-server">
22 <primary sortas="a-xorg-server">xorg-server</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to Xorg Server</title>
27
28 <para>
29 The <application>Xorg</application> Server is the core
30 of the X Window system.
31 </para>
32
33 &lfs113_checked;
34
35 <bridgehead renderas="sect3">Package Information</bridgehead>
36 <itemizedlist spacing="compact">
37 <listitem>
38 <para>
39 Download (HTTP): <ulink url="&xorg-server-download-http;"/>
40 </para>
41 </listitem>
42 <listitem>
43 <para>
44 Download (FTP): <ulink url="&xorg-server-download-ftp;"/>
45 </para>
46 </listitem>
47 <listitem>
48 <para>
49 Download MD5 sum: &xorg-server-md5sum;
50 </para>
51 </listitem>
52 <listitem>
53 <para>
54 Download size: &xorg-server-size;
55 </para>
56 </listitem>
57 <listitem>
58 <para>
59 Estimated disk space required: &xorg-server-buildsize;
60 </para>
61 </listitem>
62 <listitem>
63 <para>
64 Estimated build time: &xorg-server-time;
65 </para>
66 </listitem>
67 </itemizedlist>
68
69 <bridgehead renderas="sect3">Xorg Server Dependencies</bridgehead>
70
71 <bridgehead renderas="sect4">Required</bridgehead>
72 <para role="required">
73 <xref linkend="libxcvt"/>,
74 <xref linkend="pixman"/>,
75 <xref linkend="xorg7-font"/> (only font-util), and at runtime:
76 <xref role="runtime" linkend="xkeyboard-config"/>
77 </para>
78
79 <bridgehead renderas="sect4">Recommended</bridgehead>
80 <para role="recommended">
81 <phrase revision="sysv"><xref linkend="elogind"/> (runtime),</phrase>
82 <xref linkend="libepoxy"/> (needed for glamor),
83 <xref linkend="libtirpc"/>,
84 <phrase revision="sysv"><xref role="runtime"
85 linkend="polkit"/> (runtime),</phrase>
86 <phrase revision="systemd"><xref linkend="systemd"/> (runtime),</phrase> and
87 <xref role='runtime' linkend='xorg-libinput-driver'/> (runtime)
88 </para>
89
90 <bridgehead renderas="sect4">Optional</bridgehead>
91 <para role="optional">
92 <xref role="runtime" linkend="acpid"/> (runtime),
93 <xref linkend="doxygen"/> (to build API documentation),
94 <xref linkend="fop"/> (to build documentation),
95 <xref linkend="libunwind"/>,
96 <xref linkend="nettle"/>,
97 <xref linkend="libgcrypt"/>,
98 <xref linkend="xcb-util-keysyms"/>,
99 <xref linkend="xcb-util-image"/>,
100 <xref linkend="xcb-util-renderutil"/>,
101 <xref linkend="xcb-util-wm"/> (all four to build Xephyr),
102 <xref linkend="xmlto"/> (to build documentation),
103 <xref linkend="xkeyboard-config"/> (for tests),
104 <ulink url="https://gitlab.freedesktop.org/xorg/test/rendercheck">rendercheck</ulink> (for tests), and
105 <ulink url="https://www.x.org/archive/individual/doc/">xorg-sgml-doctools</ulink> (to build documentation)
106 </para>
107
108 <para condition="html" role="usernotes">User Notes:
109 <ulink url='&blfs-wiki;/Xorg7Server'/>
110 </para>
111 </sect2>
112
113 <sect2 role="installation">
114 <title>Installation of Xorg Server</title>
115
116 <para>
117 Install the server by running the following commands:
118 </para>
119
120<screen><userinput>mkdir build &amp;&amp;
121cd build &amp;&amp;
122
123meson setup .. \
124 --prefix=$XORG_PREFIX \
125 --localstatedir=/var \
126 -Dsuid_wrapper=true \
127 -Dxkb_output_dir=/var/lib/xkb &amp;&amp;
128ninja</userinput></screen>
129
130 <para>
131 To test the results, issue: <command>ninja test</command>. You
132 will need to run <command>ldconfig</command> as the <systemitem
133 class="username">root</systemitem> user first or some tests may fail.
134 </para>
135
136 <para>
137 Now as the <systemitem class="username">root</systemitem>
138 user:
139 </para>
140
141<screen role="root" revision="sysv"><userinput>ninja install &amp;&amp;
142mkdir -pv /etc/X11/xorg.conf.d &amp;&amp;
143cat &gt;&gt; /etc/sysconfig/createfiles &lt;&lt; "EOF"
144<literal>/tmp/.ICE-unix dir 1777 root root
145/tmp/.X11-unix dir 1777 root root</literal>
146EOF</userinput></screen>
147
148<screen role="root" revision="systemd"><userinput>ninja install &amp;&amp;
149mkdir -pv /etc/X11/xorg.conf.d</userinput></screen>
150
151 </sect2>
152
153 <sect2 role="commands">
154 <title>Command Explanations</title>
155
156 <para>
157 <parameter>-Dsuid_wrapper=true</parameter>: Builds the suid-root
158 wrapper for legacy driver support on rootless xserver systems.
159 </para>
160
161 <para>
162 <option>-Dsystemd_logind=false</option>:
163 This switch disables <phrase revision="systemd">systemd-logind</phrase>
164 <phrase revision="sysv">elogind</phrase> integration, allowing Xorg Server
165 to work without having the <phrase revision="systemd">systemd</phrase>
166 <phrase revision="elogind">elogind</phrase> PAM module configured.
167 </para>
168
169 <para revision="sysv">
170 <command>cat &gt;&gt; /etc/sysconfig/createfiles...</command>: This
171 command creates the <filename class="directory">/tmp/.ICE-unix</filename>
172 and <filename class="directory">/tmp/.X11-unix</filename> directories at
173 startup, and ensures that the permissions and ownership are correct as
174 required by the server.
175 </para>
176
177 <para>
178 <option>-Dxephyr=true</option>: This option allows building Xephyr if its
179 dependencies are met.
180 </para>
181
182 </sect2>
183
184 <sect2 role="content">
185 <title>Contents</title>
186
187 <segmentedlist>
188 <segtitle>Installed Programs</segtitle>
189 <segtitle>Installed Libraries</segtitle>
190 <segtitle>Installed Directories</segtitle>
191
192 <seglistitem>
193 <seg>
194 gtf, X, Xnest, Xorg, Xvfb, and optionally Xephyr
195 </seg>
196 <seg>
197 several under $XORG_PREFIX/lib/xorg/modules/ including the
198 <filename class="libraryfile">modesetting_drv.so</filename>
199 driver
200 </seg>
201 <seg>
202 /etc/X11/xorg.conf.d,
203 $XORG_PREFIX/include/xorg,
204 $XORG_PREFIX/lib/xorg, and
205 $XORG_PREFIX/share/X11/xorg.conf.d
206 </seg>
207
208 </seglistitem>
209 </segmentedlist>
210
211 <variablelist>
212 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
213 <?dbfo list-presentation="list"?>
214 <?dbhtml list-presentation="table"?>
215
216 <varlistentry id="gtf-x7">
217 <term><command>gtf</command></term>
218 <listitem>
219 <para>
220 calculates VESA GTF mode lines
221 </para>
222 <indexterm zone="xorg-server gtf-x7">
223 <primary sortas="b-gtf">gtf</primary>
224 </indexterm>
225 </listitem>
226 </varlistentry>
227
228 <varlistentry id="X-x7">
229 <term><command>X</command></term>
230 <listitem>
231 <para>
232 is a symbolic link to Xorg
233 </para>
234 <indexterm zone="xorg-server X-x7">
235 <primary sortas="b-X">X</primary>
236 </indexterm>
237 </listitem>
238 </varlistentry>
239
240 <varlistentry id="Xephyr-x7">
241 <term><command>Xephyr</command></term>
242 <listitem>
243 <para>
244 is a nested X server which supports modern X extensions
245 </para>
246 <indexterm zone="xorg-server Xephyr-x7">
247 <primary sortas="b-Xephyr">Xephyr</primary>
248 </indexterm>
249 </listitem>
250 </varlistentry>
251
252 <varlistentry id="Xnest-x7">
253 <term><command>Xnest</command></term>
254 <listitem>
255 <para>
256 is a nested X server
257 </para>
258 <indexterm zone="xorg-server Xnest-x7">
259 <primary sortas="b-Xnest">Xnest</primary>
260 </indexterm>
261 </listitem>
262 </varlistentry>
263
264 <varlistentry id="Xorg-x7">
265 <term><command>Xorg</command></term>
266 <listitem>
267 <para>
268 is the X11R7 X Server
269 </para>
270 <indexterm zone="xorg-server Xorg-x7">
271 <primary sortas="b-Xorg">Xorg</primary>
272 </indexterm>
273 </listitem>
274 </varlistentry>
275
276 <varlistentry id="Xvfb-x7">
277 <term><command>Xvfb</command></term>
278 <listitem>
279 <para>
280 is the virtual framebuffer X server for X Version 11
281 </para>
282 <indexterm zone="xorg-server Xvfb-x7">
283 <primary sortas="b-Xvfb">Xvfb</primary>
284 </indexterm>
285 </listitem>
286 </varlistentry>
287
288 <varlistentry id="modesetting_drv-x7">
289 <term><filename class="libraryfile">modesetting_drv.so</filename></term>
290 <listitem>
291 <para>
292 provides a video driver for machines using Kernel Mode Setting (KMS).
293 This will use glamor if that has been enabled and the hardware offers
294 acceleration
295 </para>
296 <indexterm zone="xorg-server modesetting_drv-x7">
297 <primary sortas="c-modesetting_drv">modesetting_drv.so</primary>
298 </indexterm>
299 </listitem>
300 </varlistentry>
301
302 </variablelist>
303
304 </sect2>
305
306</sect1>
Note: See TracBrowser for help on using the repository browser.