glfs/kde/kf5/kf6-intro.xml

243 lines
8.7 KiB
XML
Raw Normal View History

2024-01-20 05:35:53 +08:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
2024-03-07 00:12:21 +08:00
<!ENTITY kf6-download-http "&kf6-download-http;">
<!ENTITY kf6-download-ftp " ">
<!ENTITY kf6-md5sum "See Below">
<!ENTITY kf6-size "30 MB">
<!ENTITY kf6-buildsize "11.7 MB">
<!ENTITY kf6-time "0.4 SBU">
]>
2024-03-07 00:12:21 +08:00
<sect1 id="kf6-intro" xreflabel="Introduction to KF6">
<?dbhtml filename="kf6-intro.html"?>
<title>KDE Frameworks 6 Pre-installation Configuration</title>
2024-03-07 00:12:21 +08:00
<indexterm zone="kf6-intro">
<primary sortas="g-kf6">KDE Frameworks Introduction</primary>
</indexterm>
<para>
KF6 can be installed in <filename class="directory">/usr</filename> or
<filename class="directory">/opt/kf6</filename>. The BLFS editors
recommend the latter in the BLFS environment.
</para>
<sect2>
<title>Installing in /usr</title>
<para>
One option is to install <application>KDE Frameworks</application>
into the <filename class="directory">/usr</filename> hierarchy.
This creates a simpler setup but makes it more difficult to try
multiple versions of <application>KDE Frameworks</application>.
</para>
<screen><userinput>export KF6_PREFIX=/usr</userinput></screen>
<para>
It is a good idea to add the following variables to your
system or personal profiles:
</para>
<screen role="root"><userinput>cat &gt;&gt; /etc/profile.d/qt6.sh &lt;&lt; "EOF"
<literal># Begin kf6 extension for /etc/profile.d/qt6.sh
pathappend /usr/lib/plugins QT_PLUGIN_PATH
pathappend $QT6DIR/lib/plugins QT_PLUGIN_PATH
pathappend /usr/lib/qt6/qml QML2_IMPORT_PATH
pathappend $QT6DIR/lib/qml QML2_IMPORT_PATH
# End extension for /etc/profile.d/qt6.sh</literal>
EOF
cat &gt; /etc/profile.d/kf6.sh &lt;&lt; "EOF"
<literal># Begin /etc/profile.d/kf6.sh
export KF6_PREFIX=/usr
# End /etc/profile.d/kf6.sh</literal>
EOF</userinput></screen>
<note>
<para>
If <application>qt6</application> was installed in <filename
class="directory">/usr</filename>, the <filename
class="directory">$QT6DIR/lib/</filename> portions of the above paths
may need to be changed to <filename
class="directory">$QT6DIR/lib/qt6/</filename>.
</para>
</note>
<para>
Additionally, if <xref linkend="sudo"/> is installed, these variables
should be available to the super user. Execute the following commands as
the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>cat &gt;&gt; /etc/sudoers.d/qt &lt;&lt; "EOF"
<literal>Defaults env_keep += QT_PLUGIN_PATH
Defaults env_keep += QML2_IMPORT_PATH</literal>
EOF
cat &gt;&gt; /etc/sudoers.d/kde &lt;&lt; "EOF"
<literal>Defaults env_keep += KF6_PREFIX</literal>
EOF</userinput></screen>
</sect2>
<sect2>
<title>Installing in /opt</title>
<para>
A method of building multiple versions installs
<application>KDE Frameworks</application> in the
<filename class="directory">/opt</filename> hierarchy:
</para>
<screen><userinput>export KF6_PREFIX=/opt/kf6</userinput></screen>
<para>
If you are not installing <application>KDE Frameworks</application>
in <filename class="directory">/usr</filename>, you will need to
make some additional configuration changes. Best practice is to add
those to your system or personal profile:
</para>
<screen role="root"><userinput>cat &gt; /etc/profile.d/kf6.sh &lt;&lt; "EOF"
<literal># Begin /etc/profile.d/kf6.sh
export KF6_PREFIX=/opt/kf6
pathappend $KF6_PREFIX/bin PATH
pathappend $KF6_PREFIX/lib/pkgconfig PKG_CONFIG_PATH
pathappend $KF6_PREFIX/etc/xdg XDG_CONFIG_DIRS
pathappend $KF6_PREFIX/share XDG_DATA_DIRS
pathappend $KF6_PREFIX/lib/plugins QT_PLUGIN_PATH
pathappend $KF6_PREFIX/lib/plugins/kcms QT_PLUGIN_PATH
pathappend $KF6_PREFIX/lib/qml QML2_IMPORT_PATH
pathappend $KF6_PREFIX/lib/python&python3-majorver;/site-packages PYTHONPATH
pathappend $KF6_PREFIX/share/man MANPATH
pathappend $KF6_PREFIX/include CPLUS_INCLUDE_PATH
# End /etc/profile.d/kf6.sh</literal>
EOF
cat &gt;&gt; /etc/profile.d/qt6.sh &lt;&lt; "EOF"
<literal># Begin Qt6 changes for KF6
pathappend /usr/lib/plugins QT_PLUGIN_PATH
pathappend $QT6DIR/plugins QT_PLUGIN_PATH
pathappend $QT6DIR/qml QML2_IMPORT_PATH
# End Qt6 changes for KF6</literal>
EOF</userinput></screen>
<para>
Expand your <filename>/etc/ld.so.conf</filename> file:
</para>
<screen role="root"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; "EOF"
<literal># Begin KF6 addition
/opt/kf6/lib
# End KF6 addition</literal>
EOF</userinput></screen>
2024-03-07 00:12:21 +08:00
<indexterm zone="kf6-intro">
<primary sortas="e-etc-ld.so.conf">/etc/ld.so.conf</primary>
</indexterm>
<para revision="sysv">
Several <application>KDE Frameworks</application> and
<application>Plasma</application> packages install
files into <application>D-Bus</application> and
<application>Polkit</application> directories. When installing
<application>KDE Frameworks</application> in a location other than
<filename class="directory">/usr</filename>,
<application>D-Bus</application> and <application>Polkit</application>
need to be able to find these files.
The easiest way to achieve this is to create the following symlinks (as
the <systemitem class="username">root</systemitem> user):
</para>
<screen role="root"
revision="sysv"><userinput>install -v -dm755 $KF6_PREFIX/{etc,share} &amp;&amp;
ln -sfv /etc/dbus-1 $KF6_PREFIX/etc &amp;&amp;
ln -sfv /usr/share/dbus-1 $KF6_PREFIX/share &amp;&amp;
ln -sfv /usr/share/polkit-1 $KF6_PREFIX/share</userinput></screen>
<para revision="systemd">
Several <application>KDE Frameworks</application> and
<application>KDE Plasma</application> packages install
files into <application>D-Bus</application>,
<application>Polkit</application>, and
<application>systemd</application> directories. When installing
<application>KDE 6</application> in a location other than
<filename class="directory">/usr</filename>,
<application>D-Bus</application>, <application>Polkit</application>,
and <application>systemd</application>
need to be able to find these files.
The easiest way to achieve this is to create the following symlinks (as
the <systemitem class="username">root</systemitem> user):
</para>
<screen role="root"
revision="systemd"><userinput>install -v -dm755 $KF6_PREFIX/{etc,share} &amp;&amp;
ln -sfv /etc/dbus-1 $KF6_PREFIX/etc &amp;&amp;
ln -sfv /usr/share/dbus-1 $KF6_PREFIX/share &amp;&amp;
ln -sfv /usr/share/polkit-1 $KF6_PREFIX/share &amp;&amp;
install -v -dm755 $KF6_PREFIX/lib &amp;&amp;
ln -sfv /usr/lib/systemd $KF6_PREFIX/lib</userinput></screen>
<para>
Some packages may also install icons from the "hicolor" icon set. Since that
icon set is used by many packages, it is a good idea to create a
symlink to the one in <filename class="directory">/usr/share</filename>
to avoid having multiple installations of <xref linkend="hicolor-icon-theme"/>.
Run the following commands as the <systemitem class="username">root</systemitem>
user:
</para>
<screen role="root"><userinput>install -v -dm755 $KF6_PREFIX/share/icons &amp;&amp;
ln -sfv /usr/share/icons/hicolor $KF6_PREFIX/share/icons</userinput></screen>
<tip>
<para>
Sometimes, the installation paths are hardcoded into installed files.
This is the reason why <filename class="directory">/opt/kf6</filename>
is used as installation prefix instead of <filename
class="directory">/opt/kf6-&kf6-version;</filename>. After installing
<application>KDE Frameworks</application>, you may rename the directory
and create a symlink:
</para>
<screen role="root"><userinput>mv /opt/kf6{,-&kf6-version;}
ln -sfv kf6-&kf6-version; /opt/kf6</userinput></screen>
<para>
Later on, you may want to install other versions of
<application>KDE Frameworks</application>. To do that, just remove
the symlink and use <filename class="directory">/opt/kf6</filename>
as the prefix again. Which version of
<application>KDE Frameworks</application> you use depends only on
where the symlink points. No other reconfiguration will be needed.
</para>
</tip>
</sect2>
</sect1>