Annotation of htdocs/docs/x/index.html, Revision 1.59
1.19 jym 1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
1.1 dsieger 2: <html>
3: <head>
4: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
5: <meta name="generator" content="Website XSL Stylesheet V2.6.0">
6: <link rel="home" href="../../." title="Welcome to The NetBSD Project: Of course it runs NetBSD.">
7: <link rel="up" href="../../docs/." title="NetBSD Documentation">
8: <link rel="previous" href="../../docs/vmware.html" title="NetBSD Documentation: Running VMWare on NetBSD">
9: <link rel="next" href="../../donations/." title="Donations to The NetBSD Foundation">
10: <link rel="first" href="../../docs/Hardware/." title="Hardware Documentation">
1.11 dsieger 11: <link rel="stylesheet" href="../../global.css" type="text/css">
1.1 dsieger 12:
13:
14: <title>NetBSD Documentation: The X Window System</title>
15: </head>
16: <body class="website"><div class="webpage">
1.54 maya 17: <a name="docs-x-index"></a><div id="top"><a href="#mainContent" id="skiplink" tabindex="1">Skip to main content.</a></div>
1.37 maya 18: <div id="centralHeader"><div id="logo">
1.23 jym 19: <a href="../../"><img alt="[NetBSD Logo]" src="../../images/NetBSD-smaller.png"></a><div id="name"><a href="../../">
1.21 jym 20: The NetBSD Project
1.23 jym 21: </a></div>
22: <div id="slogan"><a href="../../">
1.21 jym 23: “Of course it runs NetBSD”
1.23 jym 24: </a></div>
1.37 maya 25: </div></div>
1.38 maya 26: <input id="hamburger" type="checkbox"><label class="menuicon" for="hamburger"><span></span></label><div id="navBar" role="navigation">
1.6 dsieger 27: <span class="doNotDisplay">
28: Navigation:
1.19 jym 29: </span><ul>
30: <li><a href="../../">
31: Home</a></li>
32: <li>
33: <a href="../../">
1.22 wiz 34: News & Media</a><ul>
1.19 jym 35: <li><a href="../../changes/">
36: Recent changes</a></li>
1.40 maya 37: <li><a href="//blog.NetBSD.org/">
1.19 jym 38: NetBSD blog</a></li>
39: <li><a href="../../gallery/events.html">
40: Events</a></li>
41: </ul>
42: </li>
43: <li>
44: <a href="../../about/">
45: About</a><ul>
46: <li><a href="../../about/">
47: NetBSD</a></li>
1.49 maya 48: <li><a href="../../people/developers.html">
49: NetBSD developers</a></li>
1.19 jym 50: <li><a href="../../gallery/">
1.57 leot 51: Gallery</a></li>
1.19 jym 52: </ul>
53: </li>
54: <li>
55: <a href="../../docs/">
56: Documentation</a><ul>
57: <li><a href="../../docs/misc/index.html">
58: FAQ & HOWTOs</a></li>
59: <li><a href="../../docs/guide/en/">
60: The Guide</a></li>
1.58 reed 61: <li><a href="https://man.NetBSD.org/">
1.19 jym 62: Manual pages</a></li>
1.40 maya 63: <li><a href="//wiki.NetBSD.org/">
1.19 jym 64: Wiki</a></li>
65: </ul>
66: </li>
67: <li>
68: <a href="../../support/">
69: Support</a><ul>
70: <li><a href="../../support/send-pr.html">
71: Problem report guide</a></li>
72: <li><a href="../../cgi-bin/sendpr.cgi?gndb=netbsd">
73: Report a bug</a></li>
74: <li><a href="../../support/query-pr.html">
75: Query bug database</a></li>
76: <li><a href="../../support/security/">
77: Security</a></li>
78: </ul>
79: </li>
80: <li>
81: <a href="../../community/">
82: Community</a><ul>
83: <li><a href="../../mailinglists/">
84: Mailing lists</a></li>
1.40 maya 85: <li><a href="//mail-index.NetBSD.org/">
1.19 jym 86: List archives</a></li>
87: </ul>
88: </li>
89: <li>
90: <a href="../../developers/">
91: Developers</a><ul>
1.43 maya 92: <li><a href="http://cvsweb.NetBSD.org/">
1.19 jym 93: Browse source</a></li>
1.40 maya 94: <li><a href="//nxr.NetBSD.org/">
1.19 jym 95: Cross-reference</a></li>
1.40 maya 96: <li><a href="//releng.NetBSD.org/">
1.19 jym 97: Release engineering</a></li>
1.40 maya 98: <li><a href="//wiki.NetBSD.org/projects/">
1.19 jym 99: Projects list</a></li>
100: </ul>
101: </li>
102: <li>
103: <a href="../../ports/">
104: Ports</a><ul>
105: <li><a href="../../ports/history.html">
106: History</a></li>
107: <li><a href="../../ports/emulators.html">
108: Emulators</a></li>
109: </ul>
110: </li>
111: <li>
1.40 maya 112: <a href="//www.pkgsrc.org/">
1.19 jym 113: Packages</a><ul>
1.41 maya 114: <li><a href="http://www.pkgsrc.se/">
1.19 jym 115: Browse packages</a></li>
1.40 maya 116: <li><a href="//releng.NetBSD.org/index-pkgsrc.html">
1.19 jym 117: Release engineering</a></li>
118: </ul>
119: </li>
120: </ul>
1.3 dsieger 121: </div>
1.53 maya 122: <div id="content"><div id="mainContent" class="fullWidth"><div class="rowOfBoxes">
1.3 dsieger 123: <h1>NetBSD Documentation: The X Window System</h1>
1.16 spz 124: <div class="sect1">
1.15 snj 125: <div class="titlepage"></div>
1.25 tron 126: <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1.15 snj 127: <h3 class="title">Note</h3>Please see the NetBSD Guide's
128: <a class="ulink" href="../guide/en/chap-x.html" target="_top">chapter on X</a> for more
129: information about X.</div>
130: </div>
1.1 dsieger 131: <h3 class="title"><a name="running-x">Running X</a></h3>
132: <ul>
133: <li><a href="#x-keyboard-nocaps">How do I make the Caps key another Control key</a></li>
134: <li><a href="#bypassing_xdm">How to bypass xdm</a></li>
135: <li><a href="#startx_not_found">When I type 'startx' I get the message: startx: Command not found. What's wrong?</a></li>
136: <li><a href="#xinit_not_found">Unable to run X - 'xinit: not found'</a></li>
137: <li><a href="#startx_fails">startx fails -'X connection to: 0.0 broken'</a></li>
138: <li><a href="#xconsole">Console output (such as from 'su') garbles X display.</a></li>
139: <li><a href="#xfree86-docs">XFree86 Documentation</a></li>
140: <li><a href="#which_version">Which version of XFree86 am I running?</a></li>
141: <li><a href="#anti_aliased">How to setup anti-aliased fonts on NetBSD for X11</a></li>
142: <li><a href="#fc-cache">Xft using applications eat CPU cycles, but don't appear
143: to do anything!</a></li>
144: <li><a href="#font-error">'No fonts found' - what does this mean?</a></li>
145: <li><a href="#x_wm">How do I change the default window manager?</a></li>
146: </ul>
147: <h3 class="title"><a name="compiling-programs">Compiling programs</a></h3>
148: <ul>
149: <li><a href="#compile_fails_xm">Compile fails - 'unable to locate libXm'</a></li>
150: <li><a href="#compile_fails_xpm">Compile fails - 'unable to locate xpm.h', or '-lXpm: no match'</a></li>
151: <li><a href="#compile_basic">Compile fails to link: Undefined symbol '_XOpenDisplay'</a></li>
152: </ul>
153: <hr>
154: <h3 class="title">Running X</h3>
155: <h4 class="title">
1.50 maya 156: <a name="x-keyboard-nocaps"></a>How do I make the Caps key another Control key</h4>
1.1 dsieger 157:
158: <p>For XFree 3.x (as shipped with NetBSD 1.l5), add
1.16 spz 159: <span class="quote">“<span class="quote"><code class="code">XkbOptions "ctrl:nocaps"</code></span>”</span> if you
1.1 dsieger 160: want the caps-lock key become a second control-key. If you
161: want to use the "Windows" keys on your keyboard, you can get
162: some useful keysyms for them by using
1.16 spz 163: <span class="quote">“<span class="quote"><code class="code">XkbModel "pc105"</code></span>”</span> instead.</p>
1.1 dsieger 164:
165: <p>XFree 4.x uses a different config file format. For it,
166: put
167: </p>
168: <pre class="programlisting">Option "XkbOptions" "ctrl:nocaps"</pre>
169: <p>
170: into the "InputDevice" section of your XF86Config file.</p>
171:
172: <h4 class="title">
1.50 maya 173: <a name="bypassing_xdm"></a>How to bypass xdm</h4>
1.1 dsieger 174:
1.58 reed 175: <p>If <a href="https://netbsd.gw.com/cgi-bin/man-cgi?xdm+1.i386+NetBSD-8.1">xdm(1)</a> is enabled but you are unable to login
1.1 dsieger 176: for some reason, possibly because there is no root password,
177: and you do not have virtual consoles enabled (or they are
178: not yet supported on your port), you can either press ^C at
179: the immediately after the boot messages indicate xdm is
180: starting, or:</p>
181:
1.25 tron 182: <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
1.16 spz 183: <li class="listitem">Boot to single user mode - Usually this is
1.1 dsieger 184: accomplished by passing '-s' at the end of the boot
185: command.</li>
1.16 spz 186: <li class="listitem">Start the shell - Press <code class="code">ENTER</code> when
1.1 dsieger 187: prompted for the shell.</li>
1.58 reed 188: <li class="listitem">Check and mount the disks using <a href="https://netbsd.gw.com/cgi-bin/man-cgi?fsck+8.i386+NetBSD-8.1">fsck(8)</a> and
189: <a href="https://netbsd.gw.com/cgi-bin/man-cgi?mount+8.i386+NetBSD-8.1">mount(8)</a> - <code class="code">fsck -p ; mount -vat ffs</code>
1.1 dsieger 190: </li>
1.16 spz 191: <li class="listitem">Set term terminal type -
1.1 dsieger 192: <code class="code">TERM=<span class="emphasis"><em>vt100</em></span> ; export TERM</code>
193: Note: you may need to use a different terminal type such
194: as 'pc3' or 'sun'.</li>
1.16 spz 195: <li class="listitem">Fix problem - Edit
1.1 dsieger 196: <code class="filename">/etc/rc.conf</code> to disable xdm, run
1.58 reed 197: <a href="https://netbsd.gw.com/cgi-bin/man-cgi?passwd+1.i386+NetBSD-8.1">passwd(1)</a> to set root's password, or take whatever
1.1 dsieger 198: other corrective action is needed</li>
199: </ul></div>
200:
201: <h4 class="title">
1.50 maya 202: <a name="startx_not_found"></a>When I type '<span class="bold"><strong><code class="code">startx</code></strong></span>' I get the message: <code class="code">startx: Command not found.</code> What's wrong?</h4>
1.1 dsieger 203: <p>You need to add the location of the X binaries to your
1.58 reed 204: shell's <code class="code">path</code> variable. For <a href="https://netbsd.gw.com/cgi-bin/man-cgi?csh+1.i386+NetBSD-8.1">csh(1)</a> and its
1.1 dsieger 205: derivatives, add <code class="filename">/usr/X11R6/bin</code>
206: to the line in your <code class="filename">.cshrc</code> file which
207: sets the <code class="code">path</code> variable. For <code class="code">sh</code> and
208: its derivatives, you'll need to modify you
209: <code class="filename">.profile</code> instead.</p>
210:
211: <h4 class="title">
1.50 maya 212: <a name="xinit_not_found"></a>Unable to run X - '<span class="bold"><strong>xinit: not found</strong></span>'</h4>
1.1 dsieger 213:
214: <p>You need <code class="filename">/usr/X11R6/bin</code> in your
215: path. As root add '<span class="bold"><strong><code class="code">set path = ( $path /usr/X11R6/bin )</code></strong></span>'
216: to <code class="filename">/etc/csh.cshrc</code>, and start a new
217: shell.</p>
218:
219: <h4 class="title">
1.50 maya 220: <a name="startx_fails"></a>startx fails -'<span class="bold"><strong>X connection to: 0.0 broken</strong></span>'</h4>
1.1 dsieger 221:
222: <p>To see the error messages in this case, run:
223:
224: </p>
1.25 tron 225: <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
1.58 reed 226: <li class="listitem">If your shell is <a href="https://netbsd.gw.com/cgi-bin/man-cgi?csh+1.i386+NetBSD-8.1">csh(1)</a> or
1.44 maya 227: <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/shells/tcsh/README.html" target="_top"><code class="filename">shells/tcsh</code></a>:
1.1 dsieger 228: <pre class="programlisting">startx >& ~/x.log</pre>
229: </li>
1.58 reed 230: <li class="listitem">If your shell is <a href="https://netbsd.gw.com/cgi-bin/man-cgi?sh+1.i386+NetBSD-8.1">sh(1)</a>, <a href="https://netbsd.gw.com/cgi-bin/man-cgi?ksh+1.i386+NetBSD-8.1">ksh(1)</a>, or similar:
1.1 dsieger 231: <pre class="programlisting">startx > ~/x.log 2>&1</pre>
232: </li>
233: </ul></div>
234: <p>
235: Then view <code class="filename">~/x.log</code></p>
236:
237: <h4 class="title">
1.50 maya 238: <a name="xconsole"></a>Console output (such as from 'su') garbles X display.</h4>
1.1 dsieger 239:
240: <p>The system is outputting a line to the console
241: indicating something has happened (such as 'su'). You should
1.58 reed 242: really run <a href="https://netbsd.gw.com/cgi-bin/man-cgi?xconsole+1.i386+NetBSD-8.1">xconsole(1)</a> or one 'xterm -C' to capture
1.1 dsieger 243: this console output.</p>
244:
245: <p>You may need to ensure your kernel is compiled with the
246: following enabled:
247: </p>
248: <pre class="programlisting">options UCONSOLE # allow anyone to steal the virtual console</pre>
249: <p>
1.11 dsieger 250: See <a class="ulink" href="../kernel/#how_to_build_a_kernel" target="_top">How to build a kernel</a>
1.1 dsieger 251: for details on how to build your own kernels.</p>
252:
253: <p>If you're logged in as root, and get annoying
254: <code class="code">portmap</code> notices, you may wish to look at the
1.11 dsieger 255: <a class="ulink" href="../misc/#portmap-messup" target="_top">FAQ entry</a>
1.1 dsieger 256: on how to turn those messages off.</p>
257:
258: <h4 class="title">
1.50 maya 259: <a name="xfree86-docs"></a><a class="ulink" href="http://www.xfree86.org/sos/resources.html" target="_top">XFree86 Documentation</a>
260: </h4>
1.1 dsieger 261:
262: <h4 class="title">
1.50 maya 263: <a name="which_version"></a>Which version of XFree86 am I running?</h4>
1.1 dsieger 264:
265: <p>To quickly tell which version of the X server you are
1.58 reed 266: running, you can use <a href="https://netbsd.gw.com/cgi-bin/man-cgi?xdpyinfo+1.i386+NetBSD-8.1">xdpyinfo(1)</a>. E.g.:
1.1 dsieger 267: </p>
268: <pre class="programlisting">$ xdpyinfo | grep release
269: vendor release number: 335</pre>
270: <p>
271:
272: In the case of XFree86, this tells us that the server
273: version is 3.3.5.</p>
274:
275: <h4 class="title">
1.50 maya 276: <a name="anti_aliased"></a>How to setup anti-aliased fonts on NetBSD for X11</h4>
1.1 dsieger 277:
1.25 tron 278: <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
1.1 dsieger 279: <h3 class="title">Note</h3>
280: <p>
281: The paths below should be adjusted appropriately if using
1.44 maya 282: <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/pkgtools/xpkgwedge/README.html" target="_top"><code class="filename">pkgtools/xpkgwedge</code></a>.
1.1 dsieger 283: </p>
284: </div>
285:
1.16 spz 286: <div class="orderedlist"><ol class="orderedlist" type="1">
287: <li class="listitem">
1.1 dsieger 288: <p>
289: Install the
1.44 maya 290: <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/fonts/ms-ttf/README.html" target="_top"><code class="filename">fonts/ms-ttf</code></a> package from pkgsrc.
1.1 dsieger 291: If you use the pkgsrc version of X, install also the
1.44 maya 292: <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/fonts/mkfontscale/README.html" target="_top"><code class="filename">fonts/mkfontscale</code></a> and
293: <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/fonts/fontconfig/README.html" target="_top"><code class="filename">fonts/fontconfig</code></a> packages.
1.1 dsieger 294: </p>
295: </li>
1.16 spz 296: <li class="listitem">
1.1 dsieger 297:
298: <p>
299: If using the XFree86 shipped with NetBSD, you may consider
1.44 maya 300: using <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/fonts/fontconfig/README.html" target="_top"><code class="filename">fonts/fontconfig</code></a> from pkgsrc
1.1 dsieger 301: as it offers more tweaking options. Set the variable <code class="varname">
302: PREFER.fontconfig</code> to pkgsrc in the <code class="filename">/etc/mk.conf
303: </code> file to ensure that the pkgsrc version is used in
304: favour of the shipped (or native) version:
305: </p>
306: <pre class="programlisting">
307: PREFER.fontconfig=pkgsrc
308: </pre>
309: <p>
310: </p>
311:
312: <p>
313: You may also want to instruct fontconfig to never use
314: <span class="emphasis"><em>bitmap fonts</em></span> again:
315: </p>
316: <pre class="programlisting">
317: # cd /usr/pkg/etc/fontconfig/conf.d
318: # ln -s ../../../share/examples/fontconfig/conf.avail/70-no-bitmaps.conf .
319: </pre>
320: <p>
321: </p>
322:
323: <p>
324: You may wish to replace the native fontconfig libraries entirely,
325: which is useful should you have any previously-compiled binaries
326: that used it.
327: </p>
328: <pre class="programlisting">
329: # cd /usr/X11R6/lib
330: # mv libfontconfig.so.1.0 libfontconfig.so.1.0.old
331: # rm libfontconfig.so.1
332: # ln -s ../../pkg/lib/libfontconfig.so.1 .
333: # cd /usr/X11R6/bin
334: # mv fc-cache fc-cache.old
335: # mv fc-list fc-list.old
336: </pre>
337: <p>
338: </p>
339:
340: </li>
1.16 spz 341: <li class="listitem">
1.1 dsieger 342: <p>
343: To configure fontconfig, add the following line to your
344: local.conf. This file is generally found in
345: <code class="filename">/etc/fonts/local.conf</code>.
346: If you installed the fonts/fontconfig package, you will
347: <span class="bold"><strong>also</strong></span> need to add the line to
348: <code class="filename">/usr/pkg/etc/fonts/local.conf</code>
349: (or replace one with a symbolic link to another):
350: </p>
351: <pre class="programlisting">
352: <dir>/usr/pkg/lib/X11/fonts/TTF</dir>
353: </pre>
354: <p>
355: </p>
356:
357: <p>
358: The <code class="filename">local.conf</code> file may look like this:
359: </p>
360: <pre class="programlisting">
361: <?xml version="1.0"?>
362: <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
363: <fontconfig>
364: <dir>/usr/pkg/lib/X11/fonts/TTF</dir>
365: </fontconfig>
366: </pre>
367: <p>
368: </p>
369:
370: <p>
371: You can also add other directories containing fonts to the
372: <code class="filename">local.conf</code> file. The following lines are
373: for using teTeX-3.0 and ghostscript fonts:
374: </p>
375: <pre class="programlisting">
376: <dir>/usr/pkg/share/texmf-dist/fonts/</dir>
377: <dir>/usr/pkg/share/ghostscript/fonts</dir>
378: </pre>
379: <p>
380: </p>
381:
382: </li>
1.16 spz 383: <li class="listitem">
1.1 dsieger 384: <p>
385: Rebuild the font cache for applications that use fontconfig
386: </p>
387: <pre class="programlisting">
388: # fc-cache -v
389: </pre>
390: <p>
391: Depending on your hardware this may take a long time.
392: </p>
393: </li>
1.16 spz 394: <li class="listitem">
1.1 dsieger 395: <p>
396: Run the following commands:
397: </p>
398: <pre class="programlisting">
399: # mkfontscale /usr/pkg/lib/X11/fonts/TTF
400: # mkfontdir /usr/pkg/lib/X11/fonts/TTF
401: </pre>
402: <p>
403: There should now be the files <code class="filename">fonts.dir</code> and
404: <code class="filename">fonts.scale</code> in the TTF font directory.
405: </p>
406: </li>
1.16 spz 407: <li class="listitem">
1.1 dsieger 408: <p>Configure the X server:
409: </p>
1.25 tron 410: <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
1.16 spz 411: <li class="listitem">
412: <p> In the <span class="quote">“<span class="quote">Module</span>”</span> section, make sure that the following exists:
1.1 dsieger 413: </p>
414: <pre class="programlisting">
415: Load "type1"
416: Load "freetype"
417: </pre>
418: <p>
419: </p>
420: </li>
1.16 spz 421: <li class="listitem">
1.1 dsieger 422: <p>
1.16 spz 423: In the <span class="quote">“<span class="quote">Files</span>”</span> section, verify the order of
1.1 dsieger 424: the font paths. Verify that the TTF and Type1
425: font paths are before the rest:
426: </p>
427: <pre class="programlisting">
428: FontPath "/usr/X11R6/lib/X11/fonts/local/"
429: FontPath "/usr/pkg/lib/X11/fonts/TTF"
430: FontPath "/usr/X11R6/lib/X11/fonts/Type1/"
431: FontPath "/usr/X11R6/lib/X11/fonts/misc/"
432: FontPath "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
433: FontPath "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
434: FontPath "/usr/X11R6/lib/X11/fonts/75dpi/"
435: FontPath "/usr/X11R6/lib/X11/fonts/100dpi/"</pre>
436: <p>
437: </p>
438:
439: <p>
440: To apply the changes to the current X session, instead of
441: restarting X, run the following command
442: </p>
443: <pre class="programlisting">
444: # xset fp rehash
445: </pre>
446: <p>
447: This will examine newly added font paths for changes.
448: </p>
449:
450: <p>
1.16 spz 451: Instead of adding <span class="quote">“<span class="quote">FontPath</span>”</span> directives to the X configuration file,
1.1 dsieger 452: you can run the following commands from
453: <code class="filename">~/.xinitrc</code>
454: (or <code class="filename">~/.xsession</code>) file:
455: </p>
456: <pre class="programlisting">
457: xset +fp /usr/X11R6/lib/X11/fonts/Type1
458: xset +fp /usr/pkg/lib/X11/fonts/TTF
459: xset +fp /usr/X11R6/lib/X11/fonts/local
460: </pre>
461: <p>
462: </p>
463:
464: </li>
465: </ul></div>
466: <p>
467: </p>
468: </li>
1.16 spz 469: <li class="listitem">
1.1 dsieger 470: <p>That's it! Run the following commands to test the configuration.
471: </p>
472: <pre class="programlisting">
473: $ xterm -ls -fg gray -bg black -ls -fa 'Courier New:bold' -fs 10
474: </pre>
475: <p>
476: </p>
477:
478: <p>
479: Run the command <strong class="userinput"><code>fc-list</code></strong> it should list
480: the fonts available, and shouldn't dump core!
481: </p>
482:
483: <p>
484: While the xterm command from above only tests the fontconfig part, the following
485: command will test the XLFD-style access:
486: </p>
487: <pre class="programlisting">
488: $ xterm -fn '-monotype-Courier New-medium-r-normal--0-0-0-0-m-0-iso8859-1'
489: </pre>
490: <p>
491: </p>
492:
493: <p>
494: Another test is that the following should show multiple fonts:
495: </p>
496: <pre class="programlisting">
497: $ xlsfonts | grep -i 'courier new'
498: </pre>
499: <p>
500: </p>
501:
502: </li>
1.16 spz 503: <li class="listitem">
1.1 dsieger 504: <p>
505: You can find other TTF font packages under pkgsrc/fonts.
1.44 maya 506: For example <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/fonts/vera-ttf/README.html" target="_top"><code class="filename">fonts/vera-ttf</code></a>
1.1 dsieger 507: </p>
508: </li>
509: </ol></div>
510:
511:
512: <h4 class="title">
513: <a name="fc-cache"></a>Xft using applications eat CPU cycles, but don't appear
1.50 maya 514: to do anything!</h4>
1.1 dsieger 515:
516: <p>It is possible that the application in question is
517: computing the font information that should have been
518: prepared by fc-cache - re-run '<code class="code">fc-cache -v</code>' to
519: make sure the information in the cache is up-to-date.</p>
520:
521: <h4 class="title">
1.50 maya 522: <a name="font-error"></a>'No fonts found' - what does this mean?</h4>
1.1 dsieger 523:
524: <pre class="programlisting">No fonts found; this probably means that the fontconfig
525: library is not correctly configured. You may need to
526: edit the fonts.conf configuration file. More information
1.58 reed 527: about fontconfig can be found in the <a href="https://netbsd.gw.com/cgi-bin/man-cgi?fontconfig+3.i386+NetBSD-8.1">fontconfig(3)</a> manual
1.11 dsieger 528: page and on <a class="ulink" href="http://fontconfig.org" target="_top">http://fontconfig.org</a></pre>
1.1 dsieger 529:
530: <p>You haven't run '<code class="code">fc-cache -v</code>' like the
1.44 maya 531: <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/fonts/fontconfig/README.html" target="_top"><code class="filename">fonts/fontconfig</code></a>
1.11 dsieger 532: <a class="ulink" href="ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/fonts/fontconfig/MESSAGE" target="_top">MESSAGE</a>
1.1 dsieger 533: suggests during installation. For details, see
1.11 dsieger 534: '<code class="code">pkg_info -D fontconfig</code>' and <a class="ulink" href="#anti_aliased" target="_top">above</a>.</p>
1.1 dsieger 535:
536: <h4 class="title">
1.50 maya 537: <a name="x_wm"></a>How do I change the default window manager?</h4>
1.1 dsieger 538:
539: <p>First thing to do is to install the window manager you
540: prefer. You can find a lot of them, ready to install, in
1.44 maya 541: pkgsrc's <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/wm/README.html" target="_top"><code class="filename">wm</code></a> category. After
1.1 dsieger 542: a successful installation, figure out how is the
543: binary named. It will usually match package's name.</p>
544:
545: <p>Once you know how to execute the window manager, you
546: have to configure your X session to start it up. We will be
547: using twm in our examples (which comes with X), whose binary
548: is named <code class="code">twm</code>:</p>
549:
1.25 tron 550: <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
1.58 reed 551: <li class="listitem">If you are using <a href="https://netbsd.gw.com/cgi-bin/man-cgi?startx+1.i386+NetBSD-8.1">startx(1)</a>, edit the
1.1 dsieger 552: <code class="filename">~/.xinitrc</code> file and
553: append the following line to it:
554: <code class="code">exec twm</code>
555: </li>
1.58 reed 556: <li class="listitem">If you are using <a href="https://netbsd.gw.com/cgi-bin/man-cgi?xdm+1.i386+NetBSD-8.1">xdm(1)</a>, edit the
1.1 dsieger 557: <code class="filename">~/.xsession</code> file and append the
558: following line to it:
559: <code class="code">exec twm</code>
560: </li>
561: </ul></div>
562:
563: <p>You can see that the content for each file is the same,
564: so you may want to create a link between them.</p>
565: <hr>
566: <h3 class="title">Compiling programs</h3>
567: <h4 class="title">
1.50 maya 568: <a name="compile_fails_xm"></a>Compile fails - 'unable to locate libXm'</h4>
1.1 dsieger 569:
570: <p>Xm does not come with the standard X11 environment. It is
1.11 dsieger 571: part of <a class="ulink" href="http://www.opengroup.org/desktop/motif/" target="_top">Motif</a>,
1.1 dsieger 572: which is a commercial graphical user interface.</p>
573:
1.11 dsieger 574: <p>A freeware implementation of Motif called <a class="ulink" href="http://www.lesstif.org/" target="_top">Lesstif</a> is also available.
575: It is available as part of the <a class="ulink" href="../software/packages.html" target="_top">NetBSD packages collection</a>,
1.44 maya 576: under <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/x11/lesstif/README.html" target="_top"><code class="filename">x11/lesstif</code></a>.</p>
1.1 dsieger 577:
578: <h4 class="title">
1.50 maya 579: <a name="compile_fails_xpm"></a>Compile fails - 'unable to locate xpm.h', or '-lXpm: no match'</h4>
1.1 dsieger 580:
581: <p><code class="filename">xpm.h</code> is part of the X PixMap
582: library, used by many programs to allow more multi (than
583: two) colour icons.
1.11 dsieger 584: It is available as part of the <a class="ulink" href="../software/packages.html" target="_top">NetBSD packages collection</a>,
1.44 maya 585: under <a href="https://cdn.NetBSD.org/pub/pkgsrc/current/pkgsrc/graphics/xpm/README.html" target="_top"><code class="filename">graphics/xpm</code></a></p>
1.1 dsieger 586:
587: <h4 class="title">
1.50 maya 588: <a name="compile_basic"></a>Compile fails to link: Undefined symbol '_XOpenDisplay'</h4>
1.1 dsieger 589:
590: <p>If it is a third party item of software, you should
1.11 dsieger 591: check if a version is available via the <a class="ulink" href="../software/packages.html" target="_top">NetBSD packages collection</a>.
1.1 dsieger 592: If you are writing you own code you need to ensure you link
593: against the necessary X libraries. In this case, add
594: <code class="code">-L/usr/X11R6 -lX11</code> to the end of your link
595: line.</p>
1.3 dsieger 596: <hr>Back to <em><a href="../">NetBSD Documentation</a></em>
597: </div></div></div>
598: <div class="navfoot"></div>
1.13 mishka 599: <div id="footer"><div id="footerContent"><center>
1.40 maya 600: <span class="footfeed"><a href="//www.NetBSD.org/cgi-bin/feedback.cgi">
1.3 dsieger 601: Contact</a> |
1.9 kano 602: </span><span class="footcopy"><a href="../../about/disclaimer.html">
1.3 dsieger 603: Disclaimer</a> |
604:
1.59 ! leot 605: <span class="copyright">Copyright © 1994-2020 The NetBSD Foundation, Inc. </span>ALL RIGHTS RESERVED.<br>NetBSD<sup>®</sup> is a registered trademark of The NetBSD
1.3 dsieger 606: Foundation, Inc.</span>
1.13 mishka 607: </center></div></div>
1.1 dsieger 608: </div></body>
609: </html>
CVSweb <webmaster@jp.NetBSD.org>