source: networking/netutils/networkmanager.xml@ 4a9054a8

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 4a9054a8 was 4a9054a8, checked in by Douglas R. Reno <renodr@…>, 4 years ago

Update to NetworkManager-1.26.0
Update to gdm-3.36.3

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@23391 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 22.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY NetworkManager-download-http
8"&gnome-download-http;/NetworkManager/&NetworkManager-minor;/NetworkManager-&NetworkManager-version;.tar.xz">
9 <!ENTITY NetworkManager-download-ftp
10"&gnome-download-ftp;/NetworkManager/&NetworkManager-minor;/NetworkManager-&NetworkManager-version;.tar.xz">
11 <!ENTITY NetworkManager-md5sum "c0edbbf98a1ec81eed5a03539610d324">
12 <!ENTITY NetworkManager-size "4.7 MB">
13 <!ENTITY NetworkManager-buildsize "990 MB (with tests)">
14 <!ENTITY NetworkManager-time "0.9 SBU (with tests; both using parallelism=4)">
15]>
16
17<sect1 id="NetworkManager" xreflabel="NetworkManager-&NetworkManager-version;">
18 <?dbhtml filename="networkmanager.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>NetworkManager-&NetworkManager-version;</title>
26
27 <indexterm zone="NetworkManager">
28 <primary sortas="a-NetworkManager">NetworkManager</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to NetworkManager</title>
33
34 <para>
35 <application>NetworkManager</application> is a set of co-operative
36 tools that make networking simple and straightforward. Whether you use WiFi,
37 wired, 3G, or Bluetooth, NetworkManager allows you to quickly move from
38 one network to another: Once a network has been configured and joined
39 once, it can be detected and re-joined automatically the next time it's
40 available.
41 </para>
42
43 &lfs91_checked;
44
45 <note revision="systemd">
46 <para>
47 Make sure that you disable the <command>systemd-networkd</command>
48 service or configure it not to manage the interfaces you want to manage
49 with <application>NetworkManager</application>.
50 </para>
51 </note>
52
53 <bridgehead renderas="sect3">Package Information</bridgehead>
54 <itemizedlist spacing="compact">
55 <listitem>
56 <para>
57 Download (HTTP): <ulink url="&NetworkManager-download-http;"/>
58 </para>
59 </listitem>
60 <listitem>
61 <para>
62 Download (FTP): <ulink url="&NetworkManager-download-ftp;"/>
63 </para>
64 </listitem>
65 <listitem>
66 <para>
67 Download MD5 sum: &NetworkManager-md5sum;
68 </para>
69 </listitem>
70 <listitem>
71 <para>
72 Download size: &NetworkManager-size;
73 </para>
74 </listitem>
75 <listitem>
76 <para>
77 Estimated disk space required: &NetworkManager-buildsize;
78 </para>
79 </listitem>
80 <listitem>
81 <para>
82 Estimated build time: &NetworkManager-time;
83 </para>
84 </listitem>
85 </itemizedlist>
86
87 <bridgehead renderas="sect3">NetworkManager Dependencies</bridgehead>
88
89 <bridgehead renderas="sect4">Required</bridgehead>
90 <para role="required">
91 <xref linkend="dbus-glib"/> and
92 <xref linkend="libndp"/>
93 </para>
94
95 <bridgehead renderas="sect4">Recommended</bridgehead>
96 <para role="recommended">
97 <xref linkend="curl"/>,
98 <xref linkend="dhcpcd"/> or
99 <xref role="nodep" linkend="dhcp"/> (client only),
100 <xref linkend="gobject-introspection"/>,
101 <xref linkend="iptables"/>,
102 <xref linkend="jansson"/>,
103 <xref linkend="newt"/> (for <command>nmtui</command>),
104 <xref linkend="nss"/>,
105 <xref linkend="polkit"/>,
106 <xref linkend="pygobject3"/>,
107 <phrase revision="sysv"><xref linkend="elogind"/>,</phrase>
108 <phrase revision="systemd"><xref linkend="systemd"/>,</phrase>
109 <xref linkend="upower"/>,
110 <xref linkend="vala"/>, and
111 <xref linkend="wpa_supplicant"/> (built with D-Bus support),
112 </para>
113
114 <bridgehead renderas="sect4">Optional</bridgehead>
115 <para role="optional">
116 <xref linkend="bluez"/>,
117 <xref linkend="dbus-python"/> (for the test suite),
118 <!-- <xref linkend="firewalld"/> (For whenever firewalld is reintroduced) -->
119 <xref linkend="gnutls"/> (used if <xref linkend="nss"/> is not found),
120 <xref linkend="gtk-doc"/>,
121 <xref linkend="libpsl"/>,
122 <xref linkend="qt5"/> (for examples),
123 <xref linkend="ModemManager"/>,
124 <xref linkend="valgrind"/>,
125 <ulink url="http://www.thekelleys.org.uk/dnsmasq/doc.html">dnsmasq</ulink>,
126 <ulink url="https://github.com/Distrotech/libaudit">libaudit</ulink>,
127 <ulink url="https://github.com/jpirko/libteam">libteam</ulink>,
128 <ulink url="https://ftp.gnome.org/pub/gnome/sources/mobile-broadband-provider-info/">mobile-broadband-provider-info</ulink>,
129 <ulink url="https://www.samba.org/ftp/ppp/">PPP</ulink>, and
130 <ulink url="https://dianne.skoll.ca/projects/rp-pppoe/">RP-PPPoE</ulink>
131 </para>
132
133 <para condition="html" role="usernotes">User Notes:
134 <ulink url="&blfs-wiki;/NetworkManager"/>
135 </para>
136 </sect2>
137
138 <sect2 role="kernel" id="NetworkManager-kernel">
139 <title>Kernel Configuration</title>
140
141 <para>
142 If you wish to run the tests, enable the following options in the
143 kernel configuration and recompile the kernel if necessary:
144 </para>
145
146 <!-- Ethernet Teaming support is potentially optional, but I didn't
147 run the tests again to test that. It was needed to convince one of
148 the Linux Platform tests to move farther along because otherwise
149 RTNETLINK would respond with an Error 95 - unknown device type.
150 This would cause the test to fail early on in the process. -->
151
152<screen><literal>Device Drivers ---&gt;
153 [*] Network device support [CONFIG_NETDEVICES] ---&gt;
154 [*] Bonding driver support [CONFIG_BONDING]
155 [*] Dummy net driver support [CONFIG_DUMMY]
156 [*] Ethernet team driver support [CONFIG_NET_TEAM]</literal></screen>
157
158 <indexterm zone="NetworkManager NetworkManager-kernel">
159 <primary sortas="d-NetworkManager">NetworkManager</primary>
160 </indexterm>
161 </sect2>
162
163 <sect2 role="installation">
164 <title>Installation of NetworkManager</title>
165
166 <para>
167 If <xref linkend="qt5"/> is installed and the Qt based
168 examples are desired, fix two meson.build files:
169 </para>
170
171<screen><userinput>sed -e 's/-qt4/-qt5/' \
172 -e 's/moc_location/host_bins/' \
173 -i examples/C/qt/meson.build &amp;&amp;
174sed -e 's/Qt/&amp;5/' \
175 -i meson.build</userinput></screen>
176
177 <para>
178 Fix a missing meson.build file for initrd hooks (not used in BLFS):
179 </para>
180
181<screen><userinput>sed '/initrd/d' -i src/meson.build</userinput></screen>
182
183 <para>
184 Fix the python scripts so that they use <application>Python
185 3</application>:
186 </para>
187
188<screen><userinput>grep -rl '^#!.*python$' | xargs sed -i '1s/python/&amp;3/'</userinput></screen>
189
190 <para>
191 Install <application>NetworkManager</application> by running the
192 following commands:
193 </para>
194
195<screen revision="sysv"><userinput>mkdir build &amp;&amp;
196cd build &amp;&amp;
197
198CXXFLAGS+="-O2 -fPIC" \
199meson --prefix /usr \
200 --sysconfdir /etc \
201 --localstatedir /var \
202 -Djson_validation=false \
203 -Dlibaudit=no \
204 -Dlibpsl=false \
205 -Dnmtui=true \
206 -Dovs=false \
207 -Dppp=false \
208 -Dselinux=false \
209 -Dudev_dir=/lib/udev \
210 -Dsession_tracking=elogind \
211 -Dmodem_manager=false \
212 -Dsystemdsystemunitdir=no \
213 -Dsystemd_journal=false \
214 -Dqt=false \
215 .. &amp;&amp;
216ninja</userinput></screen>
217
218<screen revision="systemd"><userinput>mkdir build &amp;&amp;
219cd build &amp;&amp;
220
221CXXFLAGS+="-O2 -fPIC" \
222meson --prefix /usr \
223 --sysconfdir /etc \
224 --localstatedir /var \
225 -Djson_validation=false \
226 -Dlibaudit=no \
227 -Dlibpsl=false \
228 -Dnmtui=true \
229 -Dovs=false \
230 -Dppp=false \
231 -Dselinux=false \
232 -Dqt=false \
233 -Dudev_dir=/lib/udev \
234 -Dsession_tracking=systemd \
235 -Dmodem_manager=false \
236 -Dsystemdsystemunitdir=/lib/systemd/system \
237 .. &amp;&amp;
238ninja</userinput></screen>
239
240 <para>
241 An already active graphical session
242 with a bus address is necessary to run the tests. To test the results,
243 as the root user, <!-- needs the "ip" command -->
244 issue: <command>ninja test</command>. Five tests,
245 <filename>devices/test-acd</filename>,
246 <filename>platform/test-tc-linux</filename>,
247 <filename>platform/test-route-linux</filename>,
248 <filename>platform/test-link-linux</filename>, and
249 <filename>platform/test-cleanup-linux</filename>, are known to fail.
250 </para>
251
252 <para>
253 Now, as the <systemitem class="username">root</systemitem> user:
254 </para>
255
256<screen role="root"><userinput>ninja install &amp;&amp;
257mv -v /usr/share/doc/NetworkManager{,-&NetworkManager-version;}</userinput></screen>
258
259 </sect2>
260
261 <sect2 role="commands">
262 <title>Command Explanations</title>
263
264 <para>
265 <envar>CXXFLAGS="-O2 -fPIC"</envar>: These compiler options are
266 necessary to build the Qt5 based examples.
267 </para>
268
269 <para>
270 <option>-Ddocs=true</option>: Use this switch to enable building
271 man pages and documentation if <xref linkend="gtk-doc"/> is installed.
272 </para>
273
274 <para>
275 <parameter>-Dnmtui=true</parameter>: This parameter enables building
276 <command>nmtui</command>.
277 </para>
278
279 <para revision="sysv">
280 <parameter>-Dsystemdsystemunitdir=no</parameter> and
281 <parameter>-Dsystemd_journal=false</parameter>: systemd is not
282 used for sysv init systems.
283 </para>
284
285 <para>
286 <parameter>-Djson_validation=false</parameter>,
287 <parameter>-Dlibpsl=false</parameter>, and
288 <parameter>-Dovs=false</parameter>: These switches disable building with the
289 respective libraries. Remove if you have the needed libraries installed.
290 </para>
291
292<!--
293 <para>
294 <parameter>-Dlibpsl=false</parameter>: This switch is required if
295 <application>libpsl</application> is not installed. Omit this switch if
296 you have built <application>libpsl</application>.
297 </para>
298-->
299
300 <para>
301 <parameter>-Dmodem_manager=false</parameter>: This switch is requried if
302 <application>ModemManager</application> is not installed. Omit if you
303 have built <application>ModemManager</application> and
304 <application>mobile-broadband-provider-info</application>.
305 </para>
306
307 <para revision="sysv">
308 <parameter>-Dsession_tracking=elogind</parameter>: This switch
309 is used to set <command>elogind</command> as the default
310 program for session tracking.
311 </para>
312
313 <para revision="systemd">
314 <parameter>-Dsession_tracking=systemd</parameter>: This switch
315 is used to set <command>systemd-logind</command> as the default
316 program for session tracking.
317 </para>
318
319 <para revision="systemd">
320 <parameter>-Dsystemdsystemunitdir=/lib/systemd/system</parameter>:
321 This switch is used to set the correct installation directory for
322 systemd units.
323 </para>
324
325 <para>
326 <parameter>-Dppp=false</parameter>: This parameter disables
327 <application>PPP</application> support in
328 <application>NetworkManager</application>.
329 </para>
330
331 <para>
332 <parameter>-Dlibaudit=no</parameter> and
333 <parameter>-Dselinux=false</parameter>: libaudit and SELinux are not used
334 in BLFS.
335 </para>
336
337 <para>
338 <parameter>-Dqt=false</parameter>: disables the
339 <application>QT</application> examples. Omit if you have
340 <application>QT</application> available and wish to install the examples.
341 </para>
342
343 </sect2>
344
345 <sect2 role="configuration">
346 <title>Configuring NetworkManager</title>
347
348 <sect3 id="NetworkManager-config">
349 <title>Config Files</title>
350 <para>
351 <filename>/etc/NetworkManager/NetworkManager.conf</filename>
352 </para>
353
354 <indexterm zone="NetworkManager NetworkManager-config">
355 <primary
356 sortas="e-etc-NetworkManager-NetworkManager.conf">
357 /etc/NetworkManager/NetworkManager.conf</primary>
358 </indexterm>
359
360 </sect3>
361
362 <sect3><title>Configuration Information</title>
363
364 <para>
365 For <application>NetworkManager</application> to work, at least
366 a minimal configuration file must be present. Such file is not
367 installed with <command>make install</command>. Issue the following
368 command as the <systemitem class="username">root</systemitem> user to
369 create minimal <filename>NetworkManager.conf</filename> file:
370 </para>
371
372<screen role="root"><userinput>cat &gt;&gt; /etc/NetworkManager/NetworkManager.conf &lt;&lt; "EOF"
373<literal>[main]
374plugins=keyfile</literal>
375EOF</userinput></screen>
376
377 <para>
378 This file should not be modified directly by users of the system.
379 Instead, system specific changes should be made using configuration
380 files in the
381 <filename class="directory">/etc/NetworkManager/conf.d</filename>
382 direcotry.
383 </para>
384
385 <para>
386 To allow polkit to manage authorizations, add the following
387 configuration file:
388 </para>
389
390<screen role="root"><userinput>cat &gt; /etc/NetworkManager/conf.d/polkit.conf &lt;&lt; "EOF"
391<literal>[main]
392auth-polkit=true</literal>
393EOF</userinput></screen>
394
395 <para>
396 To use something other than the built-in dhcp client (recommended if
397 using only <command>nmcli</command>), use the following configuration
398 (valid values are dhclient, dhcpcd, and internal):
399 </para>
400
401<screen role="nodump"><userinput>cat &gt; /etc/NetworkManager/conf.d/dhcp.conf &lt;&lt; "EOF"
402<literal>[main]
403dhcp=</literal><replaceable>dhclient</replaceable>
404EOF</userinput></screen>
405
406 <para>
407 To prevent <application>NetworkManager</application> from updating the
408 <filename>/etc/resolv.conf</filename> file, add the following
409 configuration file:
410 </para>
411
412<screen role="nodump"><userinput>cat &gt; /etc/NetworkManager/conf.d/no-dns-update.conf &lt;&lt; "EOF"
413<literal>[main]
414dns=none</literal>
415EOF</userinput></screen>
416
417 <para>
418 For additional configuation options, see
419 <command>man 5 NetworkManager.conf</command>.
420 </para>
421
422 <para>
423 To allow regular users permission to configure network connections,
424 you should add them to the
425 <systemitem class="groupname">netdev</systemitem>
426 group, and create a <application>polkit</application> rule that grants
427 access. Run the following commands as the
428 <systemitem class="username">root</systemitem> user:
429 </para>
430
431<screen role="root"><userinput>groupadd -fg 86 netdev &amp;&amp;
432/usr/sbin/usermod -a -G netdev <replaceable>&lt;username&gt;</replaceable>
433
434cat &gt; /usr/share/polkit-1/rules.d/org.freedesktop.NetworkManager.rules &lt;&lt; "EOF"
435<literal>polkit.addRule(function(action, subject) {
436 if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 &amp;&amp; subject.isInGroup("netdev")) {
437 return polkit.Result.YES;
438 }
439});</literal>
440EOF</userinput></screen>
441
442 </sect3>
443
444 <sect3 id="NetworkManager-init">
445 <title><phrase revision="sysv">Boot Script</phrase>
446 <phrase revision="systemd">Systemd Unit</phrase></title>
447
448 <para revision="sysv">
449 To automatically start the <command>NetworkManager</command> daemon
450 when the system is rebooted, install the
451 <filename>/etc/rc.d/init.d/networkmanager</filename>bootscript from the
452 <xref linkend="bootscripts"/> package.
453 </para>
454
455 <para revision="systemd">
456 To start the <command>NetworkManager</command> daemon at boot, enable
457 the previously installed systemd unit by running the following command
458 as the <systemitem class="username">root</systemitem> user:
459 </para>
460
461 <note>
462 <para>
463 If using <application>Network Manager</application> to manage
464 an interface, any previous configuration for that interface should be
465 removed, and the interface brought down prior to starting
466 <application>Network Manager</application>.
467 </para>
468 </note>
469
470 <indexterm zone="NetworkManager NetworkManager-init">
471 <primary sortas="f-NetworkManager">NetworkManager</primary>
472 </indexterm>
473
474<screen role="root" revision="sysv"><userinput>make install-networkmanager</userinput></screen>
475
476<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager</userinput></screen>
477<!-- The below instruction is obsolete. NetworkManager-wait-online is now
478 enabled by default when enabling NetworkManager. -->
479<!--
480 <para revision="systemd">
481 <application>NetworkManager</application> also ships a systemd unit
482 called <filename>NetworkManager-wait-online.service</filename> which
483 can be used to prevent services that require network connectivity
484 from starting until <application>NetworkManager</application> has
485 established the connection. To enable it, run the following command
486 as the <systemitem class="username">root</systemitem> user:
487 </para>
488
489<screen role="root" revision="systemd"><userinput>systemctl enable NetworkManager-wait-online</userinput></screen>
490 -->
491 <!-- As such, let's now provide instructions on how to disable that
492 behavior, for those who wish to do so. -->
493 <para revision="systemd">
494 Starting in version 1.11.2 of <application>NetworkManager</application>,
495 a systemd unit named <filename>NetworkManager-wait-online.service</filename>
496 is enabled, which is used to prevent services that require network
497 connectivity from starting until <application>NetworkManager</application>
498 establishes a connection. To disable this behavior, run the following
499 command as the <systemitem class="username">root</systemitem> user:
500 </para>
501
502<screen role="root" revision="systemd"><userinput>systemctl disable NetworkManager-wait-online</userinput></screen>
503
504 </sect3>
505
506 </sect2>
507
508 <sect2 role="content">
509 <title>Contents</title>
510
511 <segmentedlist>
512 <segtitle>Installed Programs</segtitle>
513 <segtitle>Installed Libraries</segtitle>
514 <segtitle>Installed Directories</segtitle>
515
516 <seglistitem>
517 <seg>
518 NetworkManager, nmcli, nm-online, nmtui, and, symlinked to nmtui:
519 nmtui-connect, nmtui-edit, and nmtui-hostname
520 </seg>
521 <seg>
522 libnm.so
523 and several modules under /usr/lib/NetworkManager
524 </seg>
525 <seg>
526 /etc/NetworkManager,
527 /usr/include/libnm,
528 /usr/lib/NetworkManager,
529 /usr/share/doc/NetworkManager-&NetworkManager-version;,
530 /usr/share/gtk-doc/html/{libnm,NetworkManager}
531 (if the documentation is built),
532 and
533 /var/lib/NetworkManager
534 </seg>
535 <!-- A lot of libraries were removed here. We should verify compatibilty.
536 RESTORED AT 1.18.2 -renodr -->
537 </seglistitem>
538 </segmentedlist>
539
540 <variablelist>
541 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
542 <?dbfo list-presentation="list"?>
543 <?dbhtml list-presentation="table"?>
544
545 <varlistentry id="nmcli">
546 <term><command>nmcli</command></term>
547 <listitem>
548 <para>
549 is a command-line tool for controlling
550 <application>NetworkManager</application>
551 and getting its status.
552 </para>
553 <indexterm zone="NetworkManager nmcli">
554 <primary sortas="b-nmcli">nmcli</primary>
555 </indexterm>
556 </listitem>
557 </varlistentry>
558
559 <varlistentry id="nm-online">
560 <term><command>nm-online</command></term>
561 <listitem>
562 <para>
563 is an utility to find out whether you are online.
564 </para>
565 <indexterm zone="NetworkManager nm-online">
566 <primary sortas="b-nm-online">nm-online</primary>
567 </indexterm>
568 </listitem>
569 </varlistentry>
570
571 <varlistentry id="nmtui">
572 <term><command>nmtui</command></term>
573 <listitem>
574 <para>
575 is an interactive ncurses based interface for
576 <application>nmcli</application>.
577 </para>
578 <indexterm zone="NetworkManager nmtui">
579 <primary sortas="b-nmtui">nmtui</primary>
580 </indexterm>
581 </listitem>
582 </varlistentry>
583
584 <varlistentry id="nmtui-connect">
585 <term><command>nmtui-connect</command></term>
586 <listitem>
587 <para>
588 is an interactive ncurses based interface connection to
589 activate/deactivate connections.
590 </para>
591 <indexterm zone="NetworkManager nmtui-connect">
592 <primary sortas="b-nmtui-connect">nmtui-connect</primary>
593 </indexterm>
594 </listitem>
595 </varlistentry>
596
597 <varlistentry id="nmtui-edit">
598 <term><command>nmtui-edit</command></term>
599 <listitem>
600 <para>
601 is an interactive ncurses based interface connection editor.
602 </para>
603 <indexterm zone="NetworkManager nmtui-edit">
604 <primary sortas="b-nmtui-edit">nmtui-edit</primary>
605 </indexterm>
606 </listitem>
607 </varlistentry>
608
609 <varlistentry id="nmtui-hostname">
610 <term><command>nmtui-hostname</command></term>
611 <listitem>
612 <para>
613 is an interactive ncurses based interface hostname editor.
614 </para>
615 <indexterm zone="NetworkManager nmtui-hostname">
616 <primary sortas="b-nmtui-hostname">nmtui-hostname</primary>
617 </indexterm>
618 </listitem>
619 </varlistentry>
620
621 <varlistentry id="NetworkManager-prog">
622 <term><command>NetworkManager</command></term>
623 <listitem>
624 <para>
625 is the network management daemon.
626 </para>
627 <indexterm zone="NetworkManager NetworkManager-prog">
628 <primary sortas="b-NetworkManager">NetworkManager</primary>
629 </indexterm>
630 </listitem>
631 </varlistentry>
632
633 <varlistentry id="libnm">
634 <term><filename class="libraryfile">libnm.so</filename></term>
635 <listitem>
636 <para>
637 contains functions used by <application>NetworkManager</application>.
638 </para>
639 <indexterm zone="NetworkManager libnm">
640 <primary sortas="c-libnm">libnm.so</primary>
641 </indexterm>
642 </listitem>
643 </varlistentry>
644 </variablelist>
645
646 </sect2>
647
648</sect1>
Note: See TracBrowser for help on using the repository browser.