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