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

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 8.4 9.0 9.1 bdubbs/svn 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 af4228c was 77b64bd, checked in by DJ Lucas <dj@…>, 5 years ago

Upadte sudo instructions to utilize /etc/sudoers.d directory. Extend configuation where appropriate for needed super user environment variables in QT, KDE, and Java packages. Fixes #11400.

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

  • Property mode set to 100644
File size: 7.3 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 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 </sect1info>
22
23 <title>KDE Frameworks 5 Pre-installation Configuration</title>
24
25 <indexterm zone="kf5-intro">
26 <primary sortas="g-kf5">KDE Frameworks Introduction</primary>
27 </indexterm>
28
29 <para>KF5 can be installed in /usr or /opt/kf5. The BLFS editors
30 recommend the latter in the BLFS environment.
31 </para>
32
33 <sect2>
34 <title>Installing in /usr</title>
35
36 <para>
37 One option is to install <application>KDE Frameworks 5</application>
38 into the <filename class="directory">/usr</filename> hierarchy.
39 This creates a simpler setup but makes it more difficult to try
40 multiple versions of <application>KDE Frameworks</application>.
41 </para>
42
43<screen><userinput>export KF5_PREFIX=/usr</userinput></screen>
44
45 <para>
46 It is a good idea to add the following variables to your
47 system or personal profiles:
48 </para>
49
50<screen role="root"><userinput>cat &gt;&gt; /etc/profile.d/qt5.sh &lt;&lt; "EOF"
51<literal># Begin kf5 extension for /etc/profile.d/qt5.sh
52
53pathappend /usr/lib/qt5/plugins QT_PLUGIN_PATH
54pathappend $QT5DIR/lib/plugins QT_PLUGIN_PATH
55
56pathappend /usr/lib/qt5/qml QML2_IMPORT_PATH
57pathappend $QT5DIR/lib/qml QML2_IMPORT_PATH
58
59# End extension for /etc/profile.d/qt5.sh</literal>
60EOF
61
62cat &gt; /etc/profile.d/kf5.sh &lt;&lt; "EOF"
63<literal># Begin /etc/profile.d/kf5.sh
64
65export KF5_PREFIX=/usr
66
67# End /etc/profile.d/kf5.sh</literal>
68EOF</userinput></screen>
69
70 <note><para>If <application>qt5</application> was installed in /usr, the
71 $QT5DIR/lib/ portions of the above paths may need to be changed to
72 $QT5DIR/lib/qt5/.</para></note>
73
74 <para>Additionally, if <xref linkend="sudo"/> is installed, these variables
75 should be available to the super user. Execute the following commands as
76 the <systemitem class="username">root</systemitem> user:</para>
77
78<screen role="root"><userinput>cat &gt;&gt; /etc/sudoers.d/qt &lt;&lt; "EOF
79<literal>Defaults env_keep += QT_PLUGIN_PATH
80Defaults env_keep += QML2_IMPORT_PATH</literal>
81EOF
82
83cat &gt;&gt; /etc/sudoers.d/kde &lt;&lt; "EOF
84<literal>Defaults env_keep += KF5_PREFIX</literal>
85EOF</userinput></screen>
86
87 <warning>
88 <para>
89 If <application>KDE4</application> is installed in
90 <filename class="directory">/usr</filename>, some packages
91 from this chapter might overwrite some programs installed
92 by <application>KDE4</application> packages.
93 </para>
94 </warning>
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
128
129pathappend $KF5_PREFIX/lib/qml QML2_IMPORT_PATH
130
131pathappend $KF5_PREFIX/lib/python&python2-majorver;/site-packages PYTHONPATH
132
133pathappend $KF5_PREFIX/share/man MANPATH
134# End /etc/profile.d/kf5.sh</literal>
135EOF
136
137cat &gt;&gt; /etc/profile.d/qt5.sh &lt;&lt; "EOF"
138<literal># Begin Qt5 changes for KF5
139
140pathappend $QT5DIR/plugins QT_PLUGIN_PATH
141pathappend $QT5DIR/qml QML2_IMPORT_PATH
142
143# End Qt5 changes for KF5</literal>
144EOF</userinput></screen>
145
146 <para>
147 Expand your <filename>/etc/ld.so.conf</filename> file:
148 </para>
149
150<screen role="root"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; "EOF"
151<literal># Begin KF5 addition
152
153/opt/kf5/lib
154
155# End KF5 addition</literal>
156EOF</userinput></screen>
157
158 <indexterm zone="kf5-intro">
159 <primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
160 </indexterm>
161
162 <para>
163 Several <application>KDE Frameworks 5</application> packages install
164 files into <application>D-Bus</application> directories. When installing
165 <application>KDE Frameworks 5</application> in a location other than
166 <filename class="directory">/usr</filename>,
167 <application>D-Bus</application> needs to be able to find these files.
168 The easiest way to achieve this is to create the following symlinks (as
169 the <systemitem class="username">root</systemitem> user):
170 </para>
171
172<screen role="root"><userinput>install -v -dm755 $KF5_PREFIX/{etc,share} &amp;&amp;
173ln -sfv /etc/dbus-1 $KF5_PREFIX/etc &amp;&amp;
174ln -sfv /usr/share/dbus-1 $KF5_PREFIX/share</userinput></screen>
175
176 <para>
177 Some packages may also install icons from the "hicolor" icon set. Since that
178 icon set is used by many packages, it is a good idea to create a
179 symlink to the one in <filename class="directory">/usr/share</filename>
180 to avoid having multiple installations of <xref linkend="hicolor-icon-theme"/>.
181 Run the following commands as the <systemitem class="username">root</systemitem>
182 user:
183 </para>
184
185<screen role="root"><userinput>install -v -dm755 $KF5_PREFIX/share/icons &amp;&amp;
186ln -sfv /usr/share/icons/hicolor $KF5_PREFIX/share/icons</userinput></screen>
187
188 <tip>
189 <para>
190 Sometimes, the installation paths are hardcoded into installed files.
191 This is the reason why <filename class="directory">/opt/kf5</filename>
192 is used as installation prefix instead of <filename
193 class="directory">/opt/kf5-&kf5-version;</filename>. After installing
194 <application>KDE Frameworks</application>, you may rename the directory
195 and create a symlink:
196 </para>
197
198<screen role="root"><userinput>mv /opt/kf5{,-&kf5-version;}
199ln -sfv kf5-&kf5-version; /opt/kf5</userinput></screen>
200
201 <para>
202 Later on, you may want to install other versions of
203 <application>KDE Frameworks 5</application>. To do that, just remove
204 the symlink and use <filename class="directory">/opt/kf5</filename>
205 as the prefix again. Which version of
206 <application>KDE Frameworks 5</application> you use depends only on
207 where the symlink points. No other reconfiguration will be needed.
208 </para>
209 </tip>
210
211 </sect2>
212
213</sect1>
214
215
Note: See TracBrowser for help on using the repository browser.