試験運用中なLinux備忘録・旧記事

はてなダイアリーで公開していた2007年5月-2015年3月の記事を保存しています。

Gentoo LinuxでKDE4を最小限構成でインストールする

ここでは、最小限構成として、ログイン画面(GDMなど)からKDEデスクトップにログインするために必要なものだけをインストールするのにどれだけのパッケージが入るかを確認したものを書くことにする。
また、今回は設定や自動起動などについては扱わない。

  1. 準備
  2. kdelibs
  3. kdebase-startkde
  4. libplasmaでのエラー
  5. 日本語メッセージの表示
  6. その他
  7. インストール完了

準備

/etc/portage/package.unmask/etc/portage/package.keywordsにパッケージを指定しなくてはならないが、ここでは省略。
また、Qt4のQt3サポートは必須になっているため、(「USE=qt3support」が)有効になっていなければ有効にしておく必要がある。
(2008/2/29)インストールに関するドキュメントが
http://web.archive.org/web/20080229062139/http://www.gentoo.org/proj/en/desktop/kde/kde4.xml
にあるので、参考になる。
(2014/10/3)リンク先を修正

kdelibs

kde-base/kdelibs」はKDEの基盤となるライブラリで、かなりの規模がある。これを入れるために新しく入れなくてはならないパッケージが色々とあった。

[ebuild  N    ] dev-cpp/clucene-0.9.20  USE="threads -debug -doc"
[ebuild     U ] dev-util/cmake-2.4.7-r1 [2.4.6-r1] USE="-emacs* -vim-syntax"
[ebuild  N    ] dev-libs/mpfr-2.3.0_p4
[ebuild  N    ] media-gfx/exiv2-0.15-r1  USE="nls unicode zlib -doc" LINGUAS="-de -es -fi -fr -pl -ru"
[ebuild     U ] dev-libs/rasqal-0.9.15 [0.9.14] USE="pcre xml -debug% -gmp% -test%"
[ebuild  N    ] app-misc/strigi-0.5.7  USE="clucene dbus exiv2 -debug -hyperestraier -inotify -java -qt4 -test"
[ebuild  N    ] dev-libs/soprano-2.0.0  USE="clucene -debug -doc"
[ebuild  NS   ] kde-base/kdelibs-4.0.1-r1  USE="3dnow alsa bzip2 fam mmx nls opengl semantic-desktop sse sse2 ssl -acl (-altivec) -bindist -debug -doc -htmlhandbook -jpeg2k -kerberos -openexr -spell -test -zeroconf"

後述するが、「app-misc/strigi」には「USE=qt4」が必要になる(上の表示では無効)。

kdebase-startkde

KDEの基本パッケージをインストールするには「kdebase-meta」というパッケージをインストールすることになるのだが、KonsoleやらKwriteやら色々と余計なものが(他にも色々と)付いてくる。
KDEのデスクトップにログインして使うところまでには「kde-base/kdebase-startkde」だけを入れればよく、後で好みに応じてパッケージを追加すればよい。
kdelibsに加えて、以下のパッケージがインストールされる。

