View | Details | Raw Unified | Return to bug 207347
Collapse All | Expand All

(-)chapter.xml (-2118 / +2117 lines)
Lines 1-2118 Link Here
1
<?xml version="1.0" encoding="iso-8859-1"?>
1
<?xml version="1.0" encoding="iso-8859-1"?>
2
<!--
2
<!--
3
     The FreeBSD Documentation Project
3
     The FreeBSD Documentation Project
4
4
5
     $FreeBSD$
5
     $FreeBSD$
6
-->
6
-->
7
<chapter xmlns="http://docbook.org/ns/docbook"
7
<chapter xmlns="http://docbook.org/ns/docbook"
8
  xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
8
  xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
9
  xml:id="x11">
9
  xml:id="x11">
10
  <!--
10
  <!--
11
  <chapterinfo>
11
  <chapterinfo>
12
    <authorgroup>
12
    <authorgroup>
13
      <author>
13
      <author>
14
	<firstname>Ken</firstname>
14
	<firstname>Ken</firstname>
15
	<surname>Tom</surname>
15
	<surname>Tom</surname>
16
	<contrib>Updated for X.Org's X11 server by </contrib>
16
	<contrib>Updated for X.Org's X11 server by </contrib>
17
      </author>
17
      </author>
18
      <author>
18
      <author>
19
	<firstname>Marc</firstname>
19
	<firstname>Marc</firstname>
20
	<surname>Fonvieille</surname>
20
	<surname>Fonvieille</surname>
21
      </author>
21
      </author>
22
    </authorgroup>
22
    </authorgroup>
23
  </chapterinfo>
23
  </chapterinfo>
24
  -->
24
  -->
25
25
26
  <title>The X Window System</title>
26
  <title>The X Window System</title>
27
27
28
  <sect1 xml:id="x11-synopsis">
28
  <sect1 xml:id="x11-synopsis">
29
    <title>Synopsis</title>
29
    <title>Synopsis</title>
30
30
31
    <para>An installation of &os; using
31
    <para>An installation of &os; using
32
      <application>bsdinstall</application> does not automatically
32
      <application>bsdinstall</application> does not automatically
33
      install a graphical user interface.  This chapter describes how
33
      install a graphical user interface.  This chapter describes how
34
      to install and configure <application>&xorg;</application>,
34
      to install and configure <application>&xorg;</application>,
35
      which provides the open source X Window System used to provide a
35
      which provides the open source X Window System used to provide a
36
      graphical environment.  It then describes how to find and
36
      graphical environment.  It then describes how to find and
37
      install a desktop environment or window manager.</para>
37
      install a desktop environment or window manager.</para>
38
38
39
    <note>
39
    <note>
40
      <para>Users who prefer an installation method that automatically
40
      <para>Users who prefer an installation method that automatically
41
	configures the <application>&xorg;</application> and offers a
41
	configures the <application>&xorg;</application> and offers a
42
	choice of window managers during installation should refer to
42
	choice of window managers during installation should refer to
43
	the <link xlink:href="http://www.pcbsd.org/">pcbsd.org</link>
43
	the <link xlink:href="http://www.pcbsd.org/">pcbsd.org</link>
44
	website.</para>
44
	website.</para>
45
    </note>
45
    </note>
46
46
47
    <para>For more information on the video hardware that
47
    <para>For more information on the video hardware that
48
      <application>&xorg;</application> supports, refer to the <link
48
      <application>&xorg;</application> supports, refer to the <link
49
	xlink:href="http://www.x.org/">x.org</link> website.</para>
49
	xlink:href="http://www.x.org/">x.org</link> website.</para>
50
50
51
    <para>After reading this chapter, you will know:</para>
51
    <para>After reading this chapter, you will know:</para>
52
52
53
    <itemizedlist>
53
    <itemizedlist>
54
      <listitem>
54
      <listitem>
55
	<para>The various components of the X Window System, and how
55
	<para>The various components of the X Window System, and how
56
	  they interoperate.</para>
56
	  they interoperate.</para>
57
      </listitem>
57
      </listitem>
58
58
59
      <listitem>
59
      <listitem>
60
	<para>How to install and configure
60
	<para>How to install and configure
61
	  <application>&xorg;</application>.</para>
61
	  <application>&xorg;</application>.</para>
62
      </listitem>
62
      </listitem>
63
63
64
      <listitem>
64
      <listitem>
65
	<para>How to install and configure several window managers
65
	<para>How to install and configure several window managers
66
	  and desktop environments.</para>
66
	  and desktop environments.</para>
67
      </listitem>
67
      </listitem>
68
68
69
      <listitem>
69
      <listitem>
70
	<para>How to use &truetype; fonts in
70
	<para>How to use &truetype; fonts in
71
	  <application>&xorg;</application>.</para>
71
	  <application>&xorg;</application>.</para>
72
      </listitem>
72
      </listitem>
73
73
74
      <listitem>
74
      <listitem>
75
	<para>How to set up your system for graphical logins
75
	<para>How to set up your system for graphical logins
76
	  (<application>XDM</application>).</para>
76
	  (<application>XDM</application>).</para>
77
      </listitem>
77
      </listitem>
78
    </itemizedlist>
78
    </itemizedlist>
79
79
80
    <para>Before reading this chapter, you should:</para>
80
    <para>Before reading this chapter, you should:</para>
81
81
82
    <itemizedlist>
82
    <itemizedlist>
83
      <listitem>
83
      <listitem>
84
	<para>Know how to install additional third-party
84
	<para>Know how to install additional third-party
85
	  software as described in <xref linkend="ports"/>.</para>
85
	  software as described in <xref linkend="ports"/>.</para>
86
      </listitem>
86
      </listitem>
87
    </itemizedlist>
87
    </itemizedlist>
88
  </sect1>
88
  </sect1>
89
89
90
  <sect1 xml:id="x-understanding">
90
  <sect1 xml:id="x-understanding">
91
    <title>Terminology</title>
91
    <title>Terminology</title>
92
92
93
    <para>While it is not necessary to understand all of the details
93
    <para>While it is not necessary to understand all of the details
94
      of the various components in the X Window System and how they
94
      of the various components in the X Window System and how they
95
      interact, some basic knowledge of these components can be
95
      interact, some basic knowledge of these components can be
96
      useful.</para>
96
      useful.</para>
97
97
98
    <variablelist>
98
    <variablelist>
99
      <varlistentry>
99
      <varlistentry>
100
	<term>X server</term>
100
	<term>X server</term>
101
101
102
	<listitem>
102
	<listitem>
103
	  <para>X was designed from the beginning to be
103
	  <para>X was designed from the beginning to be
104
	    network-centric, and adopts a <quote>client-server</quote>
104
	    network-centric, and adopts a <quote>client-server</quote>
105
	    model.  In this model, the <quote>X server</quote> runs on
105
	    model.  In this model, the <quote>X server</quote> runs on
106
	    the computer that has the keyboard, monitor, and mouse
106
	    the computer that has the keyboard, monitor, and mouse
107
	    attached.  The server's responsibility includes tasks such
107
	    attached.  The server's responsibility includes tasks such
108
	    as managing the display, handling input from the keyboard
108
	    as managing the display, handling input from the keyboard
109
	    and mouse, and handling input or output from other devices
109
	    and mouse, and handling input or output from other devices
110
	    such as a tablet or a video projector.  This confuses some
110
	    such as a tablet or a video projector.  This confuses some
111
	    people, because the X terminology is exactly backward to
111
	    people, because the X terminology is exactly backward to
112
	    what they expect.  They expect the <quote>X server</quote>
112
	    what they expect.  They expect the <quote>X server</quote>
113
	    to be the big powerful machine down the hall, and the
113
	    to be the big powerful machine down the hall, and the
114
	    <quote>X client</quote> to be the machine on their
114
	    <quote>X client</quote> to be the machine on their
115
	    desk.</para>
115
	    desk.</para>
116
	</listitem>
116
	</listitem>
117
      </varlistentry>
117
      </varlistentry>
118
118
119
      <varlistentry>
119
      <varlistentry>
120
	<term>X client</term>
120
	<term>X client</term>
121
121
122
	<listitem>
122
	<listitem>
123
	  <para>Each X application, such as
123
	  <para>Each X application, such as
124
	    <application>XTerm</application> or
124
	    <application>XTerm</application> or
125
	    <application>Firefox</application>, is a
125
	    <application>Firefox</application>, is a
126
	    <quote>client</quote>.  A client sends messages to the
126
	    <quote>client</quote>.  A client sends messages to the
127
	    server such as <quote>Please draw a window at these
127
	    server such as <quote>Please draw a window at these
128
	      coordinates</quote>, and the server sends back messages
128
	      coordinates</quote>, and the server sends back messages
129
	    such as <quote>The user just clicked on the OK
129
	    such as <quote>The user just clicked on the OK
130
	      button</quote>.</para>
130
	      button</quote>.</para>
131
131
132
	  <para>In a home or small office environment, the X server
132
	  <para>In a home or small office environment, the X server
133
	    and the X clients commonly run on the same computer.  It
133
	    and the X clients commonly run on the same computer.  It
134
	    is also possible to run the X server on a less powerful
134
	    is also possible to run the X server on a less powerful
135
	    computer and to run the X applications on a more powerful
135
	    computer and to run the X applications on a more powerful
136
	    system.  In this scenario, the communication between the X
136
	    system.  In this scenario, the communication between the X
137
	    client and server takes place over the network.</para>
137
	    client and server takes place over the network.</para>
138
	</listitem>
138
	</listitem>
139
      </varlistentry>
139
      </varlistentry>
140
140
141
      <varlistentry>
141
      <varlistentry>
142
	<term>window manager</term>
142
	<term>window manager</term>
143
143
144
	<listitem>
144
	<listitem>
145
	  <para>X does not dictate what windows should look like on
145
	  <para>X does not dictate what windows should look like on-screen, how to move them around with the mouse, which
146
	    screen, how to move them around with the mouse, which
146
	    keystrokes should be used to move between windows, what
147
	    keystrokes should be used to move between windows, what
147
	    the title bars on each window should look like, whether or
148
	    the title bars on each window should look like, whether or
148
	    not they have close buttons on them, and so on.  Instead,
149
	    not they have close buttons on them, and so on.  Instead,
149
	    X delegates this responsibility to a separate window
150
	    X delegates this responsibility to a separate window
150
	    manager application.  There are <link
151
	    manager application.  There are <link
151
	      xlink:href="http://xwinman.org/">dozens of window
152
	      xlink:href="http://xwinman.org/">dozens of window
152
	      managers</link> available.  Each window manager provides
153
	      managers</link> available.  Each window manager provides
153
	    a different look and feel: some support virtual desktops,
154
	    a different look and feel: some support virtual desktops,
154
	    some allow customized keystrokes to manage the desktop,
155
	    some allow customized keystrokes to manage the desktop,
155
	    some have a <quote>Start</quote> button, and some are
156
	    some have a <quote>Start</quote> button, and some are
156
	    themeable, allowing a complete change of the desktop's
157
	    themeable, allowing a complete change of the desktop's
157
	    look-and-feel.  Window managers are available in the
158
	    look-and-feel.  Window managers are available in the
158
	    <filename>x11-wm</filename> category of the Ports
159
	    <filename>x11-wm</filename> category of the Ports
159
	    Collection.</para>
160
	    Collection.</para>
160
161
161
	  <para>Each window manager uses a different configuration
162
	  <para>Each window manager uses a different configuration
162
	    mechanism.  Some expect configuration file written by hand
163
	    mechanism.  Some expect configuration file written by hand
163
	    while others provide graphical tools for most
164
	    while others provide graphical tools for most
164
	    configuration tasks.</para>
165
	    configuration tasks.</para>
165
	</listitem>
166
	</listitem>
166
      </varlistentry>
167
      </varlistentry>
167
168
168
      <varlistentry>
169
      <varlistentry>
169
	<term>desktop environment</term>
170
	<term>desktop environment</term>
170
171
171
	<listitem>
172
	<listitem>
172
	  <para><application>KDE</application> and
173
	  <para><application>KDE</application> and
173
	    <application>GNOME</application> are considered to be
174
	    <application>GNOME</application> are considered to be
174
	    desktop environments as they include an entire suite of
175
	    desktop environments as they include an entire suite of
175
	    applications for performing common desktop tasks.  These
176
	    applications for performing common desktop tasks.  These
176
	    may include office suites, web browsers, and games.</para>
177
	    may include office suites, web browsers, and games.</para>
177
	</listitem>
178
	</listitem>
178
      </varlistentry>
179
      </varlistentry>
179
180
180
      <varlistentry>
181
      <varlistentry>
181
	<term>focus policy</term>
182
	<term>focus policy</term>
182
183
183
	<listitem>
184
	<listitem>
184
	  <para>The window manager is responsible for the mouse focus
185
	  <para>The window manager is responsible for the mouse focus
185
	    policy.  This policy provides some means for choosing
186
	    policy.  This policy provides some means for choosing
186
	    which window is actively receiving keystrokes and it
187
	    which window is actively receiving keystrokes and it
187
	    should also visibly indicate which window is currently
188
	    should also visibly indicate which window is currently
188
	    active.</para>
189
	    active.</para>
189
190
190
	  <para>One focus policy is called
191
	  <para>One focus policy is called
191
	    <quote>click-to-focus</quote>.  In this model, a window
192
	    <quote>click-to-focus</quote>.  In this model, a window
192
	    becomes active upon receiving a mouse click.  In the
193
	    becomes active upon receiving a mouse click.  In the
193
	    <quote>focus-follows-mouse</quote> policy, the window that
194
	    <quote>focus-follows-mouse</quote> policy, the window that
194
	    is under the mouse pointer has focus and the focus is
195
	    is under the mouse pointer has focus and the focus is
195
	    changed by pointing at another window.  If the mouse is
196
	    changed by pointing at another window.  If the mouse is
196
	    over the root window, then this window is focused.  In the
197
	    over the root window, then this window is focused.  In the
197
	    <quote>sloppy-focus</quote> model, if the mouse is moved
198
	    <quote>sloppy-focus</quote> model, if the mouse is moved
198
	    over the root window, the most recently used window still
199
	    over the root window, the most recently used window still
199
	    has the focus.  With sloppy-focus, focus is only changed
200
	    has the focus.  With sloppy-focus, focus is only changed
200
	    when the cursor enters a new window, and not when exiting
201
	    when the cursor enters a new window, and not when exiting
201
	    the current window.  In the <quote>click-to-focus</quote>
202
	    the current window.  In the <quote>click-to-focus</quote>
202
	    policy, the active window is selected by mouse click.  The
203
	    policy, the active window is selected by mouse click.  The
203
	    window may then be raised and appear in front of all other
204
	    window may then be raised and appear in front of all other
204
	    windows.  All keystrokes will now be directed to this
205
	    windows.  All keystrokes will now be directed to this
205
	    window, even if the cursor is moved to another
206
	    window, even if the cursor is moved to another
206
	    window.</para>
207
	    window.</para>
207
208
208
	  <para>Different window managers support different focus
209
	  <para>Different window managers support different focus
209
	    models.  All of them support click-to-focus, and the
210
	    models.  All of them support click-to-focus, and the
210
	    majority of them also support other policies.  Consult the
211
	    majority of them also support other policies.  Consult the
211
	    documentation for the window manager to determine which
212
	    documentation for the window manager to determine which
212
	    focus models are available.</para>
213
	    focus models are available.</para>
213
	</listitem>
214
	</listitem>
214
      </varlistentry>
215
      </varlistentry>
215
216
216
      <varlistentry>
217
      <varlistentry>
217
	<term>widgets</term>
218
	<term>widgets</term>
218
219
219
	<listitem>
220
	<listitem>
220
	  <para>Widget is a term for all of the items in the user
221
	  <para>Widget is a term for all of the items in the user
221
	    interface that can be clicked or manipulated in some way.
222
	    interface that can be clicked or manipulated in some way.
222
	    This includes buttons, check boxes, radio buttons, icons,
223
	    This includes buttons, check boxes, radio buttons, icons,
223
	    and lists.  A widget toolkit is a set of widgets used to
224
	    and lists.  A widget toolkit is a set of widgets used to
224
	    create graphical applications.  There are several popular
225
	    create graphical applications.  There are several popular
225
	    widget toolkits, including Qt, used by
226
	    widget toolkits, including Qt, used by
226
	    <application>KDE</application>, and GTK+, used by
227
	    <application>KDE</application>, and GTK+, used by
227
	    <application>GNOME</application>.  As a result,
228
	    <application>GNOME</application>.  As a result,
228
	    applications will have a different look and feel,
229
	    applications will have a different look and feel,
229
	    depending upon which widget toolkit was used to create the
230
	    depending upon which widget toolkit was used to create the
230
	    application.</para>
231
	    application.</para>
231
	</listitem>
232
	</listitem>
232
      </varlistentry>
233
      </varlistentry>
233
    </variablelist>
234
    </variablelist>
234
  </sect1>
235
  </sect1>
235
236
236
  <sect1 xml:id="x-install">
237
  <sect1 xml:id="x-install">
237
    <title>Installing <application>&xorg;</application></title>
238
    <title>Installing <application>&xorg;</application></title>
238
239
239
    <para>On &os;, <application>&xorg;</application> can be installed
240
    <para>On &os;, <application>&xorg;</application> can be installed
240
      as a package or port.</para>
241
      as a package or port.</para>
241
242
242
    <para>To build and install from the Ports Collection:</para>
243
    <para>To build and install from the Ports Collection:</para>
243
244
244
    <screen>&prompt.root; <userinput>cd /usr/ports/x11/xorg</userinput>
245
    <screen>&prompt.root; <userinput>cd /usr/ports/x11/xorg</userinput>
245
&prompt.root; <userinput>make install clean</userinput></screen>
246
&prompt.root; <userinput>make install clean</userinput></screen>
246
247
247
    <para>The binary package can be installed more quickly but with
248
    <para>The binary package can be installed more quickly but with
248
      fewer options for customization:</para>
249
      fewer options for customization:</para>
249
250
250
    <screen>&prompt.root; <userinput>pkg install xorg</userinput></screen>
251
    <screen>&prompt.root; <userinput>pkg install xorg</userinput></screen>
251
252
252
    <para>Either of these installations results in the complete
253
    <para>Either of these installations results in the complete
253
      <application>&xorg;</application> system being installed.  This
254
      <application>&xorg;</application> system being installed.  This
254
      is the best option for most users.</para>
255
      is the best option for most users.</para>
255
256
256
    <para>A smaller version of the X system suitable for experienced
257
    <para>A smaller version of the X system suitable for experienced
257
      users is available in <package>x11/xorg-minimal</package>.  Most
258
      users is available in <package>x11/xorg-minimal</package>.  Most
258
      of the documents, libraries, and applications will not be
259
      of the documents, libraries, and applications will not be
259
      installed.  Some applications require these additional
260
      installed.  Some applications require these additional
260
      components to function.</para>
261
      components to function.</para>
261
  </sect1>
262
  </sect1>
262
263
263
  <sect1 xml:id="x-config">
264
  <sect1 xml:id="x-config">
264
    <title><application>&xorg;</application> Configuration</title>
265
    <title><application>&xorg;</application> Configuration</title>
265
266
266
    <info>
267
    <info>
267
      <author>
268
      <author>
268
	<personname>
269
	<personname>
269
	  <firstname>Warren</firstname>
270
	  <firstname>Warren</firstname>
270
	  <surname>Block</surname>
271
	  <surname>Block</surname>
271
	</personname>
272
	</personname>
272
	<contrib>Originally contributed by</contrib>
273
	<contrib>Originally contributed by</contrib>
273
      </author>
274
      </author>
274
    </info>
275
    </info>
275
276
276
    <indexterm><primary>&xorg;</primary></indexterm>
277
    <indexterm><primary>&xorg;</primary></indexterm>
277
    <indexterm><primary><application>&xorg;</application></primary></indexterm>
278
    <indexterm><primary><application>&xorg;</application></primary></indexterm>
278
279
279
    <sect2 xml:id="x-config-quick-start">
280
    <sect2 xml:id="x-config-quick-start">
280
      <title>Quick Start</title>
281
      <title>Quick Start</title>
281
282
282
      <para><application>&xorg;</application> supports most common
283
      <para><application>&xorg;</application> supports most common
283
	video cards, keyboards, and pointing devices.  These devices
284
	video cards, keyboards, and pointing devices.  These devices
284
	are automatically detected and do not require any manual
285
	are automatically detected and do not require any manual
285
	configuration.</para>
286
	configuration.</para>
286
287
287
      <procedure>
288
      <procedure>
288
	<step>
289
	<step>
289
	  <para>If <application>&xorg;</application> has been used on
290
	  <para>If <application>&xorg;</application> has been used on
290
	    this computer before, move or remove any existing
291
	    this computer before, move or remove any existing
291
	    configuration files:</para>
292
	    configuration files:</para>
292
293
293
	  <screen>&prompt.root; <userinput>mv /etc/X11/xorg.conf ~/xorg.conf.etc</userinput>
294
	  <screen>&prompt.root; <userinput>mv /etc/X11/xorg.conf ~/xorg.conf.etc</userinput>
294
&prompt.root; <userinput>mv /usr/local/etc/X11/xorg.conf ~/xorg.conf.localetc</userinput></screen>
295
&prompt.root; <userinput>mv /usr/local/etc/X11/xorg.conf ~/xorg.conf.localetc</userinput></screen>
295
	</step>
296
	</step>
296
297
297
	<step>
298
	<step>
298
	  <para>Add the user who will run
299
	  <para>Add the user who will run
299
	    <application>&xorg;</application> to the
300
	    <application>&xorg;</application> to the
300
	    <literal>video</literal> or
301
	    <literal>video</literal> or
301
	    <literal>wheel</literal> group to enable 3D acceleration
302
	    <literal>wheel</literal> group to enable 3D acceleration
302
	    when available.  To add user
303
	    when available.  To add user
303
	    <replaceable>jru</replaceable> to whichever group is
304
	    <replaceable>jru</replaceable> to whichever group is
304
	    available:</para>
305
	    available:</para>
