1xfs(1) General Commands Manual xfs(1)
2
3
4
6 xfs - X font server
7
9 xfs [ -config configuration_file ] [ -daemon ] [ -droppriv ] [ -inetd ]
10 [ -ls listen_socket ] [ -nodaemon ] [ -port tcp_port ] [ -user username
11 ] [ -version ]
12
14 xfs is the X Window System font server. It supplies fonts to X Window
15 System display servers. The server is usually run by a system adminis‐
16 trator, and started via init(8) or inetd(8). Users may also wish to
17 start private font servers for specific sets of fonts.
18
19 To connect to a font server, see the documentation for your X server;
20 it likely supports the syntax documented in the “FONT SERVER NAMES”
21 section of X(7).
22
24 -config configuration_file
25 specifies the configuration file xfs will use. If this parame‐
26 ter is not specified, xfs will read its configuration from the
27 default file, /etc/X11/fs/config.
28
29 -daemon
30 instructs xfs to fork and go into the background automatically
31 at startup. If this option is not specified, xfs will run as a
32 regular process (unless it was built to daemonize by default).
33 When running as a daemon, xfs will attempt to create a file in
34 which it stores its process ID, and will delete that file upon
35 exit;
36
37 -droppriv
38 instructs xfs to attempt to run as user and group xfs (unless
39 the -user option is used). This has been implemented for secu‐
40 rity reasons, as xfs may have undiscovered buffer overflows or
41 other paths for possible exploit, both local and remote. When
42 using this option, you may also wish to specify ‘no-listen =
43 tcp’ in the config file, which ensures that xfs will not to use
44 a TCP port at all. By default, xfs runs with the user and group
45 IDs of the user who invoked it.
46
47 -inetd informs xfs that it is being started by inetd, and that a lis‐
48 tening socket on the appropriate port is being passed as stan‐
49 dard input. Assumes that inetd is configured to "wait" mode,
50 and will thus allow xfs to handle listening for and accepting
51 further connections on this port. This allows xfs to be
52 started on demand when the first font client connects. When
53 using this option, the -daemon and -port flags are ignored.
54
55 -ls listen_socket
56 specifies a file descriptor which is already set up to be used
57 as the listen socket. This option is only intended to be used
58 by the font server itself when automatically spawning another
59 copy of itself to handle additional connections.
60
61 -nodaemon
62 instructs xfs not to daemonize (fork and detach from its con‐
63 trolling terminal). This option only has an effect if xfs is
64 built to daemonize by default, which is not the stock configura‐
65 tion.
66
67 -port tcp_port
68 specifies the TCP port number on which the server will listen
69 for connections. The default port number is 7100. This option
70 is ignored if xfs is configured to not listen to TCP transports
71 at all (see “Configuration File Format” below).
72
73 -user username
74 instructs xfs to run as the user username. See -droppriv for
75 why this may be desired. By default, xfs runs with the user and
76 group IDs of the user who invoked it.
77
78 -version
79 instructs xfs to print the program version and exit.
80
82 xfs reads and serves any font file format recognized by the X server
83 itself. It locates font files through the specification of a cata‐
84 logue, which is declared in xfs's configuration file.
85
86 Configuration File Format
87 xfs reads its configuration from a text file (see the -config option in
88 the “OPTIONS” section above). The configuration language is a list of
89 keyword and value pairs. Each keyword is followed by an equals sign
90 (‘=’) and then the desired value.
91
92 Recognized keywords include:
93
94 alternate-servers (list of strings)
95 lists alternate servers for this font server. See the “FONT
96 SERVER NAMES” section of X(7) for the syntax of the string.
97
98 catalogue (list of strings)
99 declares as ordered list of font path element names from which
100 fonts will be served. The current implementation only supports
101 a single catalogue ("all") containing all of the specified
102 fonts. A special directory with symlinks to font paths can be
103 specified using a catalogue:<dir> entry. See the CATALOGUE DIR
104 section below for details.
105
106 client-limit (cardinal)
107 determines the number of clients this font server will support
108 before refusing service. This is useful for tuning the load on
109 each individual font server.
110
111 clone-self (boolean)
112 indicates whether this font server should attempt to clone
113 itself when the number of connected clients reaches the
114 client-limit.
115
116 default-point-size (cardinal)
117 The default pointsize (in decipoints) for font requests that
118 don't specify a point size. The default is 120.
119
120 default-resolutions (list of resolutions)
121 indicates the resolutions the server supports by default. This
122 information may be used as a hint for pre-rendering, and substi‐
123 tuted into requests for scaled fonts which do not specify a res‐
124 olution. A resolution is a comma-separated pair of horizontal
125 and vertical resolutions in pixels per inch. Multiple resolu‐
126 tions are separated by commas.
127
128 deferglyphs (string)
129 sets the mode for delayed fetching and caching of glyphs.
130 string should be one of ‘none’, meaning glyphs deferment is dis‐
131 abled, ‘all’, meaning it is enabled for all fonts, and ‘16’,
132 meaning it is enabled only for 16-bit fonts.
133
134 error-file (string)
135 indicates the filename of the error file. All warnings and
136 errors will be logged here, unless use-syslog is set to a true
137 value (see below).
138
139 no-listen (trans-type)
140 disables the specified transport type. For example, TCP/IP con‐
141 nections can be disabled with ‘no-listen = tcp’.
142
143 port (cardinal)
144 indicates the TCP port on which the server will listen for con‐
145 nections.
146
147 use-syslog (boolean)
148 determines whether errors and diagnostics should be reported via
149 syslog(3) (on supported systems) instead of being written to the
150 error-file (see above).
151
153 You can specify a special kind of font path in the form cata‐
154 logue:<dir>. The directory specified after the catalogue: prefix will
155 be scanned for symlinks and each symlink destination will be added as a
156 local fontfile FPE.
157
158 The symlink can be suffixed by attributes such as 'unscaled', which
159 will be passed through to the underlying fontfile FPE. The only excep‐
160 tion is the newly introduced 'pri' attribute, which will be used for
161 ordering the font paths specified by the symlinks.
162
163 An example configuration:
164
165 75dpi:unscaled:pri=20 -> /usr/share/X11/fonts/75dpi
166 ghostscript:pri=60 -> /usr/share/fonts/default/ghostscript
167 misc:unscaled:pri=10 -> /usr/share/X11/fonts/misc
168 type1:pri=40 -> /usr/share/X11/fonts/Type1
169 type1:pri=50 -> /usr/share/fonts/default/Type1
170
171 This will add /usr/share/X11/fonts/misc as the first FPE with the
172 attribute the attribute unscaled etc. This is functionally equivalent
173 to setting the following font path:
174
175 /usr/share/X11/fonts/misc:unscaled,
176 /usr/share/X11/fonts/75dpi:unscaled,
177 /usr/share/X11/fonts/Type1,
178 /usr/share/fonts/default/Type1,
179 /usr/share/fonts/default/ghostscript
180
181 Example Configuration File
182 #
183 # sample font server configuration file
184 #
185
186 # allow a max of 10 clients to connect to this font server.
187 client-limit = 10
188
189 # When a font server reaches the above limit, start up a new one.
190 clone-self = on
191
192 # Identify alternate font servers for clients to use.
193 alternate-servers = hansen:7101,hansen:7102
194
195 # Look for fonts in the following directories. The first is a set of
196 # TrueType outlines, the second is a set of misc bitmaps (such as terminal
197 # and cursor fonts), and the last is a set of 100dpi bitmaps.
198 #
199 catalogue = /usr/share/X11/fonts/TTF,
200 /usr/share/X11/fonts/misc,
201 /usr/share/X11/fonts/100dpi/
202
203 # in 12 points, decipoints
204 default-point-size = 120
205
206 # 100 x 100 and 75 x 75
207 default-resolutions = 100,100,75,75
208
209 # Specify our log filename.
210 error-file = /var/log/xfs.log
211
212 # Direct diagnostics to our own log file instead of using syslog.
213 use-syslog = off
214
216 When operating in daemon mode, xfs sends diagnostic messages (errors
217 and warnings) to the log file specified by the error-file configuration
218 variable by default. However, these messages can be sent to an alter‐
219 nate location via the error-file and use-syslog configuration vari‐
220 ables; see “Configuration File Format”, above.
221
223 xfs handles the following signals specially:
224
225 SIGTERM
226 causes the font server to exit cleanly.
227
228 SIGUSR1
229 causes xfs to re-read its configuration file.
230
231 SIGUSR2
232 causes xfs to flush any cached data it may have.
233
234 SIGHUP causes xfs to reset, closing all active connections and re-read‐
235 ing the configuration file.
236
238 Multiple catalogues should be supported.
239
241 Significant further development of xfs is unlikely. One of the origi‐
242 nal motivations behind it was the single-threaded nature of the X
243 server — a user's X session could seem to ‘freeze up’ while the X
244 server took a moment to rasterize a font. This problem with the X
245 server, which remains single-threaded in all popular implementations to
246 this day, has been mitigated on two fronts: machines have gotten much
247 faster, and client-side font rendering (particularly via the Xft
248 library) is the norm in contemporary software.
249
251 Dave Lemke, Network Computing Devices, Inc
252 Keith Packard, Massachusetts Institute of Technology
253
255 X(7), xfsinfo(1), fslsfonts(1), init(8), inetd(8), syslog(3), The X
256 Font Service Protocol, Font Server Implementation Overview
257
258
259
260X Version 11 xfs 1.2.0 xfs(1)