source: kde/kf5/kf5-intro.xml@ f263bf7

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 f263bf7 was f263bf7, checked in by Pierre Labastie <pierre.labastie@…>, 3 years ago

KDE: Allow Polkit files to land in /usr

Create a symlink /opt/kf5/share/polkit-1->/usr/share/polkit-1

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