305
306
306
	  <screen>&prompt.root; <userinput>pw groupmod video -m <replaceable>jru</replaceable> || pw groupmod wheel -m <replaceable>jru</replaceable></userinput></screen>
307
	  <screen>&prompt.root; <userinput>pw groupmod video -m <replaceable>jru</replaceable> || pw groupmod wheel -m <replaceable>jru</replaceable></userinput></screen>
307
	</step>
308
	</step>
308
309
309
	<step>
310
	<step>
310
	  <para>The <acronym>TWM</acronym> window manager is included
311
	  <para>The <acronym>TWM</acronym> window manager is included
311
	    by default.  It is started when
312
	    by default.  It is started when
312
	    <application>&xorg;</application> starts:</para>
313
	    <application>&xorg;</application> starts:</para>
313
314
314
	  <screen>&prompt.user; <userinput>startx</userinput></screen>
315
	  <screen>&prompt.user; <userinput>startx</userinput></screen>
315
	</step>
316
	</step>
316
317
317
	<step>
318
	<step>
318
	  <para>On some older versions of &os;, the system console
319
	  <para>On some older versions of &os;, the system console
319
	    must be set to &man.vt.4; before switching back to the
320
	    must be set to &man.vt.4; before switching back to the
320
	    text console will work properly.  See
321
	    text console will work properly.  See
321
	    <xref linkend="x-config-kms"/>.</para>
322
	    <xref linkend="x-config-kms"/>.</para>
322
	</step>
323
	</step>
323
      </procedure>
324
      </procedure>
324
    </sect2>
325
    </sect2>
325
326
326
    <sect2 xml:id="x-config-user-group">
327
    <sect2 xml:id="x-config-user-group">
327
      <title>User Group for Accelerated Video</title>
328
      <title>User Group for Accelerated Video</title>
328
329
329
      <para>Access to <filename>/dev/dri</filename> is needed to allow
330
      <para>Access to <filename>/dev/dri</filename> is needed to allow
330
	3D acceleration on video cards.  It is usually simplest to add
331
	3D acceleration on video cards.  It is usually simplest to add
331
	the user who will be running X to either the
332
	the user who will be running X to either the
332
	<literal>video</literal> or <literal>wheel</literal> group.
333
	<literal>video</literal> or <literal>wheel</literal> group.
333
	Here, &man.pw.8; is used to add user
334
	Here, &man.pw.8; is used to add user
334
	<replaceable>slurms</replaceable> to the
335
	<replaceable>slurms</replaceable> to the
335
	<literal>video</literal> group, or to the
336
	<literal>video</literal> group, or to the
336
	<literal>wheel</literal> group if there is no
337
	<literal>wheel</literal> group if there is no
337
	<literal>video</literal> group:</para>
338
	<literal>video</literal> group:</para>
338
339
339
      <screen>&prompt.root; <userinput>pw groupmod video -m <replaceable>slurms</replaceable> || pw groupmod wheel -m <replaceable>slurms</replaceable></userinput></screen>
340
      <screen>&prompt.root; <userinput>pw groupmod video -m <replaceable>slurms</replaceable> || pw groupmod wheel -m <replaceable>slurms</replaceable></userinput></screen>
340
    </sect2>
341
    </sect2>
341
342
342
    <sect2 xml:id="x-config-kms">
343
    <sect2 xml:id="x-config-kms">
343
      <title>Kernel Mode Setting (<acronym>KMS</acronym>)</title>
344
      <title>Kernel Mode Setting (<acronym>KMS</acronym>)</title>
344
345
345
      <para>When the computer switches from displaying the console to
346
      <para>When the computer switches from displaying the console to
346
	a higher screen resolution for X, it must set the video
347
	a higher screen resolution for X, it must set the video
347
	output <emphasis>mode</emphasis>.  Recent versions of
348
	output <emphasis>mode</emphasis>.  Recent versions of
348
	<acronym>&xorg;</acronym> use a system inside the kernel to do
349
	<acronym>&xorg;</acronym> use a system inside the kernel to do
349
	these mode changes more efficiently.  Older versions of &os;
350
	these mode changes more efficiently.  Older versions of &os;
350
	use &man.sc.4;, which is not aware of the
351
	use &man.sc.4;, which is not aware of the
351
	<acronym>KMS</acronym> system.  The end result is that after
352
	<acronym>KMS</acronym> system.  The end result is that after
352
	closing X, the system console is blank, even though it is
353
	closing X, the system console is blank, even though it is
353
	still working.  The newer &man.vt.4; console avoids this
354
	still working.  The newer &man.vt.4; console avoids this
354
	problem.</para>
355
	problem.</para>
355
356
356
      <para>Add this line to <filename>/boot/loader.conf</filename>
357
      <para>Add this line to <filename>/boot/loader.conf</filename>
357
	to enable &man.vt.4;:</para>
358
	to enable &man.vt.4;:</para>
358
359
359
      <programlisting>kern.vty=vt</programlisting>
360
      <programlisting>kern.vty=vt</programlisting>
360
    </sect2>
361
    </sect2>
361
362
362
    <sect2 xml:id="x-config-files">
363
    <sect2 xml:id="x-config-files">
363
      <title>Configuration Files</title>
364
      <title>Configuration Files</title>
364
365
365
      <sect3 xml:id="x-config-files-directory">
366
      <sect3 xml:id="x-config-files-directory">
366
	<title>Directory</title>
367
	<title>Directory</title>
367
368
368
	<para><application>&xorg;</application> looks in several
369
	<para><application>&xorg;</application> looks in several
369
	  directories for configuration files.
370
	  directories for configuration files.
370
	  <filename>/usr/local/etc/X11/</filename> is the recommended
371
	  <filename>/usr/local/etc/X11/</filename> is the recommended
371
	  directory for these files on &os;.  Using this directory
372
	  directory for these files on &os;.  Using this directory
372
	  helps keep application files separate from operating system
373
	  helps keep application files separate from operating system
373
	  files.</para>
374
	  files.</para>
374
375
375
	<para>Storing configuration files in the legacy
376
	<para>Storing configuration files in the legacy
376
	  <filename>/etc/X11/</filename> still works.  However, this
377
	  <filename>/etc/X11/</filename> still works.  However, this
377
	  mixes application files with the base &os; files and is not
378
	  mixes application files with the base &os; files and is not
378
	  recommended.</para>
379
	  recommended.</para>
379
      </sect3>
380
      </sect3>
380
381
381
      <sect3 xml:id="x-config-files-single-or-multi">
382
      <sect3 xml:id="x-config-files-single-or-multi">
382
	<title>Single or Multiple Files</title>
383
	<title>Single or Multiple Files</title>
383
384
384
	<para>It is easier to use multiple files that each configure a
385
	<para>It is easier to use multiple files that each configure a
385
	  specific setting than the traditional single
386
	  specific setting than the traditional single
386
	  <filename>xorg.conf</filename>.  These files are stored in
387
	  <filename>xorg.conf</filename>.  These files are stored in
387
	  the <filename>xorg.conf.d/</filename> subdirectory of the
388
	  the <filename>xorg.conf.d/</filename> subdirectory of the
388
	  main configuration file directory.  The full path is
389
	  main configuration file directory.  The full path is
389
	  typically
390
	  typically
390
	  <filename>/usr/local/etc/X11/xorg.conf.d/</filename>.</para>
391
	  <filename>/usr/local/etc/X11/xorg.conf.d/</filename>.</para>
391
392
392
	<para>Examples of these files are shown later in this
393
	<para>Examples of these files are shown later in this
393
	  section.</para>
394
	  section.</para>
394
395
395
	<para>The traditional single <filename>xorg.conf</filename>
396
	<para>The traditional single <filename>xorg.conf</filename>
396
	  still works, but is neither as clear nor as flexible as
397
	  still works, but is neither as clear nor as flexible as
397
	  multiple files in the <filename>xorg.conf.d/</filename>
398
	  multiple files in the <filename>xorg.conf.d/</filename>
398
	  subdirectory.</para>
399
	  subdirectory.</para>
399
      </sect3>
400
      </sect3>
400
    </sect2>
401
    </sect2>
401
402
402
    <sect2 xml:id="x-config-video-cards">
403
    <sect2 xml:id="x-config-video-cards">
403
      <title>Video Cards</title>
404
      <title>Video Cards</title>
404
405
405
      <variablelist>
406
      <variablelist>
406
	<varlistentry xml:id="x-config-video-cards-intel">
407
	<varlistentry xml:id="x-config-video-cards-intel">
407
	  <term>&intel;</term>
408
	  <term>&intel;</term>
408
409
409
	  <listitem>
410
	  <listitem>
410
	    <para>3D acceleration is supported on most &intel;
411
	    <para>3D acceleration is supported on most &intel;
411
	      graphics up to Ivy Bridge (HD Graphics 2500, 4000, and
412
	      graphics up to Ivy Bridge (HD Graphics 2500, 4000, and
412
	      P4000), including Iron Lake (HD Graphics) and
413
	      P4000), including Iron Lake (HD Graphics) and
413
	      Sandy Bridge (HD Graphics 2000).</para>
414
	      Sandy Bridge (HD Graphics 2000).</para>
414
415
415
	    <para>Driver name: <literal>intel</literal></para>
416
	    <para>Driver name: <literal>intel</literal></para>
416
417
417
	    <para>For reference, see <link
418
	    <para>For reference, see <link
418
	        xlink:href="https://en.wikipedia.org/wiki/List_of_Intel_graphics_processing_units"/>.</para>
419
	        xlink:href="https://en.wikipedia.org/wiki/List_of_Intel_graphics_processing_units"/>.</para>
419
	  </listitem>
420
	  </listitem>
420
	</varlistentry>
421
	</varlistentry>
421
422
422
	<varlistentry xml:id="x-config-video-cards-radeon">
423
	<varlistentry xml:id="x-config-video-cards-radeon">
423
	  <term>&amd; Radeon</term>
424
	  <term>&amd; Radeon</term>
424
425
425
	  <listitem>
426
	  <listitem>
426
	    <para>2D and 3D acceleration is supported on Radeon
427
	    <para>2D and 3D acceleration is supported on Radeon
427
	      cards up to and including the HD6000 series.</para>
428
	      cards up to and including the HD6000 series.</para>
428
429
429
	    <para>Driver name: <literal>radeon</literal></para>
430
	    <para>Driver name: <literal>radeon</literal></para>
430
431
431
	    <para>For reference, see <link
432
	    <para>For reference, see <link
432
	        xlink:href="https://en.wikipedia.org/wiki/List_of_AMD_graphics_processing_units"/>.</para>
433
	        xlink:href="https://en.wikipedia.org/wiki/List_of_AMD_graphics_processing_units"/>.</para>
433
	  </listitem>
434
	  </listitem>
434
	</varlistentry>
435
	</varlistentry>
435
436
436
	<varlistentry xml:id="x-config-video-cards-nvidia">
437
	<varlistentry xml:id="x-config-video-cards-nvidia">
437
	  <term>NVIDIA</term>
438
	  <term>NVIDIA</term>
438
439
439
	  <listitem>
440
	  <listitem>
440
	    <para>Several NVIDIA drivers are available in the
441
	    <para>Several NVIDIA drivers are available in the
441
	      <filename>x11</filename> category of the Ports
442
	      <filename>x11</filename> category of the Ports
442
	      Collection.  Install the driver that matches the video
443
	      Collection.  Install the driver that matches the video
443
	      card.</para>
444
	      card.</para>
444
445
445
	    <para>For reference, see <link
446
	    <para>For reference, see <link
446
	      xlink:href="https://en.wikipedia.org/wiki/List_of_Nvidia_graphics_processing_units"/>.</para>
447
	      xlink:href="https://en.wikipedia.org/wiki/List_of_Nvidia_graphics_processing_units"/>.</para>
447
	  </listitem>
448
	  </listitem>
448
	</varlistentry>
449
	</varlistentry>
449
450
450
	<varlistentry xml:id="x-config-video-cards-hybrid">
451
	<varlistentry xml:id="x-config-video-cards-hybrid">
451
	  <term>Hybrid Combination Graphics</term>
452
	  <term>Hybrid Combination Graphics</term>
452
453
453
	  <listitem>
454
	  <listitem>
454
	    <para>Some notebook computers add additional graphics
455
	    <para>Some notebook computers add additional graphics
455
	      processing units to those built into the chipset or
456
	      processing units to those built into the chipset or
456
	      processor.  <emphasis>Optimus</emphasis> combines
457
	      processor.  <emphasis>Optimus</emphasis> combines
457
	      &intel; and NVIDIA hardware.
458
	      &intel; and NVIDIA hardware.
458
	      <emphasis>Switchable Graphics</emphasis> or
459
	      <emphasis>Switchable Graphics</emphasis> or
459
	      <emphasis>Hybrid Graphics</emphasis> are a combination
460
	      <emphasis>Hybrid Graphics</emphasis> are a combination
460
	      of an &intel; or &amd; processor and an &amd; Radeon
461
	      of an &intel; or &amd; processor and an &amd; Radeon
461
	      <acronym>GPU</acronym>.</para>
462
	      <acronym>GPU</acronym>.</para>
462
463
463
	    <para>Implementations of these hybrid graphics systems
464
	    <para>Implementations of these hybrid graphics systems
464
	      vary, and <application>&xorg;</application> on &os; is
465
	      vary, and <application>&xorg;</application> on &os; is
465
	      not able to drive all versions of them.</para>
466
	      not able to drive all versions of them.</para>
466
467
467
	    <para>Some computers provide a <acronym>BIOS</acronym>
468
	    <para>Some computers provide a <acronym>BIOS</acronym>
468
	      option to disable one of the graphics adapters or select
469
	      option to disable one of the graphics adapters or select
469
	      a <emphasis>discrete</emphasis> mode which can be used
470
	      a <emphasis>discrete</emphasis> mode which can be used
470
	      with one of the standard video card drivers.  For
471
	      with one of the standard video card drivers.  For
471
	      example, it is sometimes possible to disable the NVIDIA
472
	      example, it is sometimes possible to disable the NVIDIA
472
	      <acronym>GPU</acronym> in an Optimus system.  The
473
	      <acronym>GPU</acronym> in an Optimus system.  The
473
	      &intel; video can then be used with an &intel;
474
	      &intel; video can then be used with an &intel;
474
	      driver.</para>
475
	      driver.</para>
475
476
476
	    <para><acronym>BIOS</acronym> settings depend on the model
477
	    <para><acronym>BIOS</acronym> settings depend on the model
477
	      of computer.  In some situations, both
478
	      of computer.  In some situations, both
478
	      <acronym>GPU</acronym>s can be left enabled, but
479
	      <acronym>GPU</acronym>s can be left enabled, but
479
	      creating a configuration file that only uses the main
480
	      creating a configuration file that only uses the main
480
	      <acronym>GPU</acronym> in the <literal>Device</literal>
481
	      <acronym>GPU</acronym> in the <literal>Device</literal>
481
	      section is enough to make such a system
482
	      section is enough to make such a system
482
	      functional.</para>
483
	      functional.</para>
483
	  </listitem>
484
	  </listitem>
484
	</varlistentry>
485
	</varlistentry>
485
486
486
	<varlistentry xml:id="x-config-video-cards-other">
487
	<varlistentry xml:id="x-config-video-cards-other">
487
	  <term>Other Video Cards</term>
488
	  <term>Other Video Cards</term>
488
489
489
	  <listitem>
490
	  <listitem>
490
	    <para>Drivers for some less-common video cards can be
491
	    <para>Drivers for some less-common video cards can be
491
	      found in the <filename>x11-drivers</filename> directory
492
	      found in the <filename>x11-drivers</filename> directory
492
	      of the Ports Collection.</para>
493
	      of the Ports Collection.</para>
493
494
494
	    <para>Cards that are not supported by a specific driver
495
	    <para>Cards that are not supported by a specific driver
495
	      might still be usable with the
496
	      might still be usable with the
496
	      <package>x11-drivers/xf86-video-vesa</package> driver.
497
	      <package>x11-drivers/xf86-video-vesa</package> driver.
497
	      This driver is installed by <package>x11/xorg</package>.
498
	      This driver is installed by <package>x11/xorg</package>.
498
	      It can also be installed manually as
499
	      It can also be installed manually as
499
	      <package>x11-drivers/xf86-video-vesa</package>.
500
	      <package>x11-drivers/xf86-video-vesa</package>.
500
	      <application>&xorg;</application> attempts to use this
501
	      <application>&xorg;</application> attempts to use this
501
	      driver when a specific driver is not found for the video
502
	      driver when a specific driver is not found for the video
502
	      card.</para>
503
	      card.</para>
503
504
504
	    <para><package>x11-drivers/xf86-video-scfb</package> is a
505
	    <para><package>x11-drivers/xf86-video-scfb</package> is a
505
	      similar nonspecialized video driver that works on many
506
	      similar nonspecialized video driver that works on many
506
	      <acronym>UEFI</acronym> and &arm; computers.</para>
507
	      <acronym>UEFI</acronym> and &arm; computers.</para>
507
	  </listitem>
508
	  </listitem>
508
	</varlistentry>
509
	</varlistentry>
509
510
510
	<varlistentry xml:id="x-config-video-cards-file">
511
	<varlistentry xml:id="x-config-video-cards-file">
511
	  <term>Setting the Video Driver in a File</term>
512
	  <term>Setting the Video Driver in a File</term>
512
513
513
	  <listitem>
514
	  <listitem>
514
	    <para>To set the &intel; driver in a configuration
515
	    <para>To set the &intel; driver in a configuration
515
	      file:</para>
516
	      file:</para>
516
517
517
	    <example xml:id="x-config-video-cards-file-intel">
518
	    <example xml:id="x-config-video-cards-file-intel">
518
	      <title>Select &intel; Video Driver in a File</title>
519
	      <title>Select &intel; Video Driver in a File</title>
519
520
520
	      <para><filename>/usr/local/etc/X11/xorg.conf.d/driver-intel.conf</filename></para>
521
	      <para><filename>/usr/local/etc/X11/xorg.conf.d/driver-intel.conf</filename></para>
521
522
522
	      <programlisting>Section "Device"
523
	      <programlisting>Section "Device"
523
	Identifier "Card0"
524
	Identifier "Card0"
524
	Driver     "intel"
525
	Driver     "intel"
525
	# BusID    "PCI:1:0:0"
526
	# BusID    "PCI:1:0:0"
526
EndSection</programlisting>
527
EndSection</programlisting>
527
528
528
	      <para>If more than one video card is present, the
529
	      <para>If more than one video card is present, the
529
		<literal>BusID</literal> identifier can be uncommented
530
		<literal>BusID</literal> identifier can be uncommented
530
		and set to select the desired card.  A list of video
531
		and set to select the desired card.  A list of video
531
		card bus <acronym>ID</acronym>s can be displayed with
532
		card bus <acronym>ID</acronym>s can be displayed with
532
		<command>pciconf -lv | grep -B3
533
		<command>pciconf -lv | grep -B3
533
		  display</command>.</para>
534
		  display</command>.</para>
534
	    </example>
535
	    </example>
535
536
536
	    <para>To set the Radeon driver in a configuration
537
	    <para>To set the Radeon driver in a configuration
537
	      file:</para>
538
	      file:</para>
538
539
539
	    <example xml:id="x-config-video-cards-file-radeon">
540
	    <example xml:id="x-config-video-cards-file-radeon">
540
	      <title>Select Radeon Video Driver in a File</title>
541
	      <title>Select Radeon Video Driver in a File</title>
541
542
542
	      <para><filename>/usr/local/etc/X11/xorg.conf.d/driver-radeon.conf</filename></para>
543
	      <para><filename>/usr/local/etc/X11/xorg.conf.d/driver-radeon.conf</filename></para>
543
544
544
	      <programlisting>Section "Device"
545
	      <programlisting>Section "Device"
545
	Identifier "Card0"
546
	Identifier "Card0"
546
	Driver     "radeon"
547
	Driver     "radeon"
547
EndSection</programlisting>
548
EndSection</programlisting>
548
	    </example>
549
	    </example>
549
550
550
	    <para>To set the <acronym>VESA</acronym> driver in a
551
	    <para>To set the <acronym>VESA</acronym> driver in a
551
	      configuration file:</para>
552
	      configuration file:</para>
552
553
553
	    <example xml:id="x-config-video-cards-file-vesa">
554
	    <example xml:id="x-config-video-cards-file-vesa">
554
	      <title>Select <acronym>VESA</acronym> Video Driver in a
555
	      <title>Select <acronym>VESA</acronym> Video Driver in a
555
		File</title>
556
		File</title>
556
557
557
	      <para><filename>/usr/local/etc/X11/xorg.conf.d/driver-vesa.conf</filename></para>
558
	      <para><filename>/usr/local/etc/X11/xorg.conf.d/driver-vesa.conf</filename></para>
558
559
559
	      <programlisting>Section "Device"
560
	      <programlisting>Section "Device"
560
	Identifier "Card0"
561
	Identifier "Card0"
561
	Driver     "vesa"
562
	Driver     "vesa"
562
EndSection</programlisting>
563
EndSection</programlisting>
563
	    </example>
564
	    </example>
564
	  </listitem>
565
	  </listitem>
565
	</varlistentry>
566
	</varlistentry>
566
      </variablelist>
567
      </variablelist>
567
    </sect2>
568
    </sect2>
568
569
569
    <sect2 xml:id="x-config-monitors">
570
    <sect2 xml:id="x-config-monitors">
570
      <title>Monitors</title>
571
      <title>Monitors</title>
571
572
572
      <para>Almost all monitors support the Extended Display
573
      <para>Almost all monitors support the Extended Display
573
	Identification Data standard (<acronym>EDID</acronym>).
574
	Identification Data standard (<acronym>EDID</acronym>).
574
	<application>&xorg;</application> uses <acronym>EDID</acronym>
575
	<application>&xorg;</application> uses <acronym>EDID</acronym>
575
	to communicate with the monitor and detect the supported
576
	to communicate with the monitor and detect the supported
576
	resolutions and refresh rates.  Then it selects the most
