Mandriva Linux 2010.1上の幾つかのメモ(ページ3/3)
「Mandriva Linux 2010.1上の幾つかのメモ(ページ2/3)」の続き。
KDE4上のOpenOffice.orgのGUIツールキット
バージョン3.2系の時点ではKDE4上ではQt4のテーマが自動的に用いられるようになっている。他の環境で強制的にQt4を指定するには$ OOO_FORCE_DESKTOP=kde4 ooffice3.2
とする(「kde」ではダメ)。一方でKDE4上のOpenOffice.orgでGTK+ 2を用いたい場合、KDE4上のQt4のテーマ設定(KDE システム設定(systemsettings)の「一般 - 外観」の「スタイル - アプリケーション - ウィジェットのスタイル」)を「GTK+」にしてもよいが、テーマによっては(Qt4を用いた)OpenOffice.org内のメニューなどで見づらくなる部分が出ることがあるので
$ OOO_FORCE_DESKTOP=gnome ooffice3.2
のようにして起動したほうがいいかもしれない。
Mandriva Linux 2010.1上のコマンド名はooffice3.2だが、直接oocalc3.2やoowriter3.2といった名前で直接起動してもこの指定は適用される。
このような指定をいちいち起動時に記述するのが面倒であれば「KDE4の自動実行スクリプトの設定と場所について(バージョン4.3.2時点)」に書いた自動実行スクリプトに環境変数の設定を記述するとよい。
[任意]ファイル名: ~/.kde4/env/ooo-force-desktop-gnome.rc.sh
#! /bin/bash export OOO_FORCE_DESKTOP=gnome
dracut(mkinitrdの代替)
初期RAMディスクイメージ(initrd/initramfs)を更新するmkinitrdの代替ツールdracutが実験的に提供されている。mkinitrdの動作が怪しかったので試してみたところ、手元の環境では起動に問題はなかった。しかし、環境によってはうまく動かないということがあるかもしれない。initrdの作成はmkinitrdと同様
(dracutコマンドによるinitrd作成) $ sudo dracut /boot/initrd-dracut-$(uname -r).img $(uname -r)
のように、引数に出力先ファイルとカーネルのバージョンを指定して実行することで行える。あとはこのinitrdの場所を指定するようにブートローダ項目をMandriva Linux コントロールセンターの「起動 - 起動システムを設定」からGUIで編集するか、もしくは/boot/grub/menu.lstの「initrd」行を書き換える。
initrdが既に存在し、かつそれを上書きする場合は--force(-f)オプションを付ける。
このツールはdracutコマンドとして実行してもよいが、update-alternativesによりmkinitrdコマンドとして互換ラッパー経由で用いることもできる。
(mkinitrdコマンドとして用いるための切り替え) $ sudo update-alternatives --set mkinitrd /sbin/mkinitrd-dracut Using `/sbin/mkinitrd-dracut' to provide `mkinitrd'.
この場合、受け付けるコマンド行オプションはmkinitrd互換となる。一方でdracutコマンドが扱うオプションはこれとは異なる。
(dracutコマンドのヘルプ) $ /sbin/dracut --help Usage: /sbin/dracut [OPTION]... <initramfs> <kernel-version> Creates initial ramdisk images for preloading modules -f, --force Overwrite existing initramfs file. -m, --modules [LIST] Specify a space-separated list of dracut modules to call when building the initramfs. Modules are located in /usr/share/dracut/modules.d. -o, --omit [LIST] Omit a space-separated list of dracut modules. -a, --add [LIST] Add a space-separated list of dracut modules. -d, --drivers [LIST] Specify a space-separated list of kernel modules to exclusively include in the initramfs. --add-drivers [LIST] Specify a space-separated list of kernel modules to add to the initramfs. --filesystems [LIST] Specify a space-separated list of kernel filesystem modules to exclusively include in the generic initramfs. -k, --kmoddir [DIR] Specify the directory, where to look for kernel modules --fwdir [DIR] Specify additional directories, where to look for firmwares, separated by : --kernel-only Only install kernel drivers and firmware files --no-kernel Do not install kernel drivers and firmware files --strip Strip binaries in the initramfs (default) --nostrip Do not strip binaries in the initramfs --mdadmconf Include local /etc/mdadm.conf --nomdadmconf Do not include local /etc/mdadm.conf --lvmconf Include local /etc/lvm/lvm.conf --nolvmconf Do not include local /etc/lvm/lvm.conf -h, --help This message --debug Output debug information of the build process -v, --verbose Verbose output during the build process -c, --conf [FILE] Specify configuration file to use. Default: /etc/dracut.conf -l, --local Local mode. Use modules from the current working directory instead of the system-wide installed in /usr/share/dracut/modules.d. Useful when running dracut from a git checkout. -H, --hostonly Host-Only mode: Install only what is needed for booting the local host instead of a generic host. -i, --include [SOURCE] [TARGET] Include the files in the SOURCE directory into the Target directory in the final initramfs. -I, --install [LIST] Install the space separated list of files into the initramfs. (mkinitrd-dracutのヘルプ) $ /sbin/mkinitrd-dracut --help usage: mkinitrd-dracut [--version] [--help] [-v] [-f] [--preload <module>] [--force-scsi-probe | --omit-scsi-modules] [--omit-ide-modules] [--image-version] [--force-raid-probe | --omit-raid-modules] [--with=<module>] [--force-lvm-probe | --omit-lvm-modules] [--builtin=<module>] [--omit-dmraid] [--net-dev=<interface>] [--fstab=<fstab>] [--nocompress] <initrd-image> <kernel-version> [--dsdt[=<dsdt.aml>]] [--bootchart]] (ex: mkinitrd-dracut /boot/initrd-2.6.33.5-desktop-2mnb.img 2.6.33.5-desktop-2mnb) $ /sbin/mkinitrd-dracut --version mkinitrd: dracut compatibility wrapper (オリジナル版mkinitrdのヘルプ) $ fakeroot /sbin/mkinitrd-mkinitrd --help usage: mkinitrd-mkinitrd [--version] [--help] [-v] [-f] [--preload <module>] [--force-scsi-probe | --omit-scsi-modules] [--omit-ide-modules] [--image-version] [--force-raid-probe | --omit-raid-modules] [--with=<module>] [--force-lvm-probe | --omit-lvm-modules] [--builtin=<module>] [--omit-dmraid] [--net-dev=<interface>] [--fstab=<fstab>] [--nocompress] <initrd-image> <kernel-version> [--dsdt[=<dsdt.aml>]] [--bootchart]] (ex: mkinitrd-mkinitrd /boot/initrd-2.6.33.5-desktop-2mnb.img 2.6.33.5-desktop-2mnb) $ fakeroot /sbin/mkinitrd-mkinitrd --version mkinitrd: version 6.0.93
使用したバージョン:
- OpenOffice.org(Go-oo) 3.2.0
- Dracut 005-1mdv2010.1