Xfce
Xfce は高速で、かっこよく、ユーザフレンドリーであるように構築された、軽量なデスクトップ環境です。
前提条件
プロファイルを選択する
プロファイルの変更を実行する前に、関連するドキュメントを読んでください。
基本的なデスクトッププロファイルを使用することで、Xfce にとって良いデフォルトのセットが得られるでしょう。他のプロファイルも使用できますが、依存関係と使いやすさを天秤にかけて、これが良いでしょう。デスクトッププロファイルを選択するには:
root #
eselect profile set default/linux/amd64/17.1/desktop
不要な依存を回避する
Xfce を emerge すると、app-text/poppler パッケージが依存関係としてインストールされるでしょう。デスクトッププロファイルでは、このパッケージはデフォルトで qt5
USE フラグを使用しているため、Xfce には不要かもしれない Qt の依存関係をインストールすることになります。これを回避する方法のひとつは、poppler に対してこの USE フラグを無効化することです:
/etc/portage/package.use/xfce
poppler の qt5 USE フラグをアンセットするapp-text/poppler -qt5
もちろん、このフラグをグローバルでアンセットしたい場合は、/etc/portage/make.conf に -qt5
を追加しても構いません。
xfce4-notifyd
このステップは x11-misc/notification-daemon の代わりに xfce-extra/xfce4-notifyd をインストールするための省略可能なステップです。通知デーモンの選択が重要でない場合は、このセクションは読み飛ばしてください。
xfce-base/xfce4-meta を emerge すると、virtual/notification-daemon が依存パッケージとして取り込まれるでしょう。この仮想依存パッケージは、通知デーモンとしての役割を担う適切なソフトウェアをユーザが選択し、それを notification-daemon として Xfce に確実に提供できるように設計されています。
デフォルトでは、virtual/notification-daemon は GNOME の x11-misc/notification-daemon パッケージを持ち込むことでこの依存関係を解決するでしょう。notification-daemon がまだインストールされていない場合、Xfce ユーザは xfce-extra/xfce4-notifyd を使用することを好むかもしれません。
Xfce を emerge する前に xfce-extra/xfce4-notifyd をインストールしておくと、仮想パッケージ virtual/notification-daemon は xfce4-notifyd を使用し、他のパッケージを取り込むことをしなくなるでしょう。xfce4-notifyd が world ファイルに追加されるのを回避するためには、--oneshot
オプションを使用してください:
root #
emerge --ask --oneshot xfce-extra/xfce4-notifyd
それでは、インストールに進んでください。
インストール
USE フラグ
USE flags for xfce-base/xfce4-meta The Xfce Desktop Environment (meta package)
minimal
|
Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features) |
pulseaudio
|
Add support for PulseAudio sound server |
svg
|
Add support for SVG (Scalable Vector Graphics) |
upower
|
Enable power management support |
Emerge
おおよそ完全なデスクトップ環境を得るには、Xfce パッケージのデフォルトセットのために /etc/portage/make.conf を emerge してください:
root #
emerge --ask xfce-base/xfce4-meta
xfce-base/xfce4-meta パッケージは以下のユーザ向けアプリケーションに加えて、いくつかのライブラリとシステムソフトウェアを提供するでしょう:
パッケージ | 説明 |
---|---|
x11-terms/xfce4-terminal | Xfce とよく統合された端末エミュレータで、標準の xterm プログラムより「親しみやすい」です。 |
xfce-base/xfce4-panel | アプリケーションランチャ、パネルメニュー、ワークスペーススイッチャー等を備えたデスクトップパネルです。 |
xfce-base/xfce4-settings | Xfce デスクトップ環境のための構成設定システムで、設定ダイアログとツールを提供します。 |
xfce-base/thunar | Thunar は Xfce のファイルマネージャです。 |
xfce-base/xfce4-appfinder | アプリケーションファインダ。 |
xfce-base/thunar-volman | リムーバブルメディアとドライブを管理します。 |
xfce-base/tumbler | Thunar 用のファイルプレビューワ。 |
xfce-base/xfce4-power-manager | 電源使用状況を監視し、管理するアプリケーション (特にラップトップで重要です)。最高パフォーマンスモードか省電力モードかを選びます。スクリーンの明るさを調節し、ハイバネート、サスペンド、シャットダウンのアクション (折り畳まれたり、ボタンが押されたりしたときの動作) をセットアップします。バッテリが一定レベルに達したときに警告を発したり、マシンの電源を切ったりすることができます。バッテリの状態と充電状態を表示し、明るさを調節するためのパネルプラグインを含んでいます。 |
xfce-extra/xfce4-pulseaudio-plugin | パネルのための音量調節。pulseaudio を使用しないシステムでは media-sound/volumeicon が選択肢に入るかもしれません。 |
xfce-base/xfce4-meta によってインストールされるすべてのパッケージを確認するには、pgo 上の当該パッケージの Dependencies タブを確認してください。
厳密には xfce-base/xfce4-meta を使用する必要はありません。Xfce は欲しい部品だけをインストールすることで「カスタムビルド」することができますが、そのためには、何が必要なのかについてある程度の知識が必要であることに注意してください。
追加のソフトウェア
Xfce プロジェクトには多くの追加機能が存在し、そのうち特筆すべきものとして次のソフトウェアがあります:
パッケージ | 説明 |
---|---|
app-cdr/xfburn | CD 書き込みアプリケーション。 |
app-editors/mousepad | 軽量なテキストエディタ。 |
x11-themes/xfwm4-themes | いくつかのウィンドウマネージャテーマ。 |
xfce-extra/thunar-archive-plugin | アーカイブを操作するための Thunar 向けプラグイン; app-arch/file-roller を使用しています。 |
xfce-extra/xfce4-battery-plugin | バッテリー残量のパーセンテージ、残り時間、電源 (AC かバッテリーか)、ファンステータス、警告を表示し、特定の電力レベルに達したときにコマンドを実行するように設定することもできます。ラップトップのバッテリーが切れそうになったときに、ハイバネートモードに移行するために使用することができます。 |
xfce-extra/xfce4-mount-plugin | /etc/fstab にあるデバイスをワンクリックでマウントします。 |
xfce-extra/xfce4-sensors-plugin | CPU 温度、ファン回転数、ハードディスク温度、マザーボード電圧などのハードウェアセンサを監視します。 |
xfce-extra/xfce4-verve-plugin | パネルに埋め込まれた小さなコマンドライン; 新しい端末を開くよりも素早くコマンドを実行できます。 |
これらは Gentoo リポジトリで利用可能なパッケージのほんの一部です。xfce-extra カテゴリから気になるパッケージを確認するには、p.g.o/categories/xfce-extra を見るか、eix を利用してください (eix --category xfce-extra)。さらなる情報については https://www.xfce.org/projects/ もお読みください。
以下のアプリケーションは、Xfce の基本的なデスクトップ環境を取り囲むようにして相性良く機能します:
パッケージ | 説明 |
---|---|
x11-misc/alacarte | GNOME のメニューエディタで、Xfce でも使えます。 |
x11-terms/tilda | quake 風の軽量な端末エミュレータ。 |
使い方
Xfce を起動する
Xfce は、ログインした後にターミナルから実行することもでき、ログイン後に自動で起動することもでき、ユーザに挨拶してログイン詳細の入力を求める、グラフィカルなディスプレイマネージャによって開始することもできます。
ディスプレイマネージャを使わずに Xfce を開始する
startx と startxfce4 はディスプレイマネージャを使わずに Xfce を開始するためにすぐに使える選択肢の 2 つです。
startx
startx を使用するときは、~/.xinitrc ファイルを以下の内容で作成してください:
~/.xinitrc
startx の実行時に xfce4 を開始するexec startxfce4
認証または権限の問題が発生した場合は、トラブルシューティングのセクションを見てください。
startxfce4
Xfce4 デスクトップを起動するには、コマンドラインにただ startxfce4 とだけ入力し、エンターキーを押してください:
user $
startxfce4
ディスプレイマネージャ
ディスプレイマネージャを使用して Xfce を開始することもできます。ディスプレイマネージャを設定するには、ディスプレイマネージャの記事を参照してください。
ほとんどのディスプレイマネージャは、利用可能なセッションを設定するために .desktop ファイルを使用します。以下はディスプレイマネージャを利用して Xfce を起動するのに使える desktop ファイルの例です:
xfce4.desktop
ディスプレイマネージャのための Xfce4 の desktop ファイル[Desktop Entry] Encoding=UTF-8 Name=Xfce4 Comment=Use this session to run Xfce 4 as desktop environment Exec=/usr/bin/startxfce4 Icon=/usr/share/pixmaps/xfce4_xicon1.png Type=Application
desktop ファイルは、ディスプレイマネージャーの適切な場所に配置できます。
設定
Xfce is a desktop environment and as such can be tuned and tailored to the needs of (almost) every user. In this section, a number of popular (or more challenging) aspects are covered.
音量キー
音量キーを管理するためには、xfce-extra/xfce4-volumed-pulse をインストールしてください:
root #
emerge --ask xfce-extra/xfce4-volumed-pulse
pulseaudio を使用していないシステムには、media-sound/tudor-volumed が選択肢になるかもしれません。
または、xfce4-keyboard-settings を実行してカスタムキーを amixer にバインドすることもできます:
- volume up ボタン: amixer set Master 5%+
- volume down ボタン: amixer set Master 5%-
- mute ボタン: amixer set Master toggle
一貫した GTK 3 テーマ
Greybird テーマを使用するのがひとつの選択肢です。これは GTK 2、GTK 3、xfwm4、emerald、そして metacity をサポートしています:
root #
emerge --ask x11-themes/greybird
Xfce メニュー -> 設定 -> 概観 に移動してください。それか、xfce4-appearance-settings を実行してください。「スタイル」のリストから「Greybird」を選択してください。
これで GTK 2 と GTK 3 アプリケーションは一貫した見た目になるはずです。
他のテーマ
Portage で利用可能な、XFCE と互換性のある他のテーマは、以下のリストで emerge することができます:
root #
emerge --ask x11-themes/clearlooks-phenix x11-themes/gnome-themes-standard x11-themes/light-themes x11-themes/murrine-themes x11-themes/shiki-colors x11-themes/tactile3 x11-themes/zukini
トラブルシューティング
垂直ウィンドウスナッピングを有効化する
Most modern desktop environments have vertical window snapping enabled by default. This is also possible in Xfce, but not by default. To enable, navigate to: Settings → Window manager → Advanced tab.
- Make sure the "Snap windows to screen border" checkbox has been checked.
- Make sure the checkboxes under "Wrap workspaces when reaching the screen edge" have been unchecked. These interfere with vertical window snapping.
Once the checkboxes are set it should be now possible to drag a window to the right or left side of the screen, which should cause the window to resize to 50% of the screen width.
Keyboard shortcuts can be set in order to do this via the typical Super+← or Super+→ behavior. Navigate to Settings → Window manager → Keyboard tab.
Set the "Tile window to the left" and "Tile window to the right" actions with the Super+← and Super+→ key combinations respectively.
オーディオミキサーが pavucontrol バイナリが無いと文句を言う
パネルのスピーカー (オーディオ) アイコンをクリックして、オーディオミキサー… を選択すると、"pavucontrol バイナリが見つかりません" というメッセージが表示されます。
解決策は、media-sound/pavucontrol をインストールすることです:
root #
emerge --ask media-sound/pavucontrol
Xfce4-screensaver がアンロックできない
Xfce-screensaver uses gnome-keyring by default to authenticate. By applying the installation method above, gnome-keyring will not be pulled and pam will be unable to service the default configuration installed in /etc/pam.d/xfce4-screensaver. Either pull gnome-keyring, otherwise the file should be modified to allow system-auth to be used on passwords:
/etc/pam.d/xfce4-screensaver
auth include system-auth password include system-auth
認証または権限の問題
When experiencing authorization or permissions issues within xfce4 in an OpenRC profile (symptoms include being unable to open power manager and unable to suspend/hibernate) make sure that sys-auth/elogind is installed and properly configured, and that the elogind
USE flag is globally enabled.
If launching with startx, replace the appropriate line in ~/.xinitrc with the following:
~/.xinitrc
startx を実行したときに正しい方法で xfce4 を開始するexec dbus-launch --exit-with-session xfce4-session
Dual-monitors get mirrored after monitor suspend
There are (at least) three ways to solve this issue. First is to save the display settings as the default monitor layout profile, then enable that profile as "new monitors connect". There's also the option to show a dialog whenever new monitors are detected, which will default to the profile instead of mirroring, when one is available. Navigate to Settings -> Display -> Advanced to find these options. Remember to configure the display settings before saving the first profile.
2nd way is to kill xfsettingsd after logging to the Xfce session. However this will also make some functionality unavailable, such as global hotkeys. A custom script can be created that kills the service, and add that to the autostarting applications list.
3rd is to have a custom script that can be executed via a .desktop icon on the desktop, panel, or ran manually each time the monitors are turned on.
Review the monitor IDs using the xrandr command.
The custom script could look something like the following:
~/bin/configuremonitors.sh
configuremonitors.shxrandr --output HDMI-A-0 --right-of DisplayPort-0 --auto
関連項目
- Desktop environment — Gentoo で利用可能なデスクトップ環境の一覧を提供します。
- Xfce/Guide — 高速で軽量でフル機能のデスクトップ環境である Xfce への包括的なイントロダクションを提供します。