577
	resolutions and refresh rates.  Then it selects the most
577
	appropriate combination of settings to use with that
578
	appropriate combination of settings to use with that
578
	monitor.</para>
579
	monitor.</para>
579
580
580
      <para>Other resolutions supported by the monitor can be
581
      <para>Other resolutions supported by the monitor can be
581
	chosen by setting the desired resolution in configuration
582
	chosen by setting the desired resolution in configuration
582
	files, or after the X server has been started with
583
	files, or after the X server has been started with
583
	&man.xrandr.1;.</para>
584
	&man.xrandr.1;.</para>
584
585
585
      <variablelist>
586
      <variablelist>
586
	<varlistentry xml:id="x-config-monitors-xrandr">
587
	<varlistentry xml:id="x-config-monitors-xrandr">
587
	  <term>Using &man.xrandr.1;</term>
588
	  <term>Using &man.xrandr.1;</term>
588
589
589
	  <listitem>
590
	  <listitem>
590
	    <para>Run &man.xrandr.1; without any parameters to see a
591
	    <para>Run &man.xrandr.1; without any parameters to see a
591
	      list of video outputs and detected monitor modes:</para>
592
	      list of video outputs and detected monitor modes:</para>
592
593
593
	    <screen>&prompt.user; <userinput>xrandr</userinput>
594
	    <screen>&prompt.user; <userinput>xrandr</userinput>
594
Screen 0: minimum 320 x 200, current 3000 x 1920, maximum 8192 x 8192
595
Screen 0: minimum 320 x 200, current 3000 x 1920, maximum 8192 x 8192
595
DVI-0 connected primary 1920x1200+1080+0 (normal left inverted right x axis y axis) 495mm x 310mm
596
DVI-0 connected primary 1920x1200+1080+0 (normal left inverted right x axis y axis) 495mm x 310mm
596
   1920x1200     59.95*+
597
   1920x1200     59.95*+
597
   1600x1200     60.00
598
   1600x1200     60.00
598
   1280x1024     85.02    75.02    60.02
599
   1280x1024     85.02    75.02    60.02
599
   1280x960      60.00
600
   1280x960      60.00
600
   1152x864      75.00
601
   1152x864      75.00
601
   1024x768      85.00    75.08    70.07    60.00
602
   1024x768      85.00    75.08    70.07    60.00
602
   832x624       74.55
603
   832x624       74.55
603
   800x600       75.00    60.32
604
   800x600       75.00    60.32
604
   640x480       75.00    60.00
605
   640x480       75.00    60.00
605
   720x400       70.08
606
   720x400       70.08
606
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
607
DisplayPort-0 disconnected (normal left inverted right x axis y axis)
607
HDMI-0 disconnected (normal left inverted right x axis y axis)</screen>
608
HDMI-0 disconnected (normal left inverted right x axis y axis)</screen>
608
609
609
	    <para>This shows that the <literal>DVI-0</literal> output
610
	    <para>This shows that the <literal>DVI-0</literal> output
610
	      is being used to display a screen resolution of
611
	      is being used to display a screen resolution of
611
	      1920x1200 pixels at a refresh rate of about 60 Hz.
612
	      1920x1200 pixels at a refresh rate of about 60 Hz.
612
	      Monitors are not attached to the
613
	      Monitors are not attached to the
613
	      <literal>DisplayPort-0</literal> and
614
	      <literal>DisplayPort-0</literal> and
614
	      <literal>HDMI-0</literal> connectors.</para>
615
	      <literal>HDMI-0</literal> connectors.</para>
615
616
616
	    <para>Any of the other display modes can be selected with
617
	    <para>Any of the other display modes can be selected with
617
	      &man.xrandr.1;.  For example, to switch to 1280x1024 at
618
	      &man.xrandr.1;.  For example, to switch to 1280x1024 at
618
	      60 Hz:</para>
619
	      60 Hz:</para>
619
620
620
	    <screen>&prompt.user; <userinput>xrandr --mode 1280x1024 --rate 60</userinput></screen>
621
	    <screen>&prompt.user; <userinput>xrandr --mode 1280x1024 --rate 60</userinput></screen>
621
622
622
	    <para>A common task is using the external video output on
623
	    <para>A common task is using the external video output on
623
	      a notebook computer for a video projector.</para>
624
	      a notebook computer for a video projector.</para>
624
625
625
	    <para>Names and types of video connectors vary, so
626
	    <para>Names and types of video connectors vary, so
626
	      &man.xrandr.1; is run without options to list the
627
	      &man.xrandr.1; is run without options to list the
627
	      outputs:</para>
628
	      outputs:</para>
628
629
629
	    <screen>&prompt.user; <userinput>xrandr</userinput>
630
	    <screen>&prompt.user; <userinput>xrandr</userinput>
630
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
631
Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192
631
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
632
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 193mm
632
   1366x768      60.04*+
633
   1366x768      60.04*+
633
   1024x768      60.00
634
   1024x768      60.00
634
   800x600       60.32    56.25
635
   800x600       60.32    56.25
635
   640x480       59.94
636
   640x480       59.94
636
VGA1 connected (normal left inverted right x axis y axis)
637
VGA1 connected (normal left inverted right x axis y axis)
637
   1280x1024     60.02 +  75.02
638
   1280x1024     60.02 +  75.02
638
   1280x960      60.00
639
   1280x960      60.00
639
   1152x864      75.00
640
   1152x864      75.00
640
   1024x768      75.08    70.07    60.00
641
   1024x768      75.08    70.07    60.00
641
   832x624       74.55
642
   832x624       74.55
642
   800x600       72.19    75.00    60.32    56.25
643
   800x600       72.19    75.00    60.32    56.25
643
   640x480       75.00    72.81    66.67    60.00
644
   640x480       75.00    72.81    66.67    60.00
644
   720x400       70.08
645
   720x400       70.08
645
HDMI1 disconnected (normal left inverted right x axis y axis)
646
HDMI1 disconnected (normal left inverted right x axis y axis)
646
DP1 disconnected (normal left inverted right x axis y axis)</screen>
647
DP1 disconnected (normal left inverted right x axis y axis)</screen>
647
648
648
	    <para>Four outputs were found: the built-in panel
649
	    <para>Four outputs were found: the built-in panel
649
	      <literal>LVDS1</literal>, and external
650
	      <literal>LVDS1</literal>, and external
650
	      <literal>VGA1</literal>, <literal>HDMI1</literal>, and
651
	      <literal>VGA1</literal>, <literal>HDMI1</literal>, and
651
	      <literal>DP1</literal> connectors.</para>
652
	      <literal>DP1</literal> connectors.</para>
652
653
653
	    <para>The projector has been connected to the
654
	    <para>The projector has been connected to the
654
	      <literal>VGA1</literal> output.  &man.xrandr.1; is now
655
	      <literal>VGA1</literal> output.  &man.xrandr.1; is now
655
	      used to set that output to the native resolution of the
656
	      used to set that output to the native resolution of the
656
	      projector and add the additional space to the right side
657
	      projector and add the additional space to the right side
657
	      of the desktop:</para>
658
	      of the desktop:</para>
658
659
659
	    <screen>&prompt.user; <userinput>xrandr --output VGA1 --auto --right-of LVDS1</userinput></screen>
660
	    <screen>&prompt.user; <userinput>xrandr --output VGA1 --auto --right-of LVDS1</userinput></screen>
660
661
661
	    <para><literal>--auto</literal> chooses the resolution and
662
	    <para><literal>--auto</literal> chooses the resolution and
662
	      refresh rate detected by <acronym>EDID</acronym>.  If
663
	      refresh rate detected by <acronym>EDID</acronym>.  If
663
	      the resolution is not correctly detected, a fixed value
664
	      the resolution is not correctly detected, a fixed value
664
	      can be given with <literal>--mode</literal> instead of
665
	      can be given with <literal>--mode</literal> instead of
665
	      the <literal>--auto</literal> statement.  For example,
666
	      the <literal>--auto</literal> statement.  For example,
666
	      most projectors can be used with a 1024x768 resolution,
667
	      most projectors can be used with a 1024x768 resolution,
667
	      which is set with
668
	      which is set with
668
	      <literal>--mode 1024x768</literal>.</para>
669
	      <literal>--mode 1024x768</literal>.</para>
669
670
670
	    <para>&man.xrandr.1; is often run from
671
	    <para>&man.xrandr.1; is often run from
671
	      <filename>.xinitrc</filename> to set the appropriate
672
	      <filename>.xinitrc</filename> to set the appropriate
672
	      mode when X starts.</para>
673
	      mode when X starts.</para>
673
	  </listitem>
674
	  </listitem>
674
	</varlistentry>
675
	</varlistentry>
675
676
676
	<varlistentry xml:id="x-config-monitors-files">
677
	<varlistentry xml:id="x-config-monitors-files">
677
	  <term>Setting Monitor Resolution in a File</term>
678
	  <term>Setting Monitor Resolution in a File</term>
678
679
679
	  <listitem>
680
	  <listitem>
680
	    <para>To set a screen resolution of 1024x768 in a
681
	    <para>To set a screen resolution of 1024x768 in a
681
	      configuration file:</para>
682
	      configuration file:</para>
682
683
683
	    <example>
684
	    <example>
684
	      <title>Set Screen Resolution in a File</title>
685
	      <title>Set Screen Resolution in a File</title>
685
686
686
	      <para><filename>/usr/local/etc/X11/xorg.conf.d/screen-resolution.conf</filename></para>
687
	      <para><filename>/usr/local/etc/X11/xorg.conf.d/screen-resolution.conf</filename></para>
687
688
688
	      <programlisting>Section "Screen"
689
	      <programlisting>Section "Screen"
689
	Identifier "Screen0"
690
	Identifier "Screen0"
690
	Device     "Card0"
691
	Device     "Card0"
691
	SubSection "Display"
692
	SubSection "Display"
692
	Modes      "1024x768"
693
	Modes      "1024x768"
693
	EndSubSection
694
	EndSubSection
694
EndSection</programlisting>
695
EndSection</programlisting>
695
	    </example>
696
	    </example>
696
697
697
	    <para>The few monitors that do not have
698
	    <para>The few monitors that do not have
698
	      <acronym>EDID</acronym> can be configured by setting
699
	      <acronym>EDID</acronym> can be configured by setting
699
	      <literal>HorizSync</literal> and
700
	      <literal>HorizSync</literal> and
700
	      <literal>VertRefresh</literal> to the range of
701
	      <literal>VertRefresh</literal> to the range of
701
	      frequencies supported by the monitor.</para>
702
	      frequencies supported by the monitor.</para>
702
703
703
	    <example>
704
	    <example>
704
	      <title>Manually Setting Monitor Frequencies</title>
705
	      <title>Manually Setting Monitor Frequencies</title>
705
706
706
	      <para><filename>/usr/local/etc/X11/xorg.conf.d/monitor0-freq.conf</filename></para>
707
	      <para><filename>/usr/local/etc/X11/xorg.conf.d/monitor0-freq.conf</filename></para>
707
708
708
	      <programlisting>Section "Monitor"
709
	      <programlisting>Section "Monitor"
709
	Identifier   "Monitor0"
710
	Identifier   "Monitor0"
710
	HorizSync    30-83   # kHz
711
	HorizSync    30-83   # kHz
711
	VertRefresh  50-76   # Hz
712
	VertRefresh  50-76   # Hz
712
EndSection</programlisting>
713
EndSection</programlisting>
713
	    </example>
714
	    </example>
714
	  </listitem>
715
	  </listitem>
715
	</varlistentry>
716
	</varlistentry>
716
      </variablelist>
717
      </variablelist>
717
    </sect2>
718
    </sect2>
718
719
719
    <sect2 xml:id="x-config-input">
720
    <sect2 xml:id="x-config-input">
720
      <title>Input Devices</title>
721
      <title>Input Devices</title>
721
722
722
      <sect3 xml:id="x-config-input-keyboard">
723
      <sect3 xml:id="x-config-input-keyboard">
723
	<title>Keyboards</title>
724
	<title>Keyboards</title>
724
725
725
	<variablelist>
726
	<variablelist>
726
	  <varlistentry xml:id="x-config-input-keyboard-layout">
727
	  <varlistentry xml:id="x-config-input-keyboard-layout">
727
	    <term>Keyboard Layout</term>
728
	    <term>Keyboard Layout</term>
728
729
729
	    <listitem>
730
	    <listitem>
730
	      <para>The standardized location of keys on a keyboard
731
	      <para>The standardized location of keys on a keyboard
731
		is called a <emphasis>layout</emphasis>.  Layouts and
732
		is called a <emphasis>layout</emphasis>.  Layouts and
732
		other adjustable parameters are listed in
733
		other adjustable parameters are listed in
733
		&man.xkeyboard-config.7;.</para>
734
		&man.xkeyboard-config.7;.</para>
734
735
735
	      <para>A United States layout is the default.  To select
736
	      <para>A United States layout is the default.  To select
736
		an alternate layout, set the
737
		an alternate layout, set the
737
		<literal>XkbLayout</literal> and
738
		<literal>XkbLayout</literal> and
738
		<literal>XkbVariant</literal> options in an
739
		<literal>XkbVariant</literal> options in an
739
		<literal>InputClass</literal>.  This will be applied
740
		<literal>InputClass</literal>.  This will be applied
740
		to all input devices that match the class.</para>
741
		to all input devices that match the class.</para>
741
742
742
	      <para>This example selects a French keyboard layout with
743
	      <para>This example selects a French keyboard layout with
743
		the <literal>oss</literal> variant.</para>
744
		the <literal>oss</literal> variant.</para>
744
745
745
	      <example>
746
	      <example>
746
		<title>Setting a Keyboard Layout</title>
747
		<title>Setting a Keyboard Layout</title>
747
748
748
		<para><filename>/usr/local/etc/X11/xorg.conf.d/keyboard-fr-oss.conf</filename></para>
749
		<para><filename>/usr/local/etc/X11/xorg.conf.d/keyboard-fr-oss.conf</filename></para>
749
750
750
		<programlisting>Section	"InputClass"
751
		<programlisting>Section	"InputClass"
751
	Identifier	"KeyboardDefaults"
752
	Identifier	"KeyboardDefaults"
752
	Driver		"keyboard"
753
	Driver		"keyboard"
753
	MatchIsKeyboard	"on"
754
	MatchIsKeyboard	"on"
754
	Option		"XkbLayout" "fr"
755
	Option		"XkbLayout" "fr"
755
	Option		"XkbVariant" "oss"
756
	Option		"XkbVariant" "oss"
756
EndSection</programlisting>
757
EndSection</programlisting>
757
	      </example>
758
	      </example>
758
759
759
	      <example>
760
	      <example>
760
		<title>Setting Multiple Keyboard Layouts</title>
761
		<title>Setting Multiple Keyboard Layouts</title>
761
762
762
		<para>Set United States, Spanish, and Ukrainian
763
		<para>Set United States, Spanish, and Ukrainian
763
		  keyboard layouts.  Cycle through these layouts by
764
		  keyboard layouts.  Cycle through these layouts by
764
		  pressing
765
		  pressing
765
		  <keycombo action="simul">
766
		  <keycombo action="simul">
766
		    <keycap>Alt</keycap>
767
		    <keycap>Alt</keycap>
767
		    <keycap>Shift</keycap>
768
		    <keycap>Shift</keycap>
768
		  </keycombo>.  <package>x11/xxkb</package> or
769
		  </keycombo>.  <package>x11/xxkb</package> or
769
		  <package>x11/sbxkb</package> can be used for
770
		  <package>x11/sbxkb</package> can be used for
770
		  improved layout switching control and
771
		  improved layout switching control and
771
		  current layout indicators.</para>
772
		  current layout indicators.</para>
772
773
773
		<para><filename>/usr/local/etc/X11/xorg.conf.d/kbd-layout-multi.conf</filename></para>
774
		<para><filename>/usr/local/etc/X11/xorg.conf.d/kbd-layout-multi.conf</filename></para>
774
775
775
		<programlisting>Section	"InputClass"
776
		<programlisting>Section	"InputClass"
776
	Identifier	"All Keyboards"
777
	Identifier	"All Keyboards"
777
	MatchIsKeyboard	"yes"
778
	MatchIsKeyboard	"yes"
778
	Option		"XkbLayout" "us, es, ua"
779
	Option		"XkbLayout" "us, es, ua"
779
EndSection</programlisting>
780
EndSection</programlisting>
780
	      </example>
781
	      </example>
781
	    </listitem>
782
	    </listitem>
782
	  </varlistentry>
783
	  </varlistentry>
783
784
784
	  <varlistentry xml:id="x-config-input-keyboard-zap">
785
	  <varlistentry xml:id="x-config-input-keyboard-zap">
785
	    <term>Closing <application>&xorg;</application> From the
786
	    <term>Closing <application>&xorg;</application> From the
786
	    Keyboard</term>
787
	    Keyboard</term>
787
788
788
	    <listitem>
789
	    <listitem>
789
	      <para>X can be closed with a combination of keys.
790
	      <para>X can be closed with a combination of keys.
790
		By default, that key combination is not set because it
791
		By default, that key combination is not set because it
791
		conflicts with keyboard commands for some
792
		conflicts with keyboard commands for some
792
		applications.  Enabling this option requires changes
793
		applications.  Enabling this option requires changes
793
		to the keyboard <literal>InputDevice</literal>
794
		to the keyboard <literal>InputDevice</literal>
794
		section:</para>
795
		section:</para>
795
796
796
	      <example>
797
	      <example>
797
		<title>Enabling Keyboard Exit from X</title>
798
		<title>Enabling Keyboard Exit from X</title>
798
799
799
		<para><filename>/usr/local/etc/X11/xorg.conf.d/keyboard-zap.conf</filename></para>
800
		<para><filename>/usr/local/etc/X11/xorg.conf.d/keyboard-zap.conf</filename></para>
800
801
801
		<programlisting>Section	"InputClass"
802
		<programlisting>Section	"InputClass"
802
	Identifier	"KeyboardDefaults"
803
	Identifier	"KeyboardDefaults"
803
	Driver		"keyboard"
804
	Driver		"keyboard"
804
	MatchIsKeyboard	"on"
805
	MatchIsKeyboard	"on"
805
	Option		"XkbOptions" "terminate:ctrl_alt_bksp"
806
	Option		"XkbOptions" "terminate:ctrl_alt_bksp"
806
EndSection</programlisting>
807
EndSection</programlisting>
807
	      </example>
808
	      </example>
808
	    </listitem>
809
	    </listitem>
809
	  </varlistentry>
810
	  </varlistentry>
810
	</variablelist>
811
	</variablelist>
811
      </sect3>
812
      </sect3>
812
813
813
      <sect3 xml:id="x11-input-mice">
814
      <sect3 xml:id="x11-input-mice">
814
	<title>Mice and Pointing Devices</title>
815
	<title>Mice and Pointing Devices</title>
815
816
816
	<para>Many mouse parameters can be adjusted with configuration
817
	<para>Many mouse parameters can be adjusted with configuration
817
	  options.  See &man.mousedrv.4x; for a full list.</para>
818
	  options.  See &man.mousedrv.4x; for a full list.</para>
818
819
819
	<variablelist>
820
	<variablelist>
820
	  <varlistentry xml:id="x11-input-mice-buttons">
821
	  <varlistentry xml:id="x11-input-mice-buttons">
821
	    <term>Mouse Buttons</term>
822
	    <term>Mouse Buttons</term>
822
823
823
	    <listitem>
824
	    <listitem>
824
	      <para>The number of buttons on a mouse can be set in the
825
	      <para>The number of buttons on a mouse can be set in the
825
		mouse <literal>InputDevice</literal> section of
826
		mouse <literal>InputDevice</literal> section of
826
		<filename>xorg.conf</filename>.  To set the number of
827
		<filename>xorg.conf</filename>.  To set the number of
827
		buttons to 7:</para>
828
		buttons to 7:</para>
828
829
829
	      <example>
830
	      <example>
830
		<title>Setting the Number of Mouse Buttons</title>
831
		<title>Setting the Number of Mouse Buttons</title>
831
832
832
		<para><filename>/usr/local/etc/X11/xorg.conf.d/mouse0-buttons.conf</filename></para>
833
		<para><filename>/usr/local/etc/X11/xorg.conf.d/mouse0-buttons.conf</filename></para>
833
834
834
		<programlisting>Section "InputDevice"
835
		<programlisting>Section "InputDevice"
835
	Identifier  "Mouse0"
836
	Identifier  "Mouse0"
836
	Option      "Buttons" "7"
837
	Option      "Buttons" "7"
837
EndSection</programlisting>
838
EndSection</programlisting>
838
	      </example>
839
	      </example>
839
	    </listitem>
840
	    </listitem>
840
	  </varlistentry>
841
	  </varlistentry>
841
	</variablelist>
842
	</variablelist>
842
      </sect3>
843
      </sect3>
843
    </sect2>
844
    </sect2>
844
845
845
    <sect2 xml:id="x-config-manual-configuration">
846
    <sect2 xml:id="x-config-manual-configuration">
846
      <title>Manual Configuration</title>
847
      <title>Manual Configuration</title>
847
848
848
      <para>In some cases, <application>&xorg;</application>
849
      <para>In some cases, <application>&xorg;</application>
849
	autoconfiguration does not work with particular hardware, or a
850
	autoconfiguration does not work with particular hardware, or a
850
	different configuration is desired.  For these cases, a custom
851
	different configuration is desired.  For these cases, a custom
851
	configuration file can be created.</para>
852
	configuration file can be created.</para>
852
853
853
      <para>A configuration file can be generated by
854
      <para>A configuration file can be generated by
854
	<application>&xorg;</application> based on the detected
855
	<application>&xorg;</application> based on the detected
855
	hardware.  This file is often a useful starting point for
856
	hardware.  This file is often a useful starting point for
856
	custom configurations.</para>
857
	custom configurations.</para>
857
858
858
      <para>Generating an <filename>xorg.conf</filename>:</para>
859
      <para>Generating an <filename>xorg.conf</filename>:</para>
859
860
860
      <screen>&prompt.root; <userinput>Xorg -configure</userinput></screen>
