source: kde/kf5/kf6-intro.xml

trunk
Last change on this file was 755607e3, checked in by Xi Ruoyao <xry111@…>, 6 weeks ago

Kick MANPATH out of the book

The man program automatically deduce a good default from PATH, thus no
need to set MANPATH as long as the corresponding PATH component is
added.

  • Property mode set to 100644
File size: 8.6 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!DOCTYPE chapter 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 kf6-download-http "&kf6-download-http;">
8 <!ENTITY kf6-download-ftp " ">
9 <!ENTITY kf6-md5sum "See Below">
10 <!ENTITY kf6-size "30 MB">
11 <!ENTITY kf6-buildsize "11.7 MB">
12 <!ENTITY kf6-time "0.4 SBU">
13]>
14
15<sect1 id="kf6-intro" xreflabel="Introduction to KF6">
16 <?dbhtml filename="kf6-intro.html"?>
17
18
19 <title>KDE Frameworks 6 Pre-installation Configuration</title>
20
21 <indexterm zone="kf6-intro">
22 <primary sortas="g-kf6">KDE Frameworks Introduction</primary>
23 </indexterm>
24
25 <para>
26 KF6 can be installed in <filename class="directory">/usr</filename> or
27 <filename class="directory">/opt/kf6</filename>. The BLFS editors
28 recommend the latter in the BLFS environment.
29 </para>
30
31 <sect2>
32 <title>Installing in /usr</title>
33
34 <para>
35 One option is to install <application>KDE Frameworks</application>
36 into the <filename class="directory">/usr</filename> hierarchy.
37 This creates a simpler setup but makes it more difficult to try
38 multiple versions of <application>KDE Frameworks</application>.
39 </para>
40
41<screen><userinput>export KF6_PREFIX=/usr</userinput></screen>
42
43 <para>
44 It is a good idea to add the following variables to your
45 system or personal profiles:
46 </para>
47
48<screen role="root"><userinput>cat &gt;&gt; /etc/profile.d/qt6.sh &lt;&lt; "EOF"
49<literal># Begin kf6 extension for /etc/profile.d/qt6.sh
50
51pathappend /usr/lib/plugins QT_PLUGIN_PATH
52pathappend $QT6DIR/lib/plugins QT_PLUGIN_PATH
53
54pathappend /usr/lib/qt6/qml QML2_IMPORT_PATH
55pathappend $QT6DIR/lib/qml QML2_IMPORT_PATH
56
57# End extension for /etc/profile.d/qt6.sh</literal>
58EOF
59
60cat &gt; /etc/profile.d/kf6.sh &lt;&lt; "EOF"
61<literal># Begin /etc/profile.d/kf6.sh
62
63export KF6_PREFIX=/usr
64
65# End /etc/profile.d/kf6.sh</literal>
66EOF</userinput></screen>
67
68 <note>
69 <para>
70 If <application>qt6</application> was installed in <filename
71 class="directory">/usr</filename>, the <filename
72 class="directory">$QT6DIR/lib/</filename> portions of the above paths
73 may need to be changed to <filename
74 class="directory">$QT6DIR/lib/qt6/</filename>.
75 </para>
76 </note>
77
78 <para>
79 Additionally, if <xref linkend="sudo"/> is installed, these variables
80 should be available to the super user. Execute the following commands as
81 the <systemitem class="username">root</systemitem> user:
82 </para>
83
84<screen role="root"><userinput>cat &gt;&gt; /etc/sudoers.d/qt &lt;&lt; "EOF"
85<literal>Defaults env_keep += QT_PLUGIN_PATH
86Defaults env_keep += QML2_IMPORT_PATH</literal>
87EOF
88
89cat &gt;&gt; /etc/sudoers.d/kde &lt;&lt; "EOF"
90<literal>Defaults env_keep += KF6_PREFIX</literal>
91EOF</userinput></screen>
92
93 </sect2>
94
95 <sect2>
96 <title>Installing in /opt</title>
97
98 <para>
99 A method of building multiple versions installs
100 <application>KDE Frameworks</application> in the
101 <filename class="directory">/opt</filename> hierarchy:
102 </para>
103
104<screen><userinput>export KF6_PREFIX=/opt/kf6</userinput></screen>
105
106 <para>
107 If you are not installing <application>KDE Frameworks</application>
108 in <filename class="directory">/usr</filename>, you will need to
109 make some additional configuration changes. Best practice is to add
110 those to your system or personal profile:
111 </para>
112
113<screen role="root"><userinput>cat &gt; /etc/profile.d/kf6.sh &lt;&lt; "EOF"
114<literal># Begin /etc/profile.d/kf6.sh
115
116export KF6_PREFIX=/opt/kf6
117
118pathappend $KF6_PREFIX/bin PATH
119pathappend $KF6_PREFIX/lib/pkgconfig PKG_CONFIG_PATH
120
121pathappend $KF6_PREFIX/etc/xdg XDG_CONFIG_DIRS
122pathappend $KF6_PREFIX/share XDG_DATA_DIRS
123
124pathappend $KF6_PREFIX/lib/plugins QT_PLUGIN_PATH
125pathappend $KF6_PREFIX/lib/plugins/kcms QT_PLUGIN_PATH
126
127pathappend $KF6_PREFIX/lib/qml QML2_IMPORT_PATH
128
129pathappend $KF6_PREFIX/lib/python&python3-majorver;/site-packages PYTHONPATH
130
131pathappend $KF6_PREFIX/include CPLUS_INCLUDE_PATH
132# End /etc/profile.d/kf6.sh</literal>
133EOF
134
135cat &gt;&gt; /etc/profile.d/qt6.sh &lt;&lt; "EOF"
136<literal># Begin Qt6 changes for KF6
137
138pathappend /usr/lib/plugins QT_PLUGIN_PATH
139pathappend $QT6DIR/plugins QT_PLUGIN_PATH
140pathappend $QT6DIR/qml QML2_IMPORT_PATH
141
142# End Qt6 changes for KF6</literal>
143EOF</userinput></screen>
144
145 <para>
146 Expand your <filename>/etc/ld.so.conf</filename> file:
147 </para>
148
149<screen role="root"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; "EOF"
150<literal># Begin KF6 addition
151
152/opt/kf6/lib
153
154# End KF6 addition</literal>
155EOF</userinput></screen>
156
157 <indexterm zone="kf6-intro">
158 <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
159 </indexterm>
160
161 <para revision="sysv">
162 Several <application>KDE Frameworks</application> and
163 <application>Plasma</application> packages install
164 files into <application>D-Bus</application> and
165 <application>Polkit</application> directories. When installing
166 <application>KDE Frameworks</application> in a location other than
167 <filename class="directory">/usr</filename>,
168 <application>D-Bus</application> and <application>Polkit</application>
169 need to be able to find these files.
170 The easiest way to achieve this is to create the following symlinks (as
171 the <systemitem class="username">root</systemitem> user):
172 </para>
173
174<screen role="root"
175 revision="sysv"><userinput>install -v -dm755 $KF6_PREFIX/{etc,share} &amp;&amp;
176ln -sfv /etc/dbus-1 $KF6_PREFIX/etc &amp;&amp;
177ln -sfv /usr/share/dbus-1 $KF6_PREFIX/share &amp;&amp;
178ln -sfv /usr/share/polkit-1 $KF6_PREFIX/share</userinput></screen>
179
180 <para revision="systemd">
181 Several <application>KDE Frameworks</application> and
182 <application>KDE Plasma</application> packages install
183 files into <application>D-Bus</application>,
184 <application>Polkit</application>, and
185 <application>systemd</application> directories. When installing
186 <application>KDE 6</application> in a location other than
187 <filename class="directory">/usr</filename>,
188 <application>D-Bus</application>, <application>Polkit</application>,
189 and <application>systemd</application>
190 need to be able to find these files.
191 The easiest way to achieve this is to create the following symlinks (as
192 the <systemitem class="username">root</systemitem> user):
193 </para>
194
195<screen role="root"
196 revision="systemd"><userinput>install -v -dm755 $KF6_PREFIX/{etc,share} &amp;&amp;
197ln -sfv /etc/dbus-1 $KF6_PREFIX/etc &amp;&amp;
198ln -sfv /usr/share/dbus-1 $KF6_PREFIX/share &amp;&amp;
199ln -sfv /usr/share/polkit-1 $KF6_PREFIX/share &amp;&amp;
200install -v -dm755 $KF6_PREFIX/lib &amp;&amp;
201ln -sfv /usr/lib/systemd $KF6_PREFIX/lib</userinput></screen>
202
203 <para>
204 Some packages may also install icons from the "hicolor" icon set. Since that
205 icon set is used by many packages, it is a good idea to create a
206 symlink to the one in <filename class="directory">/usr/share</filename>
207 to avoid having multiple installations of <xref linkend="hicolor-icon-theme"/>.
208 Run the following commands as the <systemitem class="username">root</systemitem>
209 user:
210 </para>
211
212<screen role="root"><userinput>install -v -dm755 $KF6_PREFIX/share/icons &amp;&amp;
213ln -sfv /usr/share/icons/hicolor $KF6_PREFIX/share/icons</userinput></screen>
214
215 <tip>
216 <para>
217 Sometimes, the installation paths are hardcoded into installed files.
218 This is the reason why <filename class="directory">/opt/kf6</filename>
219 is used as installation prefix instead of <filename
220 class="directory">/opt/kf6-&kf6-version;</filename>. After installing
221 <application>KDE Frameworks</application>, you may rename the directory
222 and create a symlink:
223 </para>
224
225<screen role="root"><userinput>mv /opt/kf6{,-&kf6-version;}
226ln -sfv kf6-&kf6-version; /opt/kf6</userinput></screen>
227
228 <para>
229 Later on, you may want to install other versions of
230 <application>KDE Frameworks</application>. To do that, just remove
231 the symlink and use <filename class="directory">/opt/kf6</filename>
232 as the prefix again. Which version of
233 <application>KDE Frameworks</application> you use depends only on
234 where the symlink points. No other reconfiguration will be needed.
235 </para>
236 </tip>
237
238 </sect2>
239
240</sect1>
Note: See TracBrowser for help on using the repository browser.