[ebuild  N    ] kde-base/qimageblitz-0.0.4  USE="3dnow mmx sse sse2 (-altivec) -debug"
[ebuild     U ] app-crypt/gpgme-1.1.6 [1.1.5] USE="-pth%"
[ebuild  N    ] dev-libs/cyrus-sasl-2.1.22-r2  USE="crypt gdbm pam ssl -authdaemond -berkdb -java -kerberos -ldap -mysql -ntlm_unsupported_patch -postgres -sample -srp -urandom"
[ebuild  N    ] kde-base/kdepimlibs-4.0.1  USE="-debug -htmlhandbook -ldap -sasl -test"
[ebuild  N    ] kde-base/libkworkspace-4.0.1  USE="-debug"
[ebuild  N    ] kde-base/kdebase-data-4.0.1
[ebuild  N    ] kde-base/ksplash-4.0.1  USE="3dnow mmx sse sse2 (-altivec) -debug -xinerama"
[ebuild  N    ] kde-base/libtaskmanager-4.0.1  USE="xcomposite -debug"
[ebuild  N    ] kde-base/kdialog-4.0.1  USE="-debug"
[ebuild  N    ] kde-base/kdesu-4.0.1  USE="-debug -htmlhandbook"
[ebuild  N    ] kde-base/kde-wallpapers-4.0.1
[ebuild  N    ] kde-base/kreadconfig-4.0.1  USE="-debug"
[ebuild  N    ] kde-base/solid-4.0.1  USE="-bluetooth -networkmanager -test"
[ebuild  N    ] kde-base/systemsettings-4.0.1  USE="opengl ssl usb -debug -htmlhandbook -ieee1394 -xinerama"
[ebuild  N    ] kde-base/kde-menu-icons-4.0.1
[ebuild  N    ] kde-base/kdeartwork-iconthemes-4.0.1
[ebuild  N    ] kde-base/kstyles-4.0.1
[ebuild  N    ] kde-base/kstartupconfig-4.0.1  USE="-debug"
[ebuild  N    ] kde-base/phonon-4.0.1  USE="-debug -xcb"
[ebuild  N    ] kde-base/kwin-4.0.1  USE="opengl xcomposite -captury -xinerama"
[ebuild  N    ] kde-base/libplasma-4.0.1  USE="opengl -debug -test -xinerama"
[ebuild  N    ] kde-base/kcminit-4.0.1  USE="-debug"
[ebuild  N    ] kde-base/kdebase-kioslaves-4.0.1  USE="bzip2 -debug -htmlhandbook -openexr -samba"
[ebuild  N    ] kde-base/knotify-4.0.1  USE="-debug"
[ebuild  N    ] kde-base/plasma-4.0.1  USE="xcomposite -debug -htmlhandbook -xinerama"
[ebuild  N    ] kde-base/ksmserver-4.0.1  USE="-debug"
[ebuild  N    ] kde-base/ksysguard-4.0.1  USE="lm_sensors -debug -htmlhandbook -test"
[ebuild  N    ] kde-base/krunner-4.0.1-r1  USE="opengl xcomposite xscreensaver -debug"
[ebuild  N    ] kde-base/kdebase-startkde-4.0.1

それぞれはそれほど時間がかかるわけではない。

libplasmaでのエラー

 * This package requires 'app-misc/strigi' to be built with the following USE flags: 'dbus qt4*'.

 * Flags marked with an * are missing.
 *
 * ERROR: kde-base/libplasma-4.0.1 failed.

kdelibsを入れるときに入った「strigi」というパッケージが「USE=qt4」を要求してきたため、これを付けて入れ直す必要があった。

日本語メッセージの表示

メッセージを日本語で表示するためには、「LINGUAS="ja"」で「kde-base/kde-l10n」を入れる。

[ebuild  N    ] kde-base/kde-l10n-4.0.1  LINGUAS="ja -ar -be -bg -ca -cs -csb -da -de -el -en_GB -eo -es -et -eu -fi -fr -fy -ga -gl -hi -hu -it -kk -km -ko -lv -mk -nb -nds -ne -nl -nn -pa -pl -pt -pt_BR -ru -se -sl -sv -th -tr -uk -wa -zh_CN -zh_TW"

その他

ビルドにCMake*1が使用されているものが多く、(所要時間を示しているわけではないものの)進行状況がパーセンテージ表示されるのが嬉しい。

インストール完了

以上のパッケージをインストールすることで、KDE4セッションへのログインができるようになった。

しかし、「コンピュータ」の「場所」からファイルマネージャを開くと、GNOMENautilusが出てきてしまったため、後でDolphinファイルマネージャ(kde-base/dolphin)は追加したほうがよいかもしれない。

使用したバージョン:

*1:クロスプラットフォームなビルドシステムの1つ