861
      <screen>&prompt.root; <userinput>Xorg -configure</userinput></screen>
861
862
862
      <para>The configuration file is saved to
863
      <para>The configuration file is saved to
863
	<filename>/root/xorg.conf.new</filename>.  Make any changes
864
	<filename>/root/xorg.conf.new</filename>.  Make any changes
864
	desired, then test that file with:</para>
865
	desired, then test that file with:</para>
865
866
866
      <screen>&prompt.root; <userinput>Xorg -config /root/xorg.conf.new</userinput></screen>
867
      <screen>&prompt.root; <userinput>Xorg -config /root/xorg.conf.new</userinput></screen>
867
868
868
      <para>After the new configuration has been adjusted and tested,
869
      <para>After the new configuration has been adjusted and tested,
869
	it can be split into smaller files in the normal location,
870
	it can be split into smaller files in the normal location,
870
	<filename>/usr/local/etc/X11/xorg.conf.d/</filename>.</para>
871
	<filename>/usr/local/etc/X11/xorg.conf.d/</filename>.</para>
871
    </sect2>
872
    </sect2>
872
  </sect1>
873
  </sect1>
873
874
874
  <sect1 xml:id="x-fonts">
875
  <sect1 xml:id="x-fonts">
875
    <!--
876
    <!--
876
    <sect1info>
877
    <sect1info>
877
      <authorgroup>
878
      <authorgroup>
878
	<author>
879
	<author>
879
	  <firstname>Murray</firstname>
880
	  <firstname>Murray</firstname>
880
	  <surname>Stokely</surname>
881
	  <surname>Stokely</surname>
881
	  <contrib>Contributed by </contrib>
882
	  <contrib>Contributed by </contrib>
882
	</author>
883
	</author>
883
      </authorgroup>
884
      </authorgroup>
884
    </sect1info>
885
    </sect1info>
885
    -->
886
    -->
886
    <title>Using Fonts in <application>&xorg;</application></title>
887
    <title>Using Fonts in <application>&xorg;</application></title>
887
888
888
    <sect2 xml:id="type1">
889
    <sect2 xml:id="type1">
889
      <title>Type1 Fonts</title>
890
      <title>Type1 Fonts</title>
890
891
891
      <para>The default fonts that ship with
892
      <para>The default fonts that ship with
892
	<application>&xorg;</application> are less than ideal for
893
	<application>&xorg;</application> are less than ideal for
893
	typical desktop publishing applications.  Large presentation
894
	typical desktop publishing applications.  Large presentation
894
	fonts show up jagged and unprofessional looking, and small
895
	fonts show up jagged and unprofessional looking, and small
895
	fonts are almost completely unintelligible.  However, there
896
	fonts are almost completely unintelligible.  However, there
896
	are several free, high quality Type1 (&postscript;) fonts
897
	are several free, high quality Type1 (&postscript;) fonts
897
	available which can be readily used with
898
	available which can be readily used with
898
	<application>&xorg;</application>.  For instance, the URW font
899
	<application>&xorg;</application>.  For instance, the URW font
899
	collection (<package>x11-fonts/urwfonts</package>) includes
900
	collection (<package>x11-fonts/urwfonts</package>) includes
900
	high quality versions of standard type1 fonts (<trademark
901
	high quality versions of standard type1 fonts (<trademark
901
	  class="registered">Times Roman</trademark>, <trademark
902
	  class="registered">Times Roman</trademark>, <trademark
902
	  class="registered">Helvetica</trademark>, <trademark
903
	  class="registered">Helvetica</trademark>, <trademark
903
	  class="registered">Palatino</trademark> and others).  The
904
	  class="registered">Palatino</trademark> and others).  The
904
	Freefonts collection (<package>x11-fonts/freefonts</package>)
905
	Freefonts collection (<package>x11-fonts/freefonts</package>)
905
	includes many more fonts, but most of them are intended for
906
	includes many more fonts, but most of them are intended for
906
	use in graphics software such as the
907
	use in graphics software such as the
907
	<application>Gimp</application>, and are not complete enough
908
	<application>Gimp</application>, and are not complete enough
908
	to serve as screen fonts.  In addition,
909
	to serve as screen fonts.  In addition,
909
	<application>&xorg;</application> can be configured to use
910
	<application>&xorg;</application> can be configured to use
910
	&truetype; fonts with a minimum of effort.  For more details
911
	&truetype; fonts with a minimum of effort.  For more details
911
	on this, see the &man.X.7; manual page or <xref
912
	on this, see the &man.X.7; manual page or <xref
912
	  linkend="truetype"/>.</para>
913
	  linkend="truetype"/>.</para>
913
914
914
      <para>To install the above Type1 font collections from the Ports
915
      <para>To install the above Type1 font collections from the Ports
915
	Collection, run the following commands:</para>
916
	Collection, run the following commands:</para>
916
917
917
      <screen>&prompt.root; <userinput>cd /usr/ports/x11-fonts/urwfonts</userinput>
918
      <screen>&prompt.root; <userinput>cd /usr/ports/x11-fonts/urwfonts</userinput>
918
&prompt.root; <userinput>make install clean</userinput></screen>
919
&prompt.root; <userinput>make install clean</userinput></screen>
919
920
920
      <para>And likewise with the freefont or other collections.  To
921
      <para>And likewise with the freefont or other collections.  To
921
	have the X server detect these fonts, add an appropriate line
922
	have the X server detect these fonts, add an appropriate line
922
	to the X server configuration file
923
	to the X server configuration file
923
	(<filename>/etc/X11/xorg.conf</filename>), which reads:</para>
924
	(<filename>/etc/X11/xorg.conf</filename>), which reads:</para>
924
925
925
      <programlisting>FontPath "/usr/local/share/fonts/urwfonts/"</programlisting>
926
      <programlisting>FontPath "/usr/local/share/fonts/urwfonts/"</programlisting>
926
927
927
      <para>Alternatively, at the command line in the X session
928
      <para>Alternatively, at the command line in the X session
928
	run:</para>
929
	run:</para>
929
930
930
      <screen>&prompt.user; <userinput>xset fp+ /usr/local/share/fonts/urwfonts</userinput>
931
      <screen>&prompt.user; <userinput>xset fp+ /usr/local/share/fonts/urwfonts</userinput>
931
&prompt.user; <userinput>xset fp rehash</userinput></screen>
932
&prompt.user; <userinput>xset fp rehash</userinput></screen>
932
933
933
      <para>This will work but will be lost when the X session is
934
      <para>This will work but will be lost when the X session is
934
	closed, unless it is added to the startup file
935
	closed, unless it is added to the startup file
935
	(<filename>~/.xinitrc</filename> for a normal
936
	(<filename>~/.xinitrc</filename> for a normal
936
	<command>startx</command> session, or
937
	<command>startx</command> session, or
937
	<filename>~/.xsession</filename> when logging in through a
938
	<filename>~/.xsession</filename> when logging in through a
938
	graphical login manager like <application>XDM</application>).
939
	graphical login manager like <application>XDM</application>).
939
	A third way is to use the new
940
	A third way is to use the new
940
	<filename>/usr/local/etc/fonts/local.conf</filename> as
941
	<filename>/usr/local/etc/fonts/local.conf</filename> as
941
	demonstrated in <xref linkend="antialias"/>.</para>
942
	demonstrated in <xref linkend="antialias"/>.</para>
942
    </sect2>
943
    </sect2>
943
944
944
    <sect2 xml:id="truetype">
945
    <sect2 xml:id="truetype">
945
      <title>&truetype; Fonts</title>
946
      <title>&truetype; Fonts</title>
946
947
947
      <indexterm>
948
      <indexterm>
948
	<primary>TrueType Fonts</primary>
949
	<primary>TrueType Fonts</primary>
949
      </indexterm>
950
      </indexterm>
950
      <indexterm>
951
      <indexterm>
951
	<primary>fonts</primary>
952
	<primary>fonts</primary>
952
	<secondary>TrueType</secondary>
953
	<secondary>TrueType</secondary>
953
      </indexterm>
954
      </indexterm>
954
955
955
      <para><application>&xorg;</application> has built in support for
956
      <para><application>&xorg;</application> has built in support for
956
	rendering &truetype; fonts.  There are two different modules
957
	rendering &truetype; fonts.  There are two different modules
957
	that can enable this functionality.  The freetype module is
958
	that can enable this functionality.  The freetype module is
958
	used in this example because it is more consistent with the
959
	used in this example because it is more consistent with the
959
	other font rendering back-ends.  To enable the freetype module
960
	other font rendering back-ends.  To enable the freetype module
960
	just add the following line to the <literal>"Module"</literal>
961
	just add the following line to the <literal>"Module"</literal>
961
	section of <filename>/etc/X11/xorg.conf</filename>.</para>
962
	section of <filename>/etc/X11/xorg.conf</filename>.</para>
962
963
963
      <programlisting>Load  "freetype"</programlisting>
964
      <programlisting>Load  "freetype"</programlisting>
964
965
965
      <para>Now make a directory for the &truetype; fonts (for
966
      <para>Now make a directory for the &truetype; fonts (for
966
	example,
967
	example,
967
	<filename>/usr/local/share/fonts/TrueType</filename>) and
968
	<filename>/usr/local/share/fonts/TrueType</filename>) and
968
	copy all of the &truetype; fonts into this directory.  Keep in
969
	copy all of the &truetype; fonts into this directory.  Keep in
969
	mind that &truetype; fonts cannot be directly taken from an
970
	mind that &truetype; fonts cannot be directly taken from an
970
	&apple; &mac;; they must be in &unix;/&ms-dos;/&windows;
971
	&apple; &mac;; they must be in &unix;/&ms-dos;/&windows;
971
	format for use by <application>&xorg;</application>.  Once the
972
	format for use by <application>&xorg;</application>.  Once the
972
	files have been copied into this directory, use
973
	files have been copied into this directory, use
973
	<application>mkfontdir</application> to create a
974
	<application>mkfontdir</application> to create a
974
	<filename>fonts.dir</filename>, so that the X font renderer
975
	<filename>fonts.dir</filename>, so that the X font renderer
975
	knows that these new files have been installed.
976
	knows that these new files have been installed.
976
	<command>mkfontdir</command> can be installed as a package:</para>
977
	<command>mkfontdir</command> can be installed as a package:</para>
977
978
978
      <screen>&prompt.root; <userinput>pkg install mkfontdir</userinput></screen>
979
      <screen>&prompt.root; <userinput>pkg install mkfontdir</userinput></screen>
979
980
980
      <para>Then create an index of X font files in a directory:</para>
981
      <para>Then create an index of X font files in a directory:</para>
981
982
982
      <screen>&prompt.root; <userinput>cd /usr/local/share/fonts/TrueType</userinput>
983
      <screen>&prompt.root; <userinput>cd /usr/local/share/fonts/TrueType</userinput>
983
&prompt.root; <userinput>mkfontdir</userinput></screen>
984
&prompt.root; <userinput>mkfontdir</userinput></screen>
984
985
985
      <para>Now add the &truetype; directory to the font path.  This
986
      <para>Now add the &truetype; directory to the font path.  This
986
	is just the same as described in <xref
987
	is just the same as described in <xref
987
	  linkend="type1"/>:</para>
988
	  linkend="type1"/>:</para>
988
989
989
      <screen>&prompt.user; <userinput>xset fp+ /usr/local/share/fonts/TrueType</userinput>
990
      <screen>&prompt.user; <userinput>xset fp+ /usr/local/share/fonts/TrueType</userinput>
990
&prompt.user; <userinput>xset fp rehash</userinput></screen>
991
&prompt.user; <userinput>xset fp rehash</userinput></screen>
991
992
992
      <para>or add a <literal>FontPath</literal> line to
993
      <para>or add a <literal>FontPath</literal> line to
993
	<filename>xorg.conf</filename>.</para>
994
	<filename>xorg.conf</filename>.</para>
994
995
995
      <para>Now <application>Gimp</application>,
996
      <para>Now <application>Gimp</application>,
996
	<application>OpenOffice</application>, and all of the other X
997
	<application>OpenOffice</application>, and all of the other X
997
	applications should now recognize the installed &truetype;
998
	applications should now recognize the installed &truetype;
998
	fonts.  Extremely small fonts (as with text in a high
999
	fonts.  Extremely small fonts (as with text in a high
999
	resolution display on a web page) and extremely large fonts
1000
	resolution display on a web page) and extremely large fonts
1000
	(within <application>&staroffice;</application>) will look
1001
	(within <application>&staroffice;</application>) will look
1001
	much better now.</para>
1002
	much better now.</para>
1002
    </sect2>
1003
    </sect2>
1003
1004
1004
    <sect2 xml:id="antialias">
1005
    <sect2 xml:id="antialias">
1005
      <!--
1006
      <!--
1006
      <sect2info>
1007
      <sect2info>
1007
	<authorgroup>
1008
	<authorgroup>
1008
	  <author>
1009
	  <author>
1009
	    <firstname>Joe Marcus</firstname>
1010
	    <firstname>Joe Marcus</firstname>
1010
	    <surname>Clarke</surname>
1011
	    <surname>Clarke</surname>
1011
	    <contrib>Updated in May 2003 by</contrib>
1012
	    <contrib>Updated in May 2003 by</contrib>
1012
	  </author>
1013
	  </author>
1013
	</authorgroup>
1014
	</authorgroup>
1014
      </sect2info>
1015
      </sect2info>
1015
      -->
1016
      -->
1016
      <title>Anti-Aliased Fonts</title>
1017
      <title>Anti-Aliased Fonts</title>
1017
1018
1018
      <indexterm>
1019
      <indexterm>
1019
	<primary>anti-aliased fonts</primary>
1020
	<primary>anti-aliased fonts</primary>
1020
      </indexterm>
1021
      </indexterm>
1021
      <indexterm>
1022
      <indexterm>
1022
	<primary>fonts</primary>
1023
	<primary>fonts</primary>
1023
	<secondary>anti-aliased</secondary>
1024
	<secondary>anti-aliased</secondary>
1024
      </indexterm>
1025
      </indexterm>
1025
1026
1026
      <para>All fonts in <application>&xorg;</application> that are
1027
      <para>All fonts in <application>&xorg;</application> that are
1027
	found in <filename>/usr/local/share/fonts/</filename> and
1028
	found in <filename>/usr/local/share/fonts/</filename> and
1028
	<filename>~/.fonts/</filename> are automatically made
1029
	<filename>~/.fonts/</filename> are automatically made
1029
	available for anti-aliasing to Xft-aware applications.  Most
1030
	available for anti-aliasing to Xft-aware applications.  Most
1030
	recent applications are Xft-aware, including
1031
	recent applications are Xft-aware, including
1031
	<application>KDE</application>,
1032
	<application>KDE</application>,
1032
	<application>GNOME</application>, and
1033
	<application>GNOME</application>, and
1033
	<application>Firefox</application>.</para>
1034
	<application>Firefox</application>.</para>
1034
1035
1035
      <para>In order to control which fonts are anti-aliased, or to
1036
      <para>In order to control which fonts are anti-aliased, or to
1036
	configure anti-aliasing properties, create (or edit, if it
1037
	configure anti-aliasing properties, create (or edit, if it
1037
	already exists) the file
1038
	already exists) the file
1038
	<filename>/usr/local/etc/fonts/local.conf</filename>.  Several
1039
	<filename>/usr/local/etc/fonts/local.conf</filename>.  Several
1039
	advanced features of the Xft font system can be tuned using
1040
	advanced features of the Xft font system can be tuned using
1040
	this file; this section describes only some simple
1041
	this file; this section describes only some simple
1041
	possibilities.  For more details, please see
1042
	possibilities.  For more details, please see
1042
	&man.fonts-conf.5;.</para>
1043
	&man.fonts-conf.5;.</para>
1043
1044
1044
      <indexterm><primary>XML</primary></indexterm>
1045
      <indexterm><primary>XML</primary></indexterm>
1045
1046
1046
      <para>This file must be in XML format.  Pay careful attention to
1047
      <para>This file must be in XML format.  Pay careful attention to
1047
	case, and make sure all tags are properly closed.  The file
1048
	case, and make sure all tags are properly closed.  The file
1048
	begins with the usual XML header followed by a DOCTYPE
1049
	begins with the usual XML header followed by a DOCTYPE
1049
	definition, and then the <literal>&lt;fontconfig&gt;</literal>
1050
	definition, and then the <literal>&lt;fontconfig&gt;</literal>
1050
	tag:</para>
1051
	tag:</para>
1051
1052
1052
      <programlisting>&lt;?xml version="1.0"?&gt;
1053
      <programlisting>&lt;?xml version="1.0"?&gt;
1053
      &lt;!DOCTYPE fontconfig SYSTEM "fonts.dtd"&gt;
1054
      &lt;!DOCTYPE fontconfig SYSTEM "fonts.dtd"&gt;
1054
      &lt;fontconfig&gt;</programlisting>
1055
      &lt;fontconfig&gt;</programlisting>
1055
1056
1056
      <para>As previously stated, all fonts in
1057
      <para>As previously stated, all fonts in
1057
	<filename>/usr/local/share/fonts/</filename> as well as
1058
	<filename>/usr/local/share/fonts/</filename> as well as
1058
	<filename>~/.fonts/</filename> are already made available to
1059
	<filename>~/.fonts/</filename> are already made available to
1059
	Xft-aware applications.  If you wish to add another directory
1060
	Xft-aware applications.  If you wish to add another directory
1060
	outside of these two directory trees, add a line similar to
1061
	outside of these two directory trees, add a line similar to
1061
	the following to
1062
	the following to
1062
	<filename>/usr/local/etc/fonts/local.conf</filename>:</para>
1063
	<filename>/usr/local/etc/fonts/local.conf</filename>:</para>
1063
1064
1064
      <programlisting>&lt;dir&gt;/path/to/my/fonts&lt;/dir&gt;</programlisting>
1065
      <programlisting>&lt;dir&gt;/path/to/my/fonts&lt;/dir&gt;</programlisting>
1065
1066
1066
      <para>After adding new fonts, and especially new font
1067
      <para>After adding new fonts, and especially new font
1067
	directories, you should run the following command to rebuild
1068
	directories, you should run the following command to rebuild
1068
	the font caches:</para>
1069
	the font caches:</para>
1069
1070
1070
      <screen>&prompt.root; <userinput>fc-cache -f</userinput></screen>
1071
      <screen>&prompt.root; <userinput>fc-cache -f</userinput></screen>
1071
1072
1072
      <para>Anti-aliasing makes borders slightly fuzzy, which makes
1073
      <para>Anti-aliasing makes borders slightly fuzzy, which makes
1073
	very small text more readable and removes
1074
	very small text more readable and removes
1074
	<quote>staircases</quote> from large text, but can cause
1075
	<quote>staircases</quote> from large text, but can cause
1075
	eyestrain if applied to normal text.  To exclude font sizes
1076
	eyestrain if applied to normal text.  To exclude font sizes
1076
	smaller than 14 point from anti-aliasing, include these
1077
	smaller than 14 point from anti-aliasing, include these
1077
	lines:</para>
1078
	lines:</para>
1078
1079
1079
      <programlisting>        &lt;match target="font"&gt;
1080
      <programlisting>        &lt;match target="font"&gt;
1080
	    &lt;test name="size" compare="less"&gt;
1081
	    &lt;test name="size" compare="less"&gt;
1081
		&lt;double&gt;14&lt;/double&gt;
1082
		&lt;double&gt;14&lt;/double&gt;
1082
	    &lt;/test&gt;
1083
	    &lt;/test&gt;
1083
	    &lt;edit name="antialias" mode="assign"&gt;
1084
	    &lt;edit name="antialias" mode="assign"&gt;
1084
		&lt;bool&gt;false&lt;/bool&gt;
1085
		&lt;bool&gt;false&lt;/bool&gt;
1085
	    &lt;/edit&gt;
1086
	    &lt;/edit&gt;
1086
	&lt;/match&gt;
1087
	&lt;/match&gt;
1087
	&lt;match target="font"&gt;
1088
	&lt;match target="font"&gt;
1088
	    &lt;test name="pixelsize" compare="less" qual="any"&gt;
1089
	    &lt;test name="pixelsize" compare="less" qual="any"&gt;
1089
		&lt;double&gt;14&lt;/double&gt;
1090
		&lt;double&gt;14&lt;/double&gt;
1090
	    &lt;/test&gt;
1091
	    &lt;/test&gt;
1091
	    &lt;edit mode="assign" name="antialias"&gt;
1092
	    &lt;edit mode="assign" name="antialias"&gt;
1092
		&lt;bool&gt;false&lt;/bool&gt;
1093
		&lt;bool&gt;false&lt;/bool&gt;
1093
	    &lt;/edit&gt;
1094
	    &lt;/edit&gt;
1094
	&lt;/match&gt;</programlisting>
1095
	&lt;/match&gt;</programlisting>
1095
1096
1096
      <indexterm>
1097
      <indexterm>
1097
	<primary>fonts</primary>
1098
	<primary>fonts</primary>
1098
	<secondary>spacing</secondary>
1099
	<secondary>spacing</secondary>
1099
      </indexterm>
1100
      </indexterm>
1100
1101
1101
      <para>Spacing for some monospaced fonts may also be
1102
      <para>Spacing for some monospaced fonts may also be
1102
	inappropriate with anti-aliasing.  This seems to be an issue
1103
	inappropriate with anti-aliasing.  This seems to be an issue
1103
	with <application>KDE</application>, in particular.  One
1104
	with <application>KDE</application>, in particular.  One
1104
	possible fix for this is to force the spacing for such fonts
1105
	possible fix for this is to force the spacing for such fonts
1105
	to be 100. Add the following lines:</para>
1106
	to be 100. Add the following lines:</para>
1106
1107
1107
      <programlisting>       &lt;match target="pattern" name="family"&gt;
1108
      <programlisting>       &lt;match target="pattern" name="family"&gt;
1108
	   &lt;test qual="any" name="family"&gt;
1109
	   &lt;test qual="any" name="family"&gt;
1109
	       &lt;string&gt;fixed&lt;/string&gt;
1110
	       &lt;string&gt;fixed&lt;/string&gt;
1110
	   &lt;/test&gt;
1111
	   &lt;/test&gt;
1111
	   &lt;edit name="family" mode="assign"&gt;
1112
	   &lt;edit name="family" mode="assign"&gt;
1112
	       &lt;string&gt;mono&lt;/string&gt;
1113
	       &lt;string&gt;mono&lt;/string&gt;
1113
	   &lt;/edit&gt;
1114
	   &lt;/edit&gt;
1114
	&lt;/match&gt;
1115
	&lt;/match&gt;
1115
	&lt;match target="pattern" name="family"&gt;
1116
	&lt;match target="pattern" name="family"&gt;
1116
	    &lt;test qual="any" name="family"&gt;
1117
	    &lt;test qual="any" name="family"&gt;
1117
		&lt;string&gt;console&lt;/string&gt;
1118
		&lt;string&gt;console&lt;/string&gt;
1118
	    &lt;/test&gt;
1119
	    &lt;/test&gt;
1119
	    &lt;edit name="family" mode="assign"&gt;
1120
	    &lt;edit name="family" mode="assign"&gt;
1120
		&lt;string&gt;mono&lt;/string&gt;
1121
		&lt;string&gt;mono&lt;/string&gt;
1121
	    &lt;/edit&gt;
1122
	    &lt;/edit&gt;
1122
	&lt;/match&gt;</programlisting>
1123
	&lt;/match&gt;</programlisting>
1123
1124
1124
      <para>(this aliases the other common names for fixed fonts as
1125
      <para>(this aliases the other common names for fixed fonts as
1125
	<literal>"mono"</literal>), and then add:</para>
1126
	<literal>"mono"</literal>), and then add:</para>
1126
1127
1127
      <programlisting>         &lt;match target="pattern" name="family"&gt;
1128
      <programlisting>         &lt;match target="pattern" name="family"&gt;
1128
	     &lt;test qual="any" name="family"&gt;
1129
	     &lt;test qual="any" name="family"&gt;
1129
		 &lt;string&gt;mono&lt;/string&gt;
1130
		 &lt;string&gt;mono&lt;/string&gt;
1130
	     &lt;/test&gt;
1131
	     &lt;/test&gt;
1131
	     &lt;edit name="spacing" mode="assign"&gt;
1132
	     &lt;edit name="spacing" mode="assign"&gt;
1132
		 &lt;int&gt;100&lt;/int&gt;
1133
		 &lt;int&gt;100&lt;/int&gt;
1133
	     &lt;/edit&gt;
1134
	     &lt;/edit&gt;
1134
	 &lt;/match&gt;      </programlisting>
1135
	 &lt;/match&gt;      </programlisting>
1135
1136
1136
      <para>Certain fonts, such as Helvetica, may have a problem when
1137
      <para>Certain fonts, such as Helvetica, may have a problem when
1137
	anti-aliased.  Usually this manifests itself as a font that
1138
	anti-aliased.  Usually this manifests itself as a font that
1138
	seems cut in half vertically.  At worst, it may cause
1139
	seems cut in half vertically.  At worst, it may cause
1139
	applications to crash.  To avoid this, consider adding the
1140
	applications to crash.  To avoid this, consider adding the
1140
	following to <filename>local.conf</filename>:</para>
1141
	following to <filename>local.conf</filename>:</para>
1141
1142
1142
      <programlisting>         &lt;match target="pattern" name="family"&gt;
1143
      <programlisting>         &lt;match target="pattern" name="family"&gt;
1143
	     &lt;test qual="any" name="family"&gt;
1144
	     &lt;test qual="any" name="family"&gt;
1144
		 &lt;string&gt;Helvetica&lt;/string&gt;
1145
		 &lt;string&gt;Helvetica&lt;/string&gt;
1145
	     &lt;/test&gt;
1146
	     &lt;/test&gt;
1146
	     &lt;edit name="family" mode="assign"&gt;
1147
	     &lt;edit name="family" mode="assign"&gt;
1147
		 &lt;string&gt;sans-serif&lt;/string&gt;
1148
		 &lt;string&gt;sans-serif&lt;/string&gt;
1148
	     &lt;/edit&gt;
1149
	     &lt;/edit&gt;
1149
	 &lt;/match&gt;        </programlisting>
1150
	 &lt;/match&gt;        </programlisting>
1150
1151
1151
      <para>Once you have finished editing
1152
      <para>Once you have finished editing
1152
	<filename>local.conf</filename> make sure you end the file
1153
	<filename>local.conf</filename> make sure you end the file
1153
	with the <literal>&lt;/fontconfig&gt;</literal> tag.  Not
1154
	with the <literal>&lt;/fontconfig&gt;</literal> tag.  Not
1154
	doing this will cause your changes to be ignored.</para>
1155
	doing this will cause your changes to be ignored.</para>
1155
1156
1156
      <para>Finally, users can add their own settings via their
1157
      <para>Finally, users can add their own settings via their
1157
	personal <filename>.fonts.conf</filename> files.  To do this,
1158
	personal <filename>.fonts.conf</filename> files.  To do this,
1158
	each user should simply create a
1159
	each user should simply create a
1159
	<filename>~/.fonts.conf</filename>.  This file must also be in
1160
	<filename>~/.fonts.conf</filename>.  This file must also be in
1160
	XML format.</para>
1161
	XML format.</para>
1161
1162
1162
      <indexterm><primary>LCD screen</primary></indexterm>
1163
      <indexterm><primary>LCD screen</primary></indexterm>
1163
      <indexterm><primary>Fonts</primary>
1164
      <indexterm><primary>Fonts</primary>
1164
	<secondary>LCD screen</secondary></indexterm>
1165
	<secondary>LCD screen</secondary></indexterm>
1165
1166
1166
      <para>One last point: with an LCD screen, sub-pixel sampling may
1167
      <para>One last point: with an LCD screen, sub-pixel sampling may
1167
	be desired.  This basically treats the (horizontally
1168
	be desired.  This basically treats the (horizontally
1168
	separated) red, green and blue components separately to
1169
	separated) red, green and blue components separately to
1169
	improve the horizontal resolution; the results can be
1170
	improve the horizontal resolution; the results can be
1170
	dramatic.  To enable this, add the line somewhere in
1171
	dramatic.  To enable this, add the line somewhere in
1171
	<filename>local.conf</filename>:</para>
1172
	<filename>local.conf</filename>:</para>
1172
1173
1173
      <programlisting>&lt;match target="font"&gt;
1174
      <programlisting>&lt;match target="font"&gt;
1174
	     &lt;test qual="all" name="rgba"&gt;
1175
	     &lt;test qual="all" name="rgba"&gt;
1175
		 &lt;const&gt;unknown&lt;/const&gt;
1176
		 &lt;const&gt;unknown&lt;/const&gt;
1176
	     &lt;/test&gt;
1177
	     &lt;/test&gt;
1177
	     &lt;edit name="rgba" mode="assign"&gt;
1178
	     &lt;edit name="rgba" mode="assign"&gt;
1178
		 &lt;const&gt;rgb&lt;/const&gt;
1179
		 &lt;const&gt;rgb&lt;/const&gt;
1179
	     &lt;/edit&gt;
1180
	     &lt;/edit&gt;
1180
	 &lt;/match&gt;</programlisting>
1181
	 &lt;/match&gt;</programlisting>
1181
1182
1182
      <note>
1183
      <note>
1183
	<para>Depending on the sort of display,
1184
	<para>Depending on the sort of display,
1184
	  <literal>rgb</literal> may need to be changed to
1185
	  <literal>rgb</literal> may need to be changed to
1185
	  <literal>bgr</literal>, <literal>vrgb</literal> or
1186
	  <literal>bgr</literal>, <literal>vrgb</literal> or
1186
	  <literal>vbgr</literal>: experiment and see which works
1187
	  <literal>vbgr</literal>: experiment and see which works
1187
	  best.</para>
1188
	  best.</para>
1188
      </note>
1189
      </note>
1189
    </sect2>
1190
    </sect2>
1190
  </sect1>
1191
  </sect1>
1191
1192
1192
  <sect1 xml:id="x-xdm">
1193
  <sect1 xml:id="x-xdm">
1193
    <info>
1194
    <info>
1194
      <title>The X Display Manager</title>
1195
      <title>The X Display Manager</title>
1195
1196
1196
      <authorgroup>
1197
      <authorgroup>
1197
	<author>
1198
	<author>
1198
	  <personname>
1199
	  <personname>
1199
	    <firstname>Seth</firstname>
1200
	    <firstname>Seth</firstname>
1200
	    <surname>Kingsley</surname>
1201
	    <surname>Kingsley</surname>
1201
	  </personname>
1202
	  </personname>
1202
	  <contrib>Contributed by </contrib>
1203
	  <contrib>Contributed by </contrib>
1203
	</author>
1204
	</author>
1204
      </authorgroup>
1205
      </authorgroup>
1205
    </info>
1206
    </info>
1206
1207
1207
    <indexterm><primary>X Display Manager</primary></indexterm>
1208
    <indexterm><primary>X Display Manager</primary></indexterm>
1208
    <para><application>&xorg;</application> provides an X Display
1209
    <para><application>&xorg;</application> provides an X Display
1209
      Manager, <application>XDM</application>, which can be used for
1210
      Manager, <application>XDM</application>, which can be used for
1210
      login session management.  <application>XDM</application>
1211
      login session management.  <application>XDM</application>
1211
      provides a graphical interface for choosing which display server
1212
      provides a graphical interface for choosing which display server
1212
      to connect to and for entering authorization information such as
1213
      to connect to and for entering authorization information such as
1213
      a login and password combination.</para>
1214
      a login and password combination.</para>
1214
1215
1215
    <para>This section demonstrates how to configure the X Display
1216
    <para>This section demonstrates how to configure the X Display
1216
      Manager on &os;.  Some desktop environments provide their own
1217
      Manager on &os;.  Some desktop environments provide their own
1217
      graphical login manager.  Refer to <xref
1218
      graphical login manager.  Refer to <xref
1218
	linkend="x11-wm-gnome"/> for instructions on how to configure
1219
	linkend="x11-wm-gnome"/> for instructions on how to configure
1219
      the GNOME Display Manager and <xref linkend="x11-wm-kde"/> for
1220
      the GNOME Display Manager and <xref linkend="x11-wm-kde"/> for
1220
      instructions on how to configure the KDE Display Manager.</para>
1221
      instructions on how to configure the KDE Display Manager.</para>
1221
1222
1222
    <sect2>
1223
    <sect2>
1223
      <title>Configuring <application>XDM</application></title>
1224
      <title>Configuring <application>XDM</application></title>
1224
1225
1225
      <para>To install <application>XDM</application>, use the
1226
      <para>To install <application>XDM</application>, use the
1226
	<package>x11/xdm</package> package or port.  Once installed,
1227
	<package>x11/xdm</package> package or port.  Once installed,
1227
	<application>XDM</application> can be configured to run when
1228
	<application>XDM</application> can be configured to run when
1228
	the  machine boots up by editing this entry in
1229
	the  machine boots up by editing this entry in
1229
	<filename>/etc/ttys</filename>:</para>
1230
	<filename>/etc/ttys</filename>:</para>
1230
1231
1231
      <screen>ttyv8   "/usr/local/bin/xdm -nodaemon"  xterm   off secure</screen>
1232
      <screen>ttyv8   "/usr/local/bin/xdm -nodaemon"  xterm   off secure</screen>
1232
1233
1233
      <para>Change the <literal>off</literal> to <literal>on</literal>
1234
      <para>Change the <literal>off</literal> to <literal>on</literal>
1234
	and save the edit.  The <literal>ttyv8</literal> in this entry
1235
	and save the edit.  The <literal>ttyv8</literal> in this entry
1235
	indicates that <application>XDM</application> will run on the
1236
	indicates that <application>XDM</application> will run on the
1236
	ninth virtual terminal.</para>
1237
	ninth virtual terminal.</para>
1237
1238
1238
      <para>The <application>XDM</application> configuration directory
1239
      <para>The <application>XDM</application> configuration directory
1239
	is located in <filename>/usr/local/lib/X11/xdm</filename>.
1240
	is located in <filename>/usr/local/lib/X11/xdm</filename>.
1240
	This directory contains several files used to change the
1241
	This directory contains several files used to change the
1241
	behavior and appearance of <application>XDM</application>, as
1242
	behavior and appearance of <application>XDM</application>, as
1242
	well as a few scripts and programs used to set up the desktop
1243
	well as a few scripts and programs used to set up the desktop
1243
	when <application>XDM</application> is running.  <xref
1244
	when <application>XDM</application> is running.  <xref
1244
	  linkend="xdm-config-files"/> summarizes the function of each
1245
	  linkend="xdm-config-files"/> summarizes the function of each
1245
	of these files.  The exact syntax and usage of these files is
1246
	of these files.  The exact syntax and usage of these files is
1246
	described in &man.xdm.1;.</para>
1247
	described in &man.xdm.1;.</para>
1247
1248
1248
      <table frame="none" pgwide="1" xml:id="xdm-config-files">
1249
      <table frame="none" pgwide="1" xml:id="xdm-config-files">
1249
	<title>XDM Configuration Files</title>
1250
	<title>XDM Configuration Files</title>
1250
1251
1251
	<tgroup cols="2">
1252
	<tgroup cols="2">
1252
	  <thead>
1253
	  <thead>
1253
	    <row>
1254
	    <row>
1254
	      <entry>File</entry>
1255
	      <entry>File</entry>
1255
	      <entry>Description</entry>
1256
	      <entry>Description</entry>
1256
	    </row>
1257
	    </row>
1257
	  </thead>
1258
	  </thead>
1258
1259
1259
	  <tbody>
1260
	  <tbody>
1260
	    <row>
1261
	    <row>
1261
	      <entry><filename>Xaccess</filename></entry>
1262
	      <entry><filename>Xaccess</filename></entry>
1262
	      <entry>The protocol for connecting to
1263
	      <entry>The protocol for connecting to
1263
		<application>XDM</application> is called the X Display
1264
		<application>XDM</application> is called the X Display
1264
		Manager Connection Protocol (<acronym>XDMCP</acronym>)
1265
		Manager Connection Protocol (<acronym>XDMCP</acronym>)
1265
		This file is a client authorization ruleset for
1266
		This file is a client authorization ruleset for
1266
		controlling <acronym>XDMCP</acronym> connections from
1267
		controlling <acronym>XDMCP</acronym> connections from
1267
		remote machines.  By default, this file does not allow
1268
		remote machines.  By default, this file does not allow
1268
		any remote clients to connect.</entry>
1269
		any remote clients to connect.</entry>
1269
	    </row>
1270
	    </row>
1270
1271
1271
	    <row>
1272
	    <row>
1272
	      <entry><filename>Xresources</filename></entry>
1273
	      <entry><filename>Xresources</filename></entry>
1273
	      <entry>This file controls the look and feel of the
1274
	      <entry>This file controls the look and feel of the
1274
		<application>XDM</application> display chooser and
1275
		<application>XDM</application> display chooser and
1275
		login screens.  The default configuration is a simple
1276
		login screens.  The default configuration is a simple
1276
		rectangular login window with the hostname of the
1277
		rectangular login window with the hostname of the
1277
		machine displayed at the top in a large font and
1278
		machine displayed at the top in a large font and
1278
		<quote>Login:</quote> and <quote>Password:</quote>
1279
		<quote>Login:</quote> and <quote>Password:</quote>
1279
		prompts below.  The format of this file is identical
1280
		prompts below.  The format of this file is identical
1280
		to the app-defaults file described in the
1281
		to the app-defaults file described in the
1281
		<application>&xorg;</application>
1282
		<application>&xorg;</application>
1282
		documentation.</entry>
1283
		documentation.</entry>
1283
	    </row>
1284
	    </row>
1284
1285
1285
	    <row>
1286
	    <row>
1286
	      <entry><filename>Xservers</filename></entry>
1287
	      <entry><filename>Xservers</filename></entry>
1287
	      <entry>The list of local and remote displays the chooser
1288
	      <entry>The list of local and remote displays the chooser
1288
		should provide as login choices.</entry>
1289
		should provide as login choices.</entry>
1289
	    </row>
1290
	    </row>
1290
1291
1291
	    <row>
1292
	    <row>
1292
	      <entry><filename>Xsession</filename></entry>
1293
	      <entry><filename>Xsession</filename></entry>
1293
	      <entry>Default session script for logins which is run by
1294
	      <entry>Default session script for logins which is run by
1294
		<application>XDM</application> after a user has logged
1295
		<application>XDM</application> after a user has logged
1295
		in.  Normally each user will have a customized session
1296
		in.  Normally each user will have a customized session
1296
		script in <filename>~/.xsession</filename> that
1297
		script in <filename>~/.xsession</filename> that
1297
		overrides this script</entry>
1298
		overrides this script</entry>
1298
	    </row>
1299
	    </row>
1299
1300
1300
	    <row>
1301
	    <row>
1301
	      <entry><filename>Xsetup_</filename>*</entry>
1302
	      <entry><filename>Xsetup_</filename>*</entry>
1302
	      <entry>Script to automatically launch applications
1303
	      <entry>Script to automatically launch applications
1303
		before displaying the chooser or login interfaces.
1304
		before displaying the chooser or login interfaces.
1304
		There is a script for each display being used, named
1305
		There is a script for each display being used, named
1305
		<filename>Xsetup_*</filename>, where
1306
		<filename>Xsetup_*</filename>, where
1306
		<literal>*</literal> is the local display number.
1307
		<literal>*</literal> is the local display number.
1307
		Typically these scripts run one or two programs in the
1308
		Typically these scripts run one or two programs in the
1308
		background such as
1309
		background such as
1309
		<command>xconsole</command>.</entry>
1310
		<command>xconsole</command>.</entry>
1310
	    </row>
1311
	    </row>
1311
1312
1312
	    <row>
1313
	    <row>
1313
	      <entry><filename>xdm-config</filename></entry>
1314
	      <entry><filename>xdm-config</filename></entry>
1314
	      <entry>Global configuration for all displays running
1315
	      <entry>Global configuration for all displays running
1315
		on this machine.</entry>
1316
		on this machine.</entry>
1316
	    </row>
1317
	    </row>
1317
1318
1318
	    <row>
1319
	    <row>
1319
	      <entry><filename>xdm-errors</filename></entry>
1320
	      <entry><filename>xdm-errors</filename></entry>
1320
	      <entry>Contains errors generated by the server program.
1321
	      <entry>Contains errors generated by the server program.
1321
		If a display that <application>XDM</application> is
1322
		If a display that <application>XDM</application> is
1322
		trying to start hangs, look at this file for error
1323
		trying to start hangs, look at this file for error
1323
		messages.  These messages are also written to the
1324
		messages.  These messages are also written to the
1324
		user's <filename>~/.xsession-errors</filename> on a
1325
		user's <filename>~/.xsession-errors</filename> on a
1325
		per-session basis.</entry>
1326
		per-session basis.</entry>
1326
	    </row>
1327
	    </row>
1327
1328
1328
	    <row>
1329
	    <row>
1329
	      <entry><filename>xdm-pid</filename></entry>
1330
	      <entry><filename>xdm-pid</filename></entry>
1330
	      <entry>The running process <acronym>ID</acronym> of
1331
	      <entry>The running process <acronym>ID</acronym> of
1331
		<application>XDM</application>.</entry>
1332
		<application>XDM</application>.</entry>
1332
	    </row>
1333
	    </row>
1333
	  </tbody>
1334
	  </tbody>
1334
	</tgroup>
1335
	</tgroup>
1335
      </table>
1336
      </table>
1336
    </sect2>
1337
    </sect2>
1337
1338
1338
    <sect2>
1339
    <sect2>
1339
      <title>Configuring Remote Access</title>
1340
      <title>Configuring Remote Access</title>
1340
1341
1341
      <para>By default, only users on the same system can login using
1342
      <para>By default, only users on the same system can login using
1342
	<application>XDM</application>.  To enable users on other
1343
	<application>XDM</application>.  To enable users on other
1343
	systems to connect to the display server, edit the access
1344
	systems to connect to the display server, edit the access
1344
	control rules and enable the connection listener.</para>
1345
	control rules and enable the connection listener.</para>
1345
1346
1346
      <para>To configure <application>XDM</application> to listen for
1347
      <para>To configure <application>XDM</application> to listen for
1347
	any remote connection, comment out the
1348
	any remote connection, comment out the
1348
	<literal>DisplayManager.requestPort</literal> line in
1349
	<literal>DisplayManager.requestPort</literal> line in
1349
	<filename>/usr/local/lib/X11/xdm/xdm-config</filename> by
1350
	<filename>/usr/local/lib/X11/xdm/xdm-config</filename> by
1350
	putting a <literal>!</literal> in front of it:</para>
1351
	putting a <literal>!</literal> in front of it:</para>
1351
1352
1352
      <screen>! SECURITY: do not listen for XDMCP or Chooser requests
1353
      <screen>! SECURITY: do not listen for XDMCP or Chooser requests
1353
! Comment out this line if you want to manage X terminals with xdm
1354
! Comment out this line if you want to manage X terminals with xdm
1354
DisplayManager.requestPort:     0</screen>
1355
DisplayManager.requestPort:     0</screen>
1355
1356
1356
      <para>Save the edits and restart <application>XDM</application>.
1357
      <para>Save the edits and restart <application>XDM</application>.
1357
	To restrict remote access, look at the example entries in
1358
	To restrict remote access, look at the example entries in
1358
	<filename>/usr/local/lib/X11/xdm/Xaccess</filename> and refer
1359
	<filename>/usr/local/lib/X11/xdm/Xaccess</filename> and refer
1359
	to &man.xdm.1; for further information.</para>
1360
	to &man.xdm.1; for further information.</para>
1360
    </sect2>
1361
    </sect2>
1361
  </sect1>
1362
  </sect1>
1362
1363
1363
  <sect1 xml:id="x11-wm">
1364
  <sect1 xml:id="x11-wm">
1364
    <info>
1365
    <info>
1365
      <title>Desktop Environments</title>
1366
      <title>Desktop Environments</title>
1366
1367
1367
      <authorgroup>
1368
      <authorgroup>
1368
	<author>
1369
	<author>
1369
	  <personname>
1370
	  <personname>
1370
	    <firstname>Valentino</firstname>
1371
	    <firstname>Valentino</firstname>
1371
	    <surname>Vaschetto</surname>
1372
	    <surname>Vaschetto</surname>
1372
	  </personname>
1373
	  </personname>
1373
	  <contrib>Contributed by </contrib>
1374
	  <contrib>Contributed by </contrib>
1374
	   <!-- in June 2001 -->
1375
	   <!-- in June 2001 -->
1375
	</author>
1376
	</author>
1376
      </authorgroup>
1377
      </authorgroup>
1377
    </info>
1378
    </info>
1378
1379
1379
    <para>This section describes how to install three popular desktop
1380
    <para>This section describes how to install three popular desktop
1380
      environments on a &os; system.  A desktop environment can range
1381
      environments on a &os; system.  A desktop environment can range
1381
      from a simple window manager to a complete suite of desktop
1382
      from a simple window manager to a complete suite of desktop
1382
      applications.  Over a hundred desktop environments are available
1383
      applications.  Over a hundred desktop environments are available
1383
      in the <filename>x11-wm</filename> category of the Ports
1384
      in the <filename>x11-wm</filename> category of the Ports
1384
      Collection.</para>
1385
      Collection.</para>
1385
1386
1386
    <sect2 xml:id="x11-wm-gnome">
1387
    <sect2 xml:id="x11-wm-gnome">
1387
      <title>GNOME</title>
1388
      <title>GNOME</title>
1388
1389
1389
      <indexterm><primary>GNOME</primary></indexterm>
1390
      <indexterm><primary>GNOME</primary></indexterm>
1390
      <para><application>GNOME</application> is a user-friendly
1391
      <para><application>GNOME</application> is a user-friendly
1391
	desktop environment.  It includes a panel for starting
1392
	desktop environment.  It includes a panel for starting
1392
	applications and displaying status, a desktop, a set of tools
1393
	applications and displaying status, a desktop, a set of tools
1393
	and applications, and a set of conventions that make it easy
1394
	and applications, and a set of conventions that make it easy
1394
	for applications to cooperate and be consistent with each
1395
	for applications to cooperate and be consistent with each
1395
	other.  More information regarding
1396
	other.  More information regarding
1396
	<application>GNOME</application> on &os; can be found at <link
1397
	<application>GNOME</application> on &os; can be found at <link
1397
	  xlink:href="http://www.FreeBSD.org/gnome">http://www.FreeBSD.org/gnome</link>.
1398
	  xlink:href="http://www.FreeBSD.org/gnome">http://www.FreeBSD.org/gnome</link>.
1398
	That web site contains additional documentation about
1399
	That web site contains additional documentation about
1399
	installing, configuring, and managing
1400
	installing, configuring, and managing
1400
	<application>GNOME</application> on &os;.</para>
1401
	<application>GNOME</application> on &os;.</para>
1401
1402
1402
      <para>This desktop environment can be installed from a
1403
      <para>This desktop environment can be installed from a
1403
	package:</para>
1404
	package:</para>
1404
1405
1405
      <screen>&prompt.root; <userinput>pkg install gnome2</userinput></screen>
1406
      <screen>&prompt.root; <userinput>pkg install gnome2</userinput></screen>
1406
1407
1407
      <para>To instead build <application>GNOME</application> from
1408
      <para>To instead build <application>GNOME</application> from
1408
	ports, use the following command.
1409
	ports, use the following command.
1409
	<application>GNOME</application> is a large application and
1410
	<application>GNOME</application> is a large application and
1410
	will take some time to compile, even on a fast
1411
	will take some time to compile, even on a fast
1411
	computer.</para>
1412
	computer.</para>
1412
1413
1413
      <screen>&prompt.root; <userinput>cd /usr/ports/x11/gnome2</userinput>
1414
      <screen>&prompt.root; <userinput>cd /usr/ports/x11/gnome2</userinput>
1414
&prompt.root; <userinput>make install clean</userinput></screen>
1415
&prompt.root; <userinput>make install clean</userinput></screen>
1415
1416
1416
      <para><application>GNOME</application>
1417
      <para><application>GNOME</application>
1417
	requires <filename>/proc</filename> to be mounted.  Add this
1418
	requires <filename>/proc</filename> to be mounted.  Add this
1418
	line to <filename>/etc/fstab</filename> to mount this file
1419
	line to <filename>/etc/fstab</filename> to mount this file
1419
	system automatically during system startup:</para>
1420
	system automatically during system startup:</para>
1420
1421
1421
      <programlisting>proc           /proc       procfs  rw  0   0</programlisting>
1422
      <programlisting>proc           /proc       procfs  rw  0   0</programlisting>
1422
1423
1423
      <para><application>GNOME</application> uses
1424
      <para><application>GNOME</application> uses
1424
	<application>D-Bus</application> and
1425
	<application>D-Bus</application> and
1425
	<application>HAL</application> for a
1426
	<application>HAL</application> for a
1426
	message bus and hardware abstraction.  These applications are automatically
1427
	message bus and hardware abstraction.  These applications are automatically
1427
	installed as dependencies of <application>GNOME</application>.
1428
	installed as dependencies of <application>GNOME</application>.
1428
	Enable them in <filename>/etc/rc.conf</filename> so
1429
	Enable them in <filename>/etc/rc.conf</filename> so
1429
	they will be started when the system boots:</para>
1430
	they will be started when the system boots:</para>
1430
1431
1431
      <programlisting>dbus_enable="YES"
1432
      <programlisting>dbus_enable="YES"
1432
hald_enable="YES"</programlisting>
1433
hald_enable="YES"</programlisting>
1433
1434
1434
      <para>After installation,
1435
      <para>After installation,
1435
	configure <application>&xorg;</application> to start
1436
	configure <application>&xorg;</application> to start
1436
	<application>GNOME</application>.  The easiest way to do this
1437
	<application>GNOME</application>.  The easiest way to do this
1437
	is to enable the GNOME Display Manager,
1438
	is to enable the GNOME Display Manager,
1438
	<application>GDM</application>, which is installed as part of
1439
	<application>GDM</application>, which is installed as part of
1439
	the <application>GNOME</application> package or port.  It can
1440
	the <application>GNOME</application> package or port.  It can
1440
	be enabled by adding this line to
1441
	be enabled by adding this line to
1441
	<filename>/etc/rc.conf</filename>:</para>
1442
	<filename>/etc/rc.conf</filename>:</para>
1442
1443
1443
      <programlisting>gdm_enable="YES"</programlisting>
1444
      <programlisting>gdm_enable="YES"</programlisting>
1444
1445
1445
      <para>It is often desirable to also start all
1446
      <para>It is often desirable to also start all
1446
	<application>GNOME</application> services.  To achieve this,
1447
	<application>GNOME</application> services.  To achieve this,
1447
	add a second line to <filename>/etc/rc.conf</filename>:</para>
1448
	add a second line to <filename>/etc/rc.conf</filename>:</para>
1448
1449
1449
      <programlisting>gnome_enable="YES"</programlisting>
1450
      <programlisting>gnome_enable="YES"</programlisting>
1450
1451
1451
      <para><application>GDM</application> will start
1452
      <para><application>GDM</application> will start
1452
	automatically when the system boots.</para>
1453
	automatically when the system boots.</para>
1453
1454
1454
      <para>A second method for starting
1455
      <para>A second method for starting
1455
	<application>GNOME</application> is to type
1456
	<application>GNOME</application> is to type
1456
	<command>startx</command> from the command-line after
1457
	<command>startx</command> from the command-line after
1457
	configuring <filename>~/.xinitrc</filename>.  If this file
1458
	configuring <filename>~/.xinitrc</filename>.  If this file
1458
	already exists, replace the line that starts the current
1459
	already exists, replace the line that starts the current
1459
	window manager with one that starts
1460
	window manager with one that starts
1460
	<filename>/usr/local/bin/gnome-session</filename>.  If this
1461
	<filename>/usr/local/bin/gnome-session</filename>.  If this
1461
	file does not exist, create it with this command:</para>
1462
	file does not exist, create it with this command:</para>
1462
1463
1463
      <screen>&prompt.user; <userinput>echo "exec /usr/local/bin/gnome-session" &gt; ~/.xinitrc</userinput></screen>
1464
      <screen>&prompt.user; <userinput>echo "exec /usr/local/bin/gnome-session" &gt; ~/.xinitrc</userinput></screen>
1464
1465
1465
      <para>A third method is to use <application>XDM</application> as
1466
      <para>A third method is to use <application>XDM</application> as
1466
	the display manager.  In this case, create an executable
1467
	the display manager.  In this case, create an executable
1467
	<filename>~/.xsession</filename>:</para>
1468
	<filename>~/.xsession</filename>:</para>
1468
1469
1469
      <screen>&prompt.user; <userinput>echo "#!/bin/sh" &gt; ~/.xsession</userinput>
1470
      <screen>&prompt.user; <userinput>echo "#!/bin/sh" &gt; ~/.xsession</userinput>
1470
&prompt.user; <userinput>echo "exec /usr/local/bin/gnome-session" &gt;&gt; ~/.xsession</userinput>
1471
&prompt.user; <userinput>echo "exec /usr/local/bin/gnome-session" &gt;&gt; ~/.xsession</userinput>
1471
&prompt.user; <userinput>chmod +x ~/.xsession</userinput></screen>
1472
&prompt.user; <userinput>chmod +x ~/.xsession</userinput></screen>
1472
    </sect2>
1473
    </sect2>
1473
1474
1474
    <sect2 xml:id="x11-wm-kde">
1475
    <sect2 xml:id="x11-wm-kde">
1475
      <title>KDE</title>
1476
      <title>KDE</title>
1476
1477
1477
      <indexterm><primary>KDE</primary></indexterm>
1478
      <indexterm><primary>KDE</primary></indexterm>
1478
1479
1479
      <para><application>KDE</application> is another easy-to-use
1480
      <para><application>KDE</application> is another easy-to-use
1480
	desktop environment.  This desktop provides a suite of
1481
	desktop environment.  This desktop provides a suite of
1481
	applications with a consistent look and feel, a standardized
1482
	applications with a consistent look and feel, a standardized
1482
	menu and toolbars, keybindings, color-schemes,
1483
	menu and toolbars, keybindings, color-schemes,
1483
	internationalization, and a centralized, dialog-driven desktop
1484
	internationalization, and a centralized, dialog-driven desktop
1484
	configuration.  More information on
1485
	configuration.  More information on
1485
	<application>KDE</application> can be found at <link
1486
	<application>KDE</application> can be found at <link
1486
	  xlink:href="http://www.kde.org/">http://www.kde.org/</link>.
1487
	  xlink:href="http://www.kde.org/">http://www.kde.org/</link>.
1487
	For &os;-specific information, consult <link
1488
	For &os;-specific information, consult <link
1488
	  xlink:href="http://freebsd.kde.org/">http://freebsd.kde.org</link>.</para>
1489
	  xlink:href="http://freebsd.kde.org/">http://freebsd.kde.org</link>.</para>
1489
1490
1490
      <para>To install the <application>KDE</application> package,
1491
      <para>To install the <application>KDE</application> package,
1491
	type:</para>
1492
	type:</para>
1492
1493
1493
      <screen>&prompt.root; <userinput>pkg install x11/kde4</userinput></screen>
1494
      <screen>&prompt.root; <userinput>pkg install x11/kde4</userinput></screen>
1494
1495
1495
      <para>To instead build the <application>KDE</application> port,
1496
      <para>To instead build the <application>KDE</application> port,
1496
	use the following command.  Installing the port will provide a
1497
	use the following command.  Installing the port will provide a
1497
	menu for selecting which components to install.
1498
	menu for selecting which components to install.
1498
	<application>KDE</application> is a large application and will
1499
	<application>KDE</application> is a large application and will
1499
	take some time to compile, even on a fast computer.</para>
1500
	take some time to compile, even on a fast computer.</para>
1500
1501
1501
      <screen>&prompt.root; <userinput>cd /usr/ports/x11/kde4</userinput>
1502
      <screen>&prompt.root; <userinput>cd /usr/ports/x11/kde4</userinput>
1502
&prompt.root; <userinput>make install clean</userinput></screen>
1503
&prompt.root; <userinput>make install clean</userinput></screen>
1503
1504
1504
      <indexterm>
1505
      <indexterm>
1505
	<primary>KDE</primary>
1506
	<primary>KDE</primary>
1506
	<secondary>display manager</secondary>
1507
	<secondary>display manager</secondary>
1507
      </indexterm>
1508
      </indexterm>
1508
1509
1509
      <para><application>KDE</application> requires
1510
      <para><application>KDE</application> requires
1510
	<filename>/proc</filename> to be mounted.  Add this line to
1511
	<filename>/proc</filename> to be mounted.  Add this line to
1511
	<filename>/etc/fstab</filename> to mount this file system
1512
	<filename>/etc/fstab</filename> to mount this file system
1512
	automatically during system startup:</para>
1513
	automatically during system startup:</para>
1513
1514
1514
      <programlisting>proc           /proc       procfs  rw  0   0</programlisting>
1515
      <programlisting>proc           /proc       procfs  rw  0   0</programlisting>
1515
1516
1516
      <para>The installation of <application>KDE</application>
1517
      <para>The installation of <application>KDE</application>
1517
	includes the KDE Display Manager,
1518
	includes the KDE Display Manager,
1518
	<application>KDM</application>.  To enable this display
1519
	<application>KDM</application>.  To enable this display
1519
	manager, add this line to
1520
	manager, add this line to
1520
	<filename>/etc/rc.conf</filename>:</para>
1521
	<filename>/etc/rc.conf</filename>:</para>
1521
1522
1522
      <programlisting>kdm4_enable="YES"</programlisting>
1523
      <programlisting>kdm4_enable="YES"</programlisting>
1523
1524
1524
      <para>A second method for launching
1525
      <para>A second method for launching
1525
	<application>KDE</application> is to type
1526
	<application>KDE</application> is to type
1526
	<command>startx</command> from the command line.  For this to
1527
	<command>startx</command> from the command line.  For this to
1527
	work, the following line is needed in
1528
	work, the following line is needed in
1528
	<filename>~/.xinitrc</filename>:</para>
1529
	<filename>~/.xinitrc</filename>:</para>
1529
1530
1530
      <programlisting>exec /usr/local/bin/startkde</programlisting>
1531
      <programlisting>exec /usr/local/bin/startkde</programlisting>
1531
1532
1532
      <para>A third method for starting <application>KDE</application>
1533
      <para>A third method for starting <application>KDE</application>
1533
	is through <application>XDM</application>.  To do so, create
1534
	is through <application>XDM</application>.  To do so, create
1534
	an executable <filename>~/.xsession</filename> as
1535
	an executable <filename>~/.xsession</filename> as
1535
	follows:</para>
1536
	follows:</para>
1536
1537
1537
      <screen>&prompt.user; <userinput>echo "#!/bin/sh" &gt; ~/.xsession</userinput>
1538
      <screen>&prompt.user; <userinput>echo "#!/bin/sh" &gt; ~/.xsession</userinput>
1538
&prompt.user; <userinput>echo "exec /usr/local/bin/startkde" &gt;&gt; ~/.xsession</userinput>
1539
&prompt.user; <userinput>echo "exec /usr/local/bin/startkde" &gt;&gt; ~/.xsession</userinput>
1539
&prompt.user; <userinput>chmod +x ~/.xsession</userinput></screen>
1540
&prompt.user; <userinput>chmod +x ~/.xsession</userinput></screen>
1540
1541
1541
      <para>Once <application>KDE</application> is started, refer to
1542
      <para>Once <application>KDE</application> is started, refer to
1542
	its built-in help system for more information on how to use
1543
	its built-in help system for more information on how to use
1543
	its various menus and applications.</para>
1544
	its various menus and applications.</para>
1544
    </sect2>
1545
    </sect2>
1545
1546
1546
    <sect2 xml:id="x11-wm-xfce">
1547
    <sect2 xml:id="x11-wm-xfce">
1547
      <title>Xfce</title>
1548
      <title>Xfce</title>
1548
1549
1549
      <para><application>Xfce</application> is a desktop environment
1550
      <para><application>Xfce</application> is a desktop environment
1550
	based on the GTK+ toolkit used by
1551
	based on the GTK+ toolkit used by
1551
	<application>GNOME</application>.  However, it is more
1552
	<application>GNOME</application>.  However, it is more
1552
	lightweight and provides a simple, efficient, easy-to-use
1553
	lightweight and provides a simple, efficient, easy-to-use
1553
	desktop.  It is fully configurable, has a main panel with
1554
	desktop.  It is fully configurable, has a main panel with
1554
	menus, applets, and application launchers, provides a file
1555
	menus, applets, and application launchers, provides a file
1555
	manager and sound manager, and is themeable.  Since it is
1556
	manager and sound manager, and is themeable.  Since it is
1556
	fast, light, and efficient, it is ideal for older or slower
1557
	fast, light, and efficient, it is ideal for older or slower
1557
	machines with memory limitations.  More information on
1558
	machines with memory limitations.  More information on
1558
	<application>Xfce</application> can be found at <link
1559
	<application>Xfce</application> can be found at <link
1559
	  xlink:href="http://www.xfce.org/">http://www.xfce.org</link>.</para>
1560
	  xlink:href="http://www.xfce.org/">http://www.xfce.org</link>.</para>
1560
1561
1561
      <para>To install the <application>Xfce</application>
1562
      <para>To install the <application>Xfce</application>
1562
	package:</para>
1563
	package:</para>
1563
1564
1564
      <screen>&prompt.root; <userinput>pkg install xfce</userinput></screen>
1565
      <screen>&prompt.root; <userinput>pkg install xfce</userinput></screen>
1565
1566
1566
      <para>Alternatively, to build the port:</para>
1567
      <para>Alternatively, to build the port:</para>
1567
1568
1568
      <screen>&prompt.root; <userinput>cd /usr/ports/x11-wm/xfce4</userinput>
1569
      <screen>&prompt.root; <userinput>cd /usr/ports/x11-wm/xfce4</userinput>
1569
&prompt.root; <userinput>make install clean</userinput></screen>
1570
&prompt.root; <userinput>make install clean</userinput></screen>
1570
1571
1571
      <para>Unlike <application>GNOME</application> or
1572
      <para>Unlike <application>GNOME</application> or
1572
	<application>KDE</application>,
1573
	<application>KDE</application>,
1573
	<application>Xfce</application> does not provide its own login
1574
	<application>Xfce</application> does not provide its own login
1574
	manager.  In order to start <application>Xfce</application>
1575
	manager.  In order to start <application>Xfce</application>
1575
	from the command line by typing <command>startx</command>,
1576
	from the command line by typing <command>startx</command>,
1576
	first add its entry to <filename>~/.xinitrc</filename>:</para>
1577
	first add its entry to <filename>~/.xinitrc</filename>:</para>
1577
1578
1578
      <screen>&prompt.user; <userinput>echo "exec /usr/local/bin/startxfce4 --with-ck-launch" &gt; ~/.xinitrc</userinput></screen>
1579
      <screen>&prompt.user; <userinput>echo "exec /usr/local/bin/startxfce4 --with-ck-launch" &gt; ~/.xinitrc</userinput></screen>
1579
1580
1580
      <para>An alternate method is to use
1581
      <para>An alternate method is to use
1581
	<application>XDM</application>.  To configure this method,
1582
	<application>XDM</application>.  To configure this method,
1582
	create an executable <filename>~/.xsession</filename>:</para>
1583
	create an executable <filename>~/.xsession</filename>:</para>
1583
1584
1584
      <screen>&prompt.user; <userinput>echo "#!/bin/sh" &gt; ~/.xsession</userinput>
1585
      <screen>&prompt.user; <userinput>echo "#!/bin/sh" &gt; ~/.xsession</userinput>
1585
&prompt.user; <userinput>echo "exec /usr/local/bin/startxfce4 --with-ck-launch" &gt;&gt; ~/.xsession</userinput>
1586
&prompt.user; <userinput>echo "exec /usr/local/bin/startxfce4 --with-ck-launch" &gt;&gt; ~/.xsession</userinput>
1586
&prompt.user; <userinput>chmod +x ~/.xsession</userinput></screen>
1587
&prompt.user; <userinput>chmod +x ~/.xsession</userinput></screen>
1587
    </sect2>
1588
    </sect2>
1588
  </sect1>
1589
  </sect1>
1589
1590
1590
  <sect1 xml:id="x-compiz-fusion">
1591
  <sect1 xml:id="x-compiz-fusion">
1591
    <title>Installing Compiz Fusion</title>
1592
    <title>Installing Compiz Fusion</title>
1592
1593
1593
    <para>One way to make using a desktop
1594
    <para>One way to make using a desktop
1594
      computer more pleasant is with nice 3D effects.</para>
1595
      computer more pleasant is with nice 3D effects.</para>
1595
1596
1596
    <para>Installing the <application>Compiz&nbsp;Fusion</application>
1597
    <para>Installing the <application>Compiz&nbsp;Fusion</application>
1597
      package is easy, but configuring it requires a few steps that
1598
      package is easy, but configuring it requires a few steps that
1598
      are not described in the port's documentation.</para>
1599
      are not described in the port's documentation.</para>
1599
1600
1600
    <sect2 xml:id="x-compiz-video-card">
1601
    <sect2 xml:id="x-compiz-video-card">
1601
      <title>Setting up the &os; nVidia Driver</title>
1602
      <title>Setting up the &os; nVidia Driver</title>
1602
1603
1603
      <para>Desktop effects can cause quite a load on the graphics
1604
      <para>Desktop effects can cause quite a load on the graphics
1604
	card.  For an nVidia-based graphics card, the proprietary
1605
	card.  For an nVidia-based graphics card, the proprietary
1605
	driver is required for good performance.  Users of other
1606
	driver is required for good performance.  Users of other
1606
	graphics cards can skip this section and continue with the
1607
	graphics cards can skip this section and continue with the
1607
	<filename>xorg.conf</filename> configuration.</para>
1608
	<filename>xorg.conf</filename> configuration.</para>
1608
1609
1609
      <para>To determine which nVidia driver is needed see the <link
1610
      <para>To determine which nVidia driver is needed see the <link
1610
	  xlink:href="&url.books.faq;/x.html#idp59950544">FAQ question
1611
	  xlink:href="&url.books.faq;/x.html#idp59950544">FAQ question
1611
	  on the subject</link>.</para>
1612
	  on the subject</link>.</para>
1612
1613
1613
      <para>Having determined the correct driver to use for your card,
1614
      <para>Having determined the correct driver to use for your card,
1614
	installation is as simple as installing any other
1615
	installation is as simple as installing any other
1615
	package.</para>
1616
	package.</para>
1616
1617
1617
      <para>For example, to install the latest driver:</para>
1618
      <para>For example, to install the latest driver:</para>
1618
1619
1619
      <screen>&prompt.root; <userinput>pkg install x11/nvidia-driver</userinput></screen>
1620
      <screen>&prompt.root; <userinput>pkg install x11/nvidia-driver</userinput></screen>
1620
1621
1621
      <para>The driver will create a kernel module, which needs to be
1622
      <para>The driver will create a kernel module, which needs to be
1622
	loaded at system startup.  Add the following line to
1623
	loaded at system startup.  Add the following line to
1623
	<filename>/boot/loader.conf</filename>:</para>
1624
	<filename>/boot/loader.conf</filename>:</para>
1624
1625
1625
      <programlisting>nvidia_load="YES"</programlisting>
1626
      <programlisting>nvidia_load="YES"</programlisting>
1626
1627
1627
      <note>
1628
      <note>
1628
	<para>To immediately load the kernel module into the running
1629
	<para>To immediately load the kernel module into the running
1629
	  kernel by issuing a command like <command>kldload
1630
	  kernel by issuing a command like <command>kldload
1630
	    nvidia</command>, however it has been noted that the some
1631
	    nvidia</command>, however it has been noted that the some
1631
	  versions of <application>&xorg;</application> will not
1632
	  versions of <application>&xorg;</application> will not
1632
	  function properly if the driver is not loaded at boot time.
1633
	  function properly if the driver is not loaded at boot time.
1633
	  After editing <filename>/boot/loader.conf</filename>, a
1634
	  After editing <filename>/boot/loader.conf</filename>, a
1634
	  reboot is recommended.</para>
1635
	  reboot is recommended.</para>
1635
      </note>
1636
      </note>
1636
1637
1637
      <para>With the kernel module loaded, you normally only need to
1638
      <para>With the kernel module loaded, you normally only need to
1638
	change a single line in <filename>xorg.conf</filename>
1639
	change a single line in <filename>xorg.conf</filename>
1639
	to enable the proprietary driver:</para>
1640
	to enable the proprietary driver:</para>
1640
1641
1641
      <para>Find the following line in
1642
      <para>Find the following line in
1642
	<filename>/etc/X11/xorg.conf</filename>:</para>
1643
	<filename>/etc/X11/xorg.conf</filename>:</para>
1643
1644
1644
      <programlisting>Driver      "nv"</programlisting>
1645
      <programlisting>Driver      "nv"</programlisting>
1645
1646
1646
      <para>and change it to:</para>
1647
      <para>and change it to:</para>
1647
1648
1648
      <programlisting>Driver      "nvidia"</programlisting>
1649
      <programlisting>Driver      "nvidia"</programlisting>
1649
1650
1650
      <para>Start the GUI as usual, and you should be greeted by the
1651
      <para>Start the GUI as usual, and you should be greeted by the
1651
	nVidia splash.  Everything should work as usual.</para>
1652
	nVidia splash.  Everything should work as usual.</para>
1652
    </sect2>
1653
    </sect2>
1653
1654
1654
    <sect2 xml:id="xorg-configuration">
1655
    <sect2 xml:id="xorg-configuration">
1655
      <title>Configuring xorg.conf for Desktop Effects</title>
1656
      <title>Configuring xorg.conf for Desktop Effects</title>
1656
1657
1657
      <para>To enable <application>Compiz&nbsp;Fusion</application>,
1658
      <para>To enable <application>Compiz&nbsp;Fusion</application>,
1658
	<filename>/etc/X11/xorg.conf</filename> needs to be
1659
	<filename>/etc/X11/xorg.conf</filename> needs to be
1659
	modified:</para>
1660
	modified:</para>
1660
1661
1661
      <para>Add the following section to enable composite
1662
      <para>Add the following section to enable composite
1662
	effects:</para>
1663
	effects:</para>
1663
1664
1664
      <programlisting>Section "Extensions"
1665
      <programlisting>Section "Extensions"
1665
    Option         "Composite" "Enable"
1666
    Option         "Composite" "Enable"
1666
EndSection</programlisting>
1667
EndSection</programlisting>
1667
1668
1668
      <para>Locate the <quote>Screen</quote> section which should look
1669
      <para>Locate the <quote>Screen</quote> section which should look
1669
	similar to the one below:</para>
1670
	similar to the one below:</para>
1670
1671
1671
      <programlisting>Section "Screen"
1672
      <programlisting>Section "Screen"
1672
    Identifier     "Screen0"
1673
    Identifier     "Screen0"
1673
    Device         "Card0"
1674
    Device         "Card0"
1674
    Monitor        "Monitor0"
1675
    Monitor        "Monitor0"
1675
    ...</programlisting>
1676
    ...</programlisting>
1676
1677
1677
      <para>and add the following two lines (after
1678
      <para>and add the following two lines (after
1678
	<quote>Monitor</quote> will do):</para>
1679
	<quote>Monitor</quote> will do):</para>
1679
1680
1680
      <programlisting>DefaultDepth    24
1681
      <programlisting>DefaultDepth    24
1681
Option         "AddARGBGLXVisuals" "True"</programlisting>
1682
Option         "AddARGBGLXVisuals" "True"</programlisting>
1682
1683
1683
      <para>Locate the <quote>Subsection</quote> that refers to the
1684
      <para>Locate the <quote>Subsection</quote> that refers to the
1684
	screen resolution that you wish to use.  For example, if you
1685
	screen resolution that you wish to use.  For example, if you
1685
	wish to use 1280x1024, locate the section that follows.  If
1686
	wish to use 1280x1024, locate the section that follows.  If
1686
	the desired resolution does not appear in any subsection, you
1687
	the desired resolution does not appear in any subsection, you
1687
	may add the relevant entry by hand:</para>
1688
	may add the relevant entry by hand:</para>
1688
1689
1689
      <programlisting>SubSection     "Display"
1690
      <programlisting>SubSection     "Display"
1690
    Viewport    0 0
1691
    Viewport    0 0
1691
    Modes      "1280x1024"
1692
    Modes      "1280x1024"
1692
EndSubSection</programlisting>
1693
EndSubSection</programlisting>
1693
1694
1694
      <para>A color depth of 24&nbsp;bits is needed for desktop
1695
      <para>A color depth of 24&nbsp;bits is needed for desktop
1695
	composition, change the above subsection to:</para>
1696
	composition, change the above subsection to:</para>
1696
1697
1697
      <programlisting>SubSection     "Display"
1698
      <programlisting>SubSection     "Display"
1698
    Viewport    0 0
1699
    Viewport    0 0
1699
    Depth       24
1700
    Depth       24
1700
    Modes      "1280x1024"
1701
    Modes      "1280x1024"
1701
EndSubSection</programlisting>
1702
EndSubSection</programlisting>
1702
1703
1703
      <para>Finally, confirm that the <quote>glx</quote> and
1704
      <para>Finally, confirm that the <quote>glx</quote> and
1704
	<quote>extmod</quote> modules are loaded in the
1705
	<quote>extmod</quote> modules are loaded in the
1705
	<quote>Module</quote> section:</para>
1706
	<quote>Module</quote> section:</para>
1706
1707
1707
      <programlisting>Section "Module"
1708
      <programlisting>Section "Module"
1708
    Load           "extmod"
1709
    Load           "extmod"
1709
    Load           "glx"
1710
    Load           "glx"
1710
    ...</programlisting>
1711
    ...</programlisting>
1711
1712
1712
      <para>The preceding can be done automatically with
1713
      <para>The preceding can be done automatically with
1713
	<package>x11/nvidia-xconfig</package> by running (as
1714
	<package>x11/nvidia-xconfig</package> by running (as
1714
	root):</para>
1715
	root):</para>
1715
1716
1716
      <screen>&prompt.root; <userinput>nvidia-xconfig --add-argb-glx-visuals</userinput>
1717
      <screen>&prompt.root; <userinput>nvidia-xconfig --add-argb-glx-visuals</userinput>
1717
&prompt.root; <userinput>nvidia-xconfig --composite</userinput>
1718
&prompt.root; <userinput>nvidia-xconfig --composite</userinput>
1718
&prompt.root; <userinput>nvidia-xconfig --depth=24</userinput></screen>
1719
&prompt.root; <userinput>nvidia-xconfig --depth=24</userinput></screen>
1719
    </sect2>
1720
    </sect2>
1720
1721
1721
    <sect2 xml:id="compiz-fusion">
1722
    <sect2 xml:id="compiz-fusion">
1722
      <title>Installing and Configuring Compiz&nbsp;Fusion</title>
1723
      <title>Installing and Configuring Compiz&nbsp;Fusion</title>
1723
1724
1724
      <para>Installing <application>Compiz&nbsp;Fusion</application>
1725
      <para>Installing <application>Compiz&nbsp;Fusion</application>
1725
	is as simple as any other package:</para>
1726
	is as simple as any other package:</para>
1726
1727
1727
      <screen>&prompt.root; <userinput>pkg install x11-wm/compiz-fusion</userinput></screen>
1728
      <screen>&prompt.root; <userinput>pkg install x11-wm/compiz-fusion</userinput></screen>
1728
1729
1729
      <para>When the installation is finished, start your graphic
1730
      <para>When the installation is finished, start your graphic
1730
	desktop and at a terminal, enter the following commands (as a
1731
	desktop and at a terminal, enter the following commands (as a
1731
	normal user):</para>
1732
	normal user):</para>
1732
1733
1733
      <screen>&prompt.user; <userinput>compiz --replace --sm-disable --ignore-desktop-hints ccp &amp;</userinput>
1734
      <screen>&prompt.user; <userinput>compiz --replace --sm-disable --ignore-desktop-hints ccp &amp;</userinput>
1734
&prompt.user; <userinput>emerald --replace &amp;</userinput></screen>
1735
&prompt.user; <userinput>emerald --replace &amp;</userinput></screen>
1735
1736
1736
      <para>Your screen will flicker for a few seconds, as your window
1737
      <para>Your screen will flicker for a few seconds, as your window
1737
	manager (e.g. <application>Metacity</application> if you are
1738
	manager (e.g. <application>Metacity</application> if you are
1738
	using <application>GNOME</application>) is replaced by
1739
	using <application>GNOME</application>) is replaced by
1739
	<application>Compiz&nbsp;Fusion</application>.
1740
	<application>Compiz&nbsp;Fusion</application>.
1740
	<application>Emerald</application> takes care of the window
1741
	<application>Emerald</application> takes care of the window
1741
	decorations (i.e. close, minimize, maximize buttons, title
1742
	decorations (i.e. close, minimize, maximize buttons, title
1742
	bars and so on).</para>
1743
	bars and so on).</para>
1743
1744
1744
      <para>You may convert this to a trivial script and have it run
1745
      <para>You may convert this to a trivial script and have it run
1745
	at startup automatically (e.g. by adding to
1746
	at startup automatically (e.g. by adding to
1746
	<quote>Sessions</quote> in a <application>GNOME</application>
1747
	<quote>Sessions</quote> in a <application>GNOME</application>
1747
	desktop):</para>
1748
	desktop):</para>
1748
1749
1749
      <programlisting>#! /bin/sh
1750
      <programlisting>#! /bin/sh
1750
compiz --replace --sm-disable --ignore-desktop-hints ccp &amp;
1751
compiz --replace --sm-disable --ignore-desktop-hints ccp &amp;
1751
emerald --replace &amp;</programlisting>
1752
emerald --replace &amp;</programlisting>
1752
1753
1753
      <para>Save this in your home directory as, for example,
1754
      <para>Save this in your home directory as, for example,
1754
	<filename>start-compiz</filename> and make it
1755
	<filename>start-compiz</filename> and make it
1755
	executable:</para>
1756
	executable:</para>
1756
1757
1757
      <screen>&prompt.user; <userinput>chmod +x ~/start-compiz</userinput></screen>
1758
      <screen>&prompt.user; <userinput>chmod +x ~/start-compiz</userinput></screen>
1758
1759
1759
      <para>Then use the GUI to add it to <guimenuitem>Startup
1760
      <para>Then use the GUI to add it to <guimenuitem>Startup
1760
	  Programs</guimenuitem> (located in
1761
	  Programs</guimenuitem> (located in
1761
	<guimenuitem>System</guimenuitem>,
1762
	<guimenuitem>System</guimenuitem>,
1762
	<guimenuitem>Preferences</guimenuitem>,
1763
	<guimenuitem>Preferences</guimenuitem>,
1763
	<guimenuitem>Sessions</guimenuitem> on a
1764
	<guimenuitem>Sessions</guimenuitem> on a
1764
	<application>GNOME</application> desktop).</para>
1765
	<application>GNOME</application> desktop).</para>
1765
1766
1766
      <para>To actually select all the desired effects and their
1767
      <para>To actually select all the desired effects and their
1767
	settings, execute (again as a normal user) the
1768
	settings, execute (again as a normal user) the
1768
	<application>Compiz&nbsp;Config&nbsp;Settings&nbsp;Manager</application>:</para>
1769
	<application>Compiz&nbsp;Config&nbsp;Settings&nbsp;Manager</application>:</para>
1769
1770
1770
      <screen>&prompt.user; <userinput>ccsm</userinput></screen>
1771
      <screen>&prompt.user; <userinput>ccsm</userinput></screen>
1771
1772
1772
      <note>
1773
      <note>
1773
	<para>In <application>GNOME</application>, this can also be
1774
	<para>In <application>GNOME</application>, this can also be
1774
	  found in the <guimenuitem>System</guimenuitem>,
1775
	  found in the <guimenuitem>System</guimenuitem>,
1775
	  <guimenuitem>Preferences</guimenuitem> menu.</para>
1776
	  <guimenuitem>Preferences</guimenuitem> menu.</para>
1776
      </note>
1777
      </note>
1777
1778
1778
      <para>If you have selected <quote>gconf support</quote> during
1779
      <para>If you have selected <quote>gconf support</quote> during
1779
	the build, you will also be able to view these settings using
1780
	the build, you will also be able to view these settings using
1780
	<command>gconf-editor</command> under
1781
	<command>gconf-editor</command> under
1781
	<literal>apps/compiz</literal>.</para>
1782
	<literal>apps/compiz</literal>.</para>
1782
    </sect2>
1783
    </sect2>
1783
  </sect1>
1784
  </sect1>
1784
1785
1785
  <sect1 xml:id="x11-understanding">
1786
  <sect1 xml:id="x11-understanding">
1786
1787
1787
    <title>Troubleshooting</title>
1788
    <title>Troubleshooting</title>
1788
1789
1789
    <para>If the mouse does not work, you will need to first configure
1790
    <para>If the mouse does not work, you will need to first configure
1790
      it before proceeding.
1791
      it before proceeding.
1791
      In recent <application>Xorg</application>
1792
      In recent <application>Xorg</application>
1792
      versions, the <literal>InputDevice</literal> sections in
1793
      versions, the <literal>InputDevice</literal> sections in
1793
      <filename>xorg.conf</filename> are ignored in favor of the
1794
      <filename>xorg.conf</filename> are ignored in favor of the
1794
      autodetected devices.  To restore the old behavior, add the
1795
      autodetected devices.  To restore the old behavior, add the
1795
      following line to the <literal>ServerLayout</literal> or
1796
      following line to the <literal>ServerLayout</literal> or
1796
      <literal>ServerFlags</literal> section of this file:</para>
1797
      <literal>ServerFlags</literal> section of this file:</para>
1797
1798
1798
      <programlisting>Option "AutoAddDevices" "false"</programlisting>
1799
      <programlisting>Option "AutoAddDevices" "false"</programlisting>
1799
1800
1800
      <para>Input devices may then be configured as in previous
1801
      <para>Input devices may then be configured as in previous
1801
	versions, along with any other options needed (e.g., keyboard
1802
	versions, along with any other options needed (e.g., keyboard
1802
	layout switching).</para>
1803
	layout switching).</para>
1803
1804
1804
      <note>
1805
      <note>
1805
	<para>As previously explained the
1806
	<para>As previously explained the
1806
	  <application>hald</application> daemon will, by default,
1807
	  <application>hald</application> daemon will, by default,
1807
	  automatically detect your keyboard.  There are chances that
1808
	  automatically detect your keyboard.  There are chances that
1808
	  your keyboard layout or model will not be correct, desktop
1809
	  your keyboard layout or model will not be correct, desktop
1809
	  environments like <application>GNOME</application>,
1810
	  environments like <application>GNOME</application>,
1810
	  <application>KDE</application> or
1811
	  <application>KDE</application> or
1811
	  <application>Xfce</application> provide tools to configure
1812
	  <application>Xfce</application> provide tools to configure
1812
	  the keyboard.  However, it is possible to set the keyboard
1813
	  the keyboard.  However, it is possible to set the keyboard
1813
	  properties directly either with the help of the
1814
	  properties directly either with the help of the
1814
	  &man.setxkbmap.1; utility or with a
1815
	  &man.setxkbmap.1; utility or with a
1815
	  <application>hald</application>'s configuration rule.</para>
1816
	  <application>hald</application>'s configuration rule.</para>
1816
1817
1817
	<para>For example if, one wants to use a PC 102 keys keyboard
1818
	<para>For example if, one wants to use a PC 102 keys keyboard
1818
	  coming with a french layout, we have to create a keyboard
1819
	  coming with a french layout, we have to create a keyboard
1819
	  configuration file for <application>hald</application>
1820
	  configuration file for <application>hald</application>
1820
	  called <filename>x11-input.fdi</filename> and saved in the
1821
	  called <filename>x11-input.fdi</filename> and saved in the
1821
	  <filename>/usr/local/etc/hal/fdi/policy</filename>
1822
	  <filename>/usr/local/etc/hal/fdi/policy</filename>
1822
	  directory.  This file should contain the following
1823
	  directory.  This file should contain the following
1823
	  lines:</para>
1824
	  lines:</para>
1824
1825
1825
	<programlisting>&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
1826
	<programlisting>&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
1826
&lt;deviceinfo version="0.2"&gt;
1827
&lt;deviceinfo version="0.2"&gt;
1827
  &lt;device&gt;
1828
  &lt;device&gt;
1828
    &lt;match key="info.capabilities" contains="input.keyboard"&gt;
1829
    &lt;match key="info.capabilities" contains="input.keyboard"&gt;
1829
	  &lt;merge key="input.x11_options.XkbModel" type="string"&gt;pc102&lt;/merge&gt;
1830
	  &lt;merge key="input.x11_options.XkbModel" type="string"&gt;pc102&lt;/merge&gt;
1830
	  &lt;merge key="input.x11_options.XkbLayout" type="string"&gt;fr&lt;/merge&gt;
1831
	  &lt;merge key="input.x11_options.XkbLayout" type="string"&gt;fr&lt;/merge&gt;
1831
    &lt;/match&gt;
1832
    &lt;/match&gt;
1832
  &lt;/device&gt;
1833
  &lt;/device&gt;
1833
&lt;/deviceinfo&gt;</programlisting>
1834
&lt;/deviceinfo&gt;</programlisting>
1834
1835
1835
	<para>If this file already exists, just copy and add to your
1836
	<para>If this file already exists, just copy and add to your
1836
	  file the lines regarding the keyboard configuration.</para>
1837
	  file the lines regarding the keyboard configuration.</para>
1837
1838
1838
	<para>You will have to reboot your machine to force
1839
	<para>You will have to reboot your machine to force
1839
	  <application>hald</application> to read this file.</para>
1840
	  <application>hald</application> to read this file.</para>
1840
1841
1841
	<para>It is possible to do the same configuration from an X
1842
	<para>It is possible to do the same configuration from an X
1842
	  terminal or a script with this command line:</para>
1843
	  terminal or a script with this command line:</para>
1843
1844
1844
	<screen>&prompt.user; <userinput>setxkbmap -model pc102 -layout fr</userinput></screen>
1845
	<screen>&prompt.user; <userinput>setxkbmap -model pc102 -layout fr</userinput></screen>
1845
1846
1846
	<para><filename>/usr/local/share/X11/xkb/rules/base.lst</filename>
1847
	<para><filename>/usr/local/share/X11/xkb/rules/base.lst</filename>
1847
	  lists the various keyboard, layouts and options
1848
	  lists the various keyboard, layouts and options
1848
	  available.</para>
1849
	  available.</para>
1849
      </note>
1850
      </note>
1850
1851
1851
      <indexterm><primary><application>&xorg;</application>
1852
      <indexterm><primary><application>&xorg;</application>
1852
	  tuning</primary></indexterm>
1853
	  tuning</primary></indexterm>
1853
1854
1854
      <para>The <filename>xorg.conf.new</filename> configuration file
1855
      <para>The <filename>xorg.conf.new</filename> configuration file
1855
	may now be tuned to taste.  Open the file in a text editor
1856
	may now be tuned to taste.  Open the file in a text editor
1856
	such as &man.emacs.1; or &man.ee.1;.  If the monitor is an
1857
	such as &man.emacs.1; or &man.ee.1;.  If the monitor is an
1857
	older or unusual model that does not support autodetection of
1858
	older or unusual model that does not support autodetection of
1858
	sync frequencies, those settings can be added to
1859
	sync frequencies, those settings can be added to
1859
	<filename>xorg.conf.new</filename> under the
1860
	<filename>xorg.conf.new</filename> under the
1860
	<literal>"Monitor"</literal> section:</para>
1861
	<literal>"Monitor"</literal> section:</para>
1861
1862
1862
      <programlisting>Section "Monitor"
1863
      <programlisting>Section "Monitor"
1863
	Identifier   "Monitor0"
1864
	Identifier   "Monitor0"
1864
	VendorName   "Monitor Vendor"
1865
	VendorName   "Monitor Vendor"
1865
	ModelName    "Monitor Model"
1866
	ModelName    "Monitor Model"
1866
	HorizSync    30-107
1867
	HorizSync    30-107
1867
	VertRefresh  48-120
1868
	VertRefresh  48-120
1868
EndSection</programlisting>
1869
EndSection</programlisting>
1869
1870
1870
      <para>Most monitors support sync frequency autodetection, making
1871
      <para>Most monitors support sync frequency autodetection, making
1871
	manual entry of these values unnecessary.  For the few
1872
	manual entry of these values unnecessary.  For the few
1872
	monitors that do not support autodetection, avoid potential
1873
	monitors that do not support autodetection, avoid potential
1873
	damage by only entering values provided by the
1874
	damage by only entering values provided by the
1874
	manufacturer.</para>
1875
	manufacturer.</para>
1875
1876
1876
      <para>X allows DPMS (Energy Star) features to be used with
1877
      <para>X allows DPMS (Energy Star) features to be used with
1877
	capable monitors.  The &man.xset.1; program controls the
1878
	capable monitors.  The &man.xset.1; program controls the
1878
	time-outs and can force standby, suspend, or off modes.  If
1879
	time-outs and can force standby, suspend, or off modes.  If
1879
	you wish to enable DPMS features for your monitor, you must
1880
	you wish to enable DPMS features for your monitor, you must
1880
	add the following line to the monitor section:</para>
1881
	add the following line to the monitor section:</para>
1881
1882
1882
      <programlisting>Option       "DPMS"</programlisting>
1883
      <programlisting>Option       "DPMS"</programlisting>
1883
1884
1884
      <indexterm>
1885
      <indexterm>
1885
	<primary><filename>xorg.conf</filename></primary>
1886
	<primary><filename>xorg.conf</filename></primary>
1886
      </indexterm>
1887
      </indexterm>
1887
1888
1888
      <para>While the <filename>xorg.conf.new</filename> configuration
1889
      <para>While the <filename>xorg.conf.new</filename> configuration
1889
	file is still open in an editor, select the default resolution
1890
	file is still open in an editor, select the default resolution
1890
	and color depth desired.  This is defined in the
1891
	and color depth desired.  This is defined in the
1891
	<literal>"Screen"</literal> section:</para>
1892
	<literal>"Screen"</literal> section:</para>
1892
1893
1893
      <programlisting>Section "Screen"
1894
      <programlisting>Section "Screen"
1894
	Identifier "Screen0"
1895
	Identifier "Screen0"
1895
	Device     "Card0"
1896
	Device     "Card0"
1896
	Monitor    "Monitor0"
1897
	Monitor    "Monitor0"
1897
	DefaultDepth 24
1898
	DefaultDepth 24
1898
	SubSection "Display"
1899
	SubSection "Display"
1899
		Viewport  0 0
1900
		Viewport  0 0
1900
		Depth     24
1901
		Depth     24
1901
		Modes     "1024x768"
1902
		Modes     "1024x768"
1902
	EndSubSection
1903
	EndSubSection
1903
EndSection</programlisting>
1904
EndSection</programlisting>
1904
1905
1905
      <para>The <literal>DefaultDepth</literal> keyword describes the
1906
      <para>The <literal>DefaultDepth</literal> keyword describes the
1906
	color depth to run at by default.  This can be overridden with
1907
	color depth to run at by default.  This can be overridden with
1907
	the <option>-depth</option> command line switch to
1908
	the <option>-depth</option> command line switch to
1908
	&man.Xorg.1;.  The <literal>Modes</literal> keyword describes
1909
	&man.Xorg.1;.  The <literal>Modes</literal> keyword describes
1909
	the resolution to run at for the given color depth.  Note that
1910
	the resolution to run at for the given color depth.  Note that
1910
	only VESA standard modes are supported as defined by the
1911
	only VESA standard modes are supported as defined by the
1911
	target system's graphics hardware.  In the example above, the
1912
	target system's graphics hardware.  In the example above, the
1912
	default color depth is twenty-four bits per pixel.  At this
1913
	default color depth is twenty-four bits per pixel.  At this
1913
	color depth, the accepted resolution is 1024 by 768
1914
	color depth, the accepted resolution is 1024 by 768
1914
	pixels.</para>
1915
	pixels.</para>
1915
1916
1916
      <para>Finally, write the configuration file and test it using
1917
      <para>Finally, write the configuration file and test it using
1917
	the test mode given above.</para>
1918
	the test mode given above.</para>
1918
1919
1919
      <note>
1920
      <note>
1920
	<para>One of the tools available to assist you during
1921
	<para>One of the tools available to assist you during
1921
	  troubleshooting process are the
1922
	  troubleshooting process are the
1922
	  <application>&xorg;</application> log files, which contain
1923
	  <application>&xorg;</application> log files, which contain
1923
	  information on each device that the
1924
	  information on each device that the
1924
	  <application>&xorg;</application> server attaches to.
1925
	  <application>&xorg;</application> server attaches to.
1925
	  <application>&xorg;</application> log file names are in the
1926
	  <application>&xorg;</application> log file names are in the
1926
	  format of <filename>/var/log/Xorg.0.log</filename>.  The
1927
	  format of <filename>/var/log/Xorg.0.log</filename>.  The
1927
	  exact name of the log can vary from
1928
	  exact name of the log can vary from
1928
	  <filename>Xorg.0.log</filename> to
1929
	  <filename>Xorg.0.log</filename> to
1929
	  <filename>Xorg.8.log</filename> and so forth.</para>
1930
	  <filename>Xorg.8.log</filename> and so forth.</para>
1930
      </note>
1931
      </note>
1931
1932
1932
      <para>If all is well, the configuration file needs to be
1933
      <para>If all is well, the configuration file needs to be
1933
	installed in a common location where &man.Xorg.1; can find it.
1934
	installed in a common location where &man.Xorg.1; can find it.
1934
	This is typically <filename>/etc/X11/xorg.conf</filename> or
1935
	This is typically <filename>/etc/X11/xorg.conf</filename> or
1935
	<filename>/usr/local/etc/X11/xorg.conf</filename>.</para>
1936
	<filename>/usr/local/etc/X11/xorg.conf</filename>.</para>
1936
1937
1937
      <screen>&prompt.root; <userinput>cp xorg.conf.new /etc/X11/xorg.conf</userinput></screen>
1938
      <screen>&prompt.root; <userinput>cp xorg.conf.new /etc/X11/xorg.conf</userinput></screen>
1938
1939
1939
      <para>The <application>&xorg;</application> configuration
1940
      <para>The <application>&xorg;</application> configuration
1940
	process is now complete.  <application>&xorg;</application>
1941
	process is now complete.  <application>&xorg;</application>
1941
	may be now started with the &man.startx.1; utility.  The
1942
	may be now started with the &man.startx.1; utility.  The
1942
	<application>&xorg;</application> server may also be started
1943
	<application>&xorg;</application> server may also be started
1943
	with the use of &man.xdm.1;.</para>
1944
	with the use of &man.xdm.1;.</para>
1944
1945
1945
      <sect2>
1946
      <sect2>
1946
	<title>Configuration with &intel; <literal>i810</literal>
1947
	<title>Configuration with &intel; <literal>i810</literal>
1947
	  Graphics Chipsets</title>
1948
	  Graphics Chipsets</title>
1948
1949
1949
	<indexterm>
1950
	<indexterm>
1950
	  <primary>Intel i810 graphic chipset</primary>
1951
	  <primary>Intel i810 graphic chipset</primary>
1951
	</indexterm>
1952
	</indexterm>
1952
1953
1953
	<para>Configuration with &intel; i810 integrated chipsets
1954
	<para>Configuration with &intel; i810 integrated chipsets
1954
	  requires the <filename>agpgart</filename> AGP programming
1955
	  requires the <filename>agpgart</filename> AGP programming
1955
	  interface for <application>&xorg;</application> to drive the
1956
	  interface for <application>&xorg;</application> to drive the
1956
	  card.  See the &man.agp.4; driver manual page for more
1957
	  card.  See the &man.agp.4; driver manual page for more
1957
	  information.</para>
1958
	  information.</para>
1958
1959
1959
	<para>This will allow configuration of the hardware as any
1960
	<para>This will allow configuration of the hardware as any
1960
	  other graphics board.  Note on systems without the
1961
	  other graphics board.  Note on systems without the
1961
	  &man.agp.4; driver compiled in the kernel, trying to load
1962
	  &man.agp.4; driver compiled in the kernel, trying to load
1962
	  the module with &man.kldload.8; will not work.  This driver
1963
	  the module with &man.kldload.8; will not work.  This driver
1963
	  has to be in the kernel at boot time through being compiled
1964
	  has to be in the kernel at boot time through being compiled
1964
	  in or using <filename>/boot/loader.conf</filename>.</para>
1965
	  in or using <filename>/boot/loader.conf</filename>.</para>
1965
      </sect2>
1966
      </sect2>
1966
1967
1967
      <sect2>
1968
      <sect2>
1968
	<title>Adding a Widescreen Flatpanel to the Mix</title>
1969
	<title>Adding a Widescreen Flatpanel to the Mix</title>
1969
1970
1970
	<indexterm>
1971
	<indexterm>
1971
	  <primary>widescreen flatpanel configuration</primary>
1972
	  <primary>widescreen flatpanel configuration</primary>
1972
	</indexterm>
1973
	</indexterm>
1973
1974
1974
	<para>This section assumes a bit of advanced configuration
1975
	<para>This section assumes a bit of advanced configuration
1975
	  knowledge.  If attempts to use the standard configuration
1976
	  knowledge.  If attempts to use the standard configuration
1976
	  tools above have not resulted in a working configuration,
1977
	  tools above have not resulted in a working configuration,
1977
	  there is information enough in the log files to be of use in
1978
	  there is information enough in the log files to be of use in
1978
	  getting the setup working.  Use of a text editor will be
1979
	  getting the setup working.  Use of a text editor will be
1979
	  necessary.</para>
1980
	  necessary.</para>
1980
1981
1981
	<para>Current widescreen (WSXGA, WSXGA+, WUXGA, WXGA, WXGA+,
1982
	<para>Current widescreen (WSXGA, WSXGA+, WUXGA, WXGA, WXGA+,
1982
	  et.al.) formats support 16:10 and 10:9 formats or aspect
1983
	  et.al.) formats support 16:10 and 10:9 formats or aspect
1983
	  ratios that can be problematic.  Examples of some common
1984
	  ratios that can be problematic.  Examples of some common
1984
	  screen resolutions for 16:10 aspect ratios are:</para>
1985
	  screen resolutions for 16:10 aspect ratios are:</para>
1985
1986
1986
	<itemizedlist>
1987
	<itemizedlist>
1987
	  <listitem>
1988
	  <listitem>
1988
	    <para>2560x1600</para>
1989
	    <para>2560x1600</para>
1989
	  </listitem>
1990
	  </listitem>
1990
1991
1991
	  <listitem>
1992
	  <listitem>
1992
	    <para>1920x1200</para>
1993
	    <para>1920x1200</para>
1993
	  </listitem>
1994
	  </listitem>
1994
1995
1995
	  <listitem>
1996
	  <listitem>
1996
	    <para>1680x1050</para>
1997
	    <para>1680x1050</para>
1997
	  </listitem>
1998
	  </listitem>
1998
1999
1999
	  <listitem>
2000
	  <listitem>
2000
	    <para>1440x900</para>
2001
	    <para>1440x900</para>
2001
	  </listitem>
2002
	  </listitem>
2002
2003
2003
	  <listitem>
2004
	  <listitem>
2004
	    <para>1280x800</para>
2005
	    <para>1280x800</para>
2005
	  </listitem>
2006
	  </listitem>
2006
	</itemizedlist>
2007
	</itemizedlist>
2007
2008
2008
	<para>At some point, it will be as easy as adding one of these
2009
	<para>At some point, it will be as easy as adding one of these
2009
	  resolutions as a possible <literal>Mode</literal> in the
2010
	  resolutions as a possible <literal>Mode</literal> in the
2010
	  <literal>Section "Screen"</literal> as such:</para>
2011
	  <literal>Section "Screen"</literal> as such:</para>
2011
2012
2012
	<programlisting>Section "Screen"
2013
	<programlisting>Section "Screen"
2013
Identifier "Screen0"
2014
Identifier "Screen0"
2014
Device     "Card0"
2015
Device     "Card0"
2015
Monitor    "Monitor0"
2016
Monitor    "Monitor0"
2016
DefaultDepth 24
2017
DefaultDepth 24
2017
SubSection "Display"
2018
SubSection "Display"
2018
	Viewport  0 0
2019
	Viewport  0 0
2019
	Depth     24
2020
	Depth     24
2020
	Modes     "1680x1050"
2021
	Modes     "1680x1050"
2021
EndSubSection
2022
EndSubSection
2022
EndSection</programlisting>
2023
EndSection</programlisting>
2023
2024
2024
	<para><application>&xorg;</application> is smart enough to
2025
	<para><application>&xorg;</application> is smart enough to
2025
	  pull the resolution information from the widescreen via
2026
	  pull the resolution information from the widescreen via
2026
	  I2C/DDC information so it knows what the monitor can handle
2027
	  I2C/DDC information so it knows what the monitor can handle
2027
	  as far as frequencies and resolutions.</para>
2028
	  as far as frequencies and resolutions.</para>
2028
2029
2029
	<para>If those <literal>ModeLines</literal> do not exist in
2030
	<para>If those <literal>ModeLines</literal> do not exist in
2030
	  the drivers, one might need to give
2031
	  the drivers, one might need to give
2031
	  <application>&xorg;</application> a little hint.  Using
2032
	  <application>&xorg;</application> a little hint.  Using
2032
	  <filename>/var/log/Xorg.0.log</filename> one can extract
2033
	  <filename>/var/log/Xorg.0.log</filename> one can extract
2033
	  enough information to manually create a
2034
	  enough information to manually create a
2034
	  <literal>ModeLine</literal> that will work.  Simply look for
2035
	  <literal>ModeLine</literal> that will work.  Simply look for
2035
	  information resembling this:</para>
2036
	  information resembling this:</para>
2036
2037
2037
	<programlisting>(II) MGA(0): Supported additional Video Mode:
2038
	<programlisting>(II) MGA(0): Supported additional Video Mode:
2038
(II) MGA(0): clock: 146.2 MHz   Image Size:  433 x 271 mm
2039
(II) MGA(0): clock: 146.2 MHz   Image Size:  433 x 271 mm
2039
(II) MGA(0): h_active: 1680  h_sync: 1784  h_sync_end 1960 h_blank_end 2240 h_border: 0
2040
(II) MGA(0): h_active: 1680  h_sync: 1784  h_sync_end 1960 h_blank_end 2240 h_border: 0
2040
(II) MGA(0): v_active: 1050  v_sync: 1053  v_sync_end 1059 v_blanking: 1089 v_border: 0
2041
(II) MGA(0): v_active: 1050  v_sync: 1053  v_sync_end 1059 v_blanking: 1089 v_border: 0
2041
(II) MGA(0): Ranges: V min: 48  V max: 85 Hz, H min: 30  H max: 94 kHz, PixClock max 170 MHz</programlisting>
2042
(II) MGA(0): Ranges: V min: 48  V max: 85 Hz, H min: 30  H max: 94 kHz, PixClock max 170 MHz</programlisting>
2042
2043
2043
	<para>This information is called EDID information.  Creating a
2044
	<para>This information is called EDID information.  Creating a
2044
	  <literal>ModeLine</literal> from this is just a matter of
2045
	  <literal>ModeLine</literal> from this is just a matter of
2045
	  putting the numbers in the correct order:</para>
2046
	  putting the numbers in the correct order:</para>
2046
2047
2047
	<programlisting>ModeLine &lt;name&gt; &lt;clock&gt; &lt;4 horiz. timings&gt; &lt;4 vert. timings&gt;</programlisting>
2048
	<programlisting>ModeLine &lt;name&gt; &lt;clock&gt; &lt;4 horiz. timings&gt; &lt;4 vert. timings&gt;</programlisting>
2048
2049
2049
	<para>So that the <literal>ModeLine</literal> in
2050
	<para>So that the <literal>ModeLine</literal> in
2050
	  <literal>Section "Monitor"</literal> for this example would
2051
	  <literal>Section "Monitor"</literal> for this example would
2051
	  look like this:</para>
2052
	  look like this:</para>
2052
2053
2053
	<programlisting>Section "Monitor"
2054
	<programlisting>Section "Monitor"
2054
Identifier      "Monitor1"
2055
Identifier      "Monitor1"
2055
VendorName      "Bigname"
2056
VendorName      "Bigname"
2056
ModelName       "BestModel"
2057
ModelName       "BestModel"
2057
ModeLine        "1680x1050" 146.2 1680 1784 1960 2240 1050 1053 1059 1089
2058
ModeLine        "1680x1050" 146.2 1680 1784 1960 2240 1050 1053 1059 1089
2058
Option          "DPMS"
2059
Option          "DPMS"
2059
EndSection</programlisting>
2060
EndSection</programlisting>
2060
2061
2061
	<para>Now having completed these simple editing steps, X
2062
	<para>Now having completed these simple editing steps, X
2062
	  should start on your new widescreen monitor.</para>
2063
	  should start on your new widescreen monitor.</para>
2063
      </sect2>
2064
      </sect2>
2064
2065
2065
      <sect2 xml:id="compiz-troubleshooting">
2066
      <sect2 xml:id="compiz-troubleshooting">
2066
	<title>Troubleshooting Compiz&nbsp;Fusion</title>
2067
	<title>Troubleshooting Compiz&nbsp;Fusion</title>
2067
2068
2068
	<qandaset>
2069
	<qandaset>
2069
	  <qandaentry>
2070
	  <qandaentry>
2070
	    <question xml:id="no-decorations">
2071
	    <question xml:id="no-decorations">
2071
	      <para>I have installed
2072
	      <para>I have installed
2072
		<application>Compiz&nbsp;Fusion</application>, and
2073
		<application>Compiz&nbsp;Fusion</application>, and
2073
		after running the commands you mention, my windows are
2074
		after running the commands you mention, my windows are
2074
		left without title bars and buttons.  What is
2075
		left without title bars and buttons.  What is
2075
		wrong?</para>
2076
		wrong?</para>
2076
	    </question>
2077
	    </question>
2077
2078
2078
	    <answer>
2079
	    <answer>
2079
	      <para>You are probably missing a setting in
2080
	      <para>You are probably missing a setting in
2080
		<filename>/etc/X11/xorg.conf</filename>.  Review this
2081
		<filename>/etc/X11/xorg.conf</filename>.  Review this
2081
		file carefully and check especially the
2082
		file carefully and check especially the
2082
		<literal>DefaultDepth</literal> and
2083
		<literal>DefaultDepth</literal> and
2083
		<literal>AddARGBGLXVisuals</literal>
2084
		<literal>AddARGBGLXVisuals</literal>
2084
		directives.</para>
2085
		directives.</para>
2085
	    </answer>
2086
	    </answer>
2086
	  </qandaentry>
2087
	  </qandaentry>
2087
2088
2088
	  <qandaentry>
2089
	  <qandaentry>
2089
	    <question xml:id="xorg-crash">
2090
	    <question xml:id="xorg-crash">
2090
	      <para>When I run the command to start
2091
	      <para>When I run the command to start
2091
		<application>Compiz&nbsp;Fusion</application>, the X
2092
		<application>Compiz&nbsp;Fusion</application>, the X
2092
		server crashes and I am back at the console.  What is
2093
		server crashes and I am back at the console.  What is
2093
		wrong?</para>
2094
		wrong?</para>
2094
	    </question>
2095
	    </question>
2095
2096
2096
	    <answer>
2097
	    <answer>
2097
	      <para>If you check
2098
	      <para>If you check
2098
		<filename>/var/log/Xorg.0.log</filename>, you
2099
		<filename>/var/log/Xorg.0.log</filename>, you
2099
		will probably find error messages during the X
2100
		will probably find error messages during the X
2100
		startup.  The most common would be:</para>
2101
		startup.  The most common would be:</para>
2101
2102
2102
	      <screen>(EE) NVIDIA(0):     Failed to initialize the GLX module; please check in your X
2103
	      <screen>(EE) NVIDIA(0):     Failed to initialize the GLX module; please check in your X
2103
(EE) NVIDIA(0):     log file that the GLX module has been loaded in your X
2104
(EE) NVIDIA(0):     log file that the GLX module has been loaded in your X
2104
(EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If
2105
(EE) NVIDIA(0):     server, and that the module is the NVIDIA GLX module.  If
2105
(EE) NVIDIA(0):     you continue to encounter problems, Please try
2106
(EE) NVIDIA(0):     you continue to encounter problems, Please try
2106
(EE) NVIDIA(0):     reinstalling the NVIDIA driver.</screen>
2107
(EE) NVIDIA(0):     reinstalling the NVIDIA driver.</screen>
2107
2108
2108
	    <para>This is usually the case when you upgrade
2109
	    <para>This is usually the case when you upgrade
2109
	      <application>&xorg;</application>.  You will need to
2110
	      <application>&xorg;</application>.  You will need to
2110
	      reinstall the <package>x11/nvidia-driver</package>
2111
	      reinstall the <package>x11/nvidia-driver</package>
2111
	      package so glx is built again.</para>
2112
	      package so glx is built again.</para>
2112
	  </answer>
2113
	  </answer>
2113
	</qandaentry>
2114
	</qandaentry>
2114
      </qandaset>
2115
      </qandaset>
2115
    </sect2>
2116
    </sect2>
2116
  </sect1>
2117
  </sect1>
2117
</chapter>
2118
</chapter>

Return to bug 207347