Cinnamon

From Gentoo Wiki
Jump to:navigation Jump to:search
This page is a translated version of the page Cinnamon and the translation is 74% complete.

Cinnamon は、伝統的グラフィカルインターフェースを備えた、現代的なデスクトップ環境です。GNOME 2、LXDE、または Xfce のユーザには馴染み深いものと感じられるでしょう。Cinnamon は非常に良いグラフィックと機能的特徴を備えています。GNOME 3 の GNOME Shell からフォークされて、Linux Mint のために開発され、Gentoo では amd64x86 アーキテクチャで利用可能です。現時点では Wayland をサポートしていません。[1]

インストール

前提条件

Cinnamon は systemd 上でも、systemd の無い環境でもよく機能します。systemd への依存を含めずにインストールするには、eselect を使って、プロファイルを default/linux/amd64/17.1/desktop のような Gnome を含まないものに切り替えてください。systemd を含めてインストールするには、default/linux/amd64/17.1/desktop/gnome/systemd のような Gnome が有効化されたプロファイルを使用してください。いずれの場合も、アーキテクチャとバージョンは異なることがあります。

重要
プロファイルの変更を実行する前に、関連するドキュメントを読んでください。

利用可能なシステムプロファイルのリストを取得するには:

root #eselect profile list
[16]  default/linux/amd64/17.1 
[17]  default/linux/amd64/17.1/selinux 
[18]  default/linux/amd64/17.1/hardened 
[19]  default/linux/amd64/17.1/hardened/selinux 
[20]  default/linux/amd64/17.1/desktop
[21]  default/linux/amd64/17.1/desktop/gnome 
[22]  default/linux/amd64/17.1/desktop/gnome/systemd
...

OpenRC

OpenRC のシステムで、適切なシステムプロファイルを設定:

root #eselect profile set default/linux/amd64/17.1/desktop

上記プロファイルを、対応するプロファイル番号を用いて指定することも可能です:

root #eselect profile set 20

systemd のない Gentooの記事に説明があります。

systemd

警告
systemd プロファイルに変更する前に、systemd ドキュメントを読んでください。

Systemd のシステム上での Cinnamon には、 GNOME デスクトップ用プロファイルのうち systemd の付いたものを選びます:

root #eselect profile set default/linux/amd64/17.1/desktop/gnome/systemd
メモ
文字列の末尾が /gnome/systemd であれば、システムアーキテクチャ (amd64) とバージョン (17.1) は異なっていても構いません。

Xorg

Cinnamon を動作させるにはもちろん Xorg をインストールして設定しておく必要があります。この記事の内容で進める前に X サーバをセットアップしておいてください。必要であれば、Xorg Gentoo ガイドの startx を用いるの節で詳しく説明されているように、Xorg をテストしてください。

国際化

Cinnamon (および他のアプリケーション) は国際化されていて、多くの言語に対応しています。Gentoo の初期インストール中でなければ、make.conf 内で LINGUAS に適切な言語の値を追加してください:

ファイル /etc/portage/make.confmake.conf でフランス語を指定する例
LINGUAS="fr" # or en, de, it, es, etc.

USE フラグ

USE flags for gnome-extra/cinnamon A fork of GNOME Shell with layout similar to GNOME 2

desktop-portal Enable sys-apps/xdg-desktop-portal backend implementation for Cinnamon
eds Enable support for Evolution-Data-Server (EDS)
gstreamer Add support for media-libs/gstreamer (Streaming media)
gtk-doc Build and install gtk-doc based developer documentation for dev-util/devhelp, IDE and offline use
networkmanager Enable net-misc/networkmanager support
nls Add Native Language Support (using gettext - GNU locale utilities)
wayland Enable dev-libs/wayland backend

Python ターゲットに関する詳細は、Python プロジェクトの PYTHON TARGETS の記事をみてください。

icupulseaudio および gnome-keyring USE フラグは Cinnamon の依存関係として必要です。これらがまだ設定されていない場合は、emerge --ask gnome-extra/cinnamonpackage.use (または package.use/cinnamon) を作成または更新するか、他の方法で手動で USE フラグを設定してください。

Emerge

上のステップがすべて完了したら、Cinnamon を emerge するように Portage に指示してください:

root #emerge --ask gnome-extra/cinnamon
メモ
net-libs/webkit-gtk のコンパイル時間は、特に古いハードウェアでは、非常に長くなることがあります。この問題は、このデスクトップシステムでソーシャルメディアの通知を受け取りたくない場合は、gnome-online-accounts USE フラグを取り除くことで解消することができます。

システム設定

Cinnamon のテーマを見る前に、エンドユーザが直感的な方法でシステムを操作できるように、ブート時またはユーザの要求時にシステムが適切に Cinnamon を開始できるように設定して、適切な権限委譲設定を有効化してください。

systemd サービス

systemd では dbus を有効化する必要があります。systemd のページで詳しく解説されているように、systemctl を使用してください。

OpenRC サービス

dbus、openrc-settingsd、elogind

Xorg サーバと Cinnamon は dbusopenrc-settingsd、そして elogind サービスを必要とします。これらがシステムブート時に開始されるようにしてください:

root #rc-update add dbus default
root #rc-update add openrc-settingsd default
root #rc-update add elogind boot

次に、これらのサービスを開始してください (システムを再起動する必要はありません):

root #rc-service dbus start
root #rc-service openrc-settingsd start
root #rc-service elogind start

NetworkManager

NetworkManager is a Cinnamon dependency and is not needed if the network was configured during the initial Gentoo installation. It should not run concurrently with another network service. If NetworkManager is desired be sure to disable other network management programs or services before starting it. For example, if the system was originally configured to use Gentoo's netifrc scripts to manage the network connections, disable these network services:

root #rc-service net.eth0 stop
root #rc-update del net.eth0 default
メモ
When using sys-fs/udev network interfaces will be using Predictable Network Interface Names to name the active interfaces. This will produce names like enp12s0, eno1, enp2s0, etc. When using sys-fs/eudev, the Gentoo udev fork avoiding systemd dependencies, the first network interface name is often still called eth0.

After removing the other network services, add NetworkManager:

root #rc-service NetworkManager start
root #rc-update add NetworkManager default

NetworkManager アップレットの無効化

If NetworkManager is not used, the Network Manager applet will fail to start up, which will show up as a problem during startup.

To disable the applet, go to System Settings -> Preferences -> Applets, find "Network Manager" and click the minus button.

Sudo

通常ユーザが Cinnamon からシステムを再起動またはシャットダウンするためには、ある設定がされた sudo が必要です。

まずは app-admin/sudo をインストールします:

root #emerge --ask app-admin/sudo

次に、visudo コマンドで sudo 構成を修正してください:

root #visudo

visudo は sudoers ファイルを生成または更新するために、デフォルトのテキストエディタを実行します。下のテキスト中の username を、Cinnamon を使用する各ユーザのユーザ名で置き換えてください:

ファイル /etc/sudoers
username  ALL=(root) NOPASSWD: /sbin/reboot
username  ALL=(root) NOPASSWD: /sbin/halt
username  ALL=(root) NOPASSWD: /sbin/poweroff
username  ALL=(root) NOPASSWD: /sbin/shutdown

あるいは、wheel グループに対して設定するには:

ファイル /etc/sudoers
%wheel  ALL=(root) NOPASSWD: /sbin/reboot
%wheel  ALL=(root) NOPASSWD: /sbin/halt
%wheel  ALL=(root) NOPASSWD: /sbin/poweroff
%wheel  ALL=(root) NOPASSWD: /sbin/shutdown

Polkit のルールとアクション

For an ordinary user to perform additional highly privileged actions from Cinnamon, policy kit must be configured. Use pkaction to get a list of actions; the names should be self-explanatory:

root #pkaction
org.cinnamon.settings-daemon.plugins.power.backlight-helper
org.cinnamon.settings-users
org.cinnamon.settingsdaemon.datetimemechanism.configure
org.freedesktop.ModemManager1.Contacts
org.freedesktop.ModemManager1.Control
org.freedesktop.ModemManager1.Device.Control
org.freedesktop.ModemManager1.Firmware
org.freedesktop.ModemManager1.Location
org.freedesktop.ModemManager1.Messaging
org.freedesktop.ModemManager1.USSD
org.freedesktop.NetworkManager.enable-disable-network
org.freedesktop.NetworkManager.enable-disable-wifi
etc.

The simplest way is to authorize all actions by only testing wheel group membership. Put a JavaScript file with a .rules extension in /etc/polkit-1/rules.d, named for example 55-allowing-all-actions.rules:

ファイル /etc/polkit-1/rules.d/55-allowing-all-actions.rulesSetting general polkit rule
polkit.addRule (function (action, subject)
{
  if (subject.isInGroup ("wheel"))
  {
    return polkit.Result.YES;
  }
});

To only authorize some actions, the action names must be iterated. For a wheel group user to suspend, hibernate, shutdown and restart the system, make a 55-allowing-actions.rules file like so:

ファイル /etc/polkit-1/rules.d/55-allowing-actions.rulespolkit ルールを設定する
polkit.addRule (function (action, subject)
{
  if (action.id == "org.freedesktop.upower.hibernate" ||
      action.id == "org.freedesktop.upower.suspend" ||
      action.id == "org.freedesktop.consolekit.system.stop" ||
      action.id == "org.freedesktop.consolekit.system.restart" &&
      subject.isInGroup ("wheel"))
      {
        return polkit.Result.YES;
      }
});

Various actions can be added: those to change color profiles, use Nemo (Cinnamon files manager) as root, mount and eject media, set screen backlight, use network manager, change wallpaper, etc. Several polkit.addRule (function (action, subject){ … }); blocks can be used next to each other as well, and several files can be added.

重要
/etc/polkit-1/rules.d/50-default.rules already exists. Newly created file(s) names should begin with a number bigger than 50, 55 for example, so they are processed after the 50-default.rules file. Do not make a file which would be processed before it, for instance one beginning with 45.

Cinnamon の起動

ログイン/ディスプレイマネージャを使用しない場合は、ユーザのホームディレクトリに Cinnamon を開始する .xinitrc ファイルを作成してください (D-bus も自動的に起動されるでしょう):

ファイル ~/.xinitrcCinnamon 起動の指示
exec cinnamon-session

そして Xorg と Cinnamon を開始するために、ログイン後に startx を実行してください:

user $startx

ディスプレイマネージャを使用する場合は、ディスプレイマネージャの指示に従ってください。

テーマ

Mint-X アイコン

デフォルトでは Cinnamon には Gnome アイコンが付属しています。Mint-X アイコンは GitHub にあります。Mint-X アイコンセットをダウンロード、展開して、/usr/share/icons に配置してください:

root #mv 展開したアーカイブへのパス/mint-x-icons-master/usr/share/icons/Mint-X /usr/share/icons/Mint-X

次に、キャッシュを作成してください:

root #gtk-update-icon-cache /usr/share/icons/Mint-X

新しいアイコンセットは Cinnamon コントロールセンターで選択できます。Mint-X アイコンは緑色ですが、Mint-X-Grey や Mint-X-Orange など、異なる色を持つ他のアイコンセットもインストールすることができます。これらのためのキャッシュも作成しておいてください。

重要
色付きのアイコンセットは Mint-X アイコンセットに依存しています。他の色のアイコンセットを使用してもしなくても、Mint-X は常にインストールしてください。

Desktop icons text color

メモ
Cinnamon バージョン 2.6.13 現在デスクトップアイコンの文字色は白であり、この節は古いバージョンの Cinnamon に適用されるものです……。が、Cinnamon のテーマ設定への良い導入として残しています。

An icon's text color in Cinnamon desktop is black by default, which is not always readable. The instructions to change this color depends on the GTK 3 version that the system is using. Get the currently used version with:

user $emerge --info x11-libs/gtk+
  • In GTK versions less than 3.13.3, this setting can only be changed system-wide. Change the text color by adding CSS rules to the /usr/share/themes/Adwaita/gtk-3.0/gtk.css file (Adwaita is the default theme coming with GTK), after the @import line:
ファイル /usr/share/themes/Adwaita/gtk-3.0/gtk.cssGTK < 3.13.3 のための CSS ルール
@import url("resource:///org/gnome/adwaita/gtk-main.css");
 
/* 追加した css ルール */
.nemo-desktop.nemo-canvas-item {
  color: #fff;  /* #fff は web での白色の表記です、#333 だと暗い灰色になります */
}
 
.nemo-desktop.nemo-canvas-item:selected {
  background-color: alpha (#fff, 0.2);  /* 0.2 は透明度です */
}
The 2nd rule concerns the selected desktop icon and can be modified to get another background color or set the transparency.
  • In more recent GTK versions (3.13.3 onward), this must be tuned through a user-specific configuration file. Adwaita is now included in GTK as the theme replacing Raleigh, so rules must be set in the user's home directories. The file to edit is ~/.config/gtk-3.0/gtk.css (create ~/.config/gtk-3.0/ directory if needed), and the change is now without the @import line. Additionally in this example, the left Nemo side bar is gray colored:
ファイル ~/.config/gtk-3.0/gtk.cssGTK ≥ 3.13.3 用 のスタイルシートのルール
.nemo-desktop.nemo-canvas-item {
  color: #fff;
}
 
.nemo-desktop.nemo-canvas-item:selected {
  background-color: alpha (#fff, 0.2);
}
 
NemoWindow .sidebar, NemoWindow .sidebar .view {
  background-color: #444;
  color: #eee; /* light grey */
}

Mint-X テーマ

Cinnamon comes with a default cinnamon theme, obviously... The Mint-X themes are available for download on GitHub. Download them, unzip, and copy to /usr/share/themes if needed. They can be selected in the Cinnamon Control Center.

Playing with themes

Almost all theme settings can be changed in the cinnamon.css file in the theme directory.

For example with the Cinnamon theme, which is not in /usr/share/themes but in /usr/share/cinnamon/theme, first copy the theme's directory to a user .themes sub-directory, named for example other-cinnamon, which will be the new theme name:

root #mkdir /home/ユーザ名/.themes/other-cinnamon
root #cp -R /usr/share/cinnamon/theme /home/ユーザ名/.themes/other-cinnamon/cinnamon
root #chown -R ユーザ名:ユーザ名 /home/ユーザ名/.themes/other-cinnamon

Edit ~/.themes/other-cinnamon/cinnamon/cinnamon.css. The results of the changes can be viewed immediately by selecting another theme in Cinnamon Control Center, then reselecting the theme being changed.

一般的なアプリケーションソフト

ターミナルエミュレータ

GNOME 内の定番ソフトウェア

A number of popular applications are available as well, built for Gnome and working flawlessly in Cinnamon:


root #emerge --ask gnome-extra/gnome-calculator media-gfx/gnome-screenshot media-gfx/eog app-text/evince gnome-extra/gnome-system-monitor app-arch/file-roller app-cdr/brasero app-editors/gedit

GNOME に入っていないソフトウェア

Also working flawlessly in Cinnamon:


Compile app-text/qpdfview and media-video/vlc with qt5 USE flags to get a GUI.

トラブルシューティング

If problems occur, try to get access to the live error messages. These can be displayed on a separate (virtual) terminal or in a log file. If the messages cannot be found, try starting Cinnamon from the command line rather than through a display manager. Alternatively have a look at /var/log/Xorg.0.log.

When the error or warning messages are not sufficient to troubleshoot Cinnamon, start it with the --debug parameter to get more detailed Xorg messages:

ファイル ~/.xinitrcCinnamon のデバッグモードでの起動
exec cinnamon-session --debug

If Cinnamon cannot launch, deleting (or renaming) .cinnamon in the home directory is not enough: other Cinnamon or Gnome items must be deleted (or renamed) too before X restarts. These can be found in the .cache, .config and .local XDG directories. .gnome2 can be deleted (or renamed) entirely.

リフレッシュレート

It's possible to set custom refresh rate via ~/.config/monitors.xml file. Replace <rate>60</rate> with preferred setting.

関連項目

  • Desktop environment — Gentoo で利用可能なデスクトップ環境の一覧を提供します。
  • Xfce — 高速で、かっこよく、ユーザフレンドリーであるように構築された、軽量なデスクトップ環境です。
  • MATE — a fork of the GNOME 2 desktop environment designed to retain the look and feel of a 'traditional' desktop environment.
  • GNOME — a feature-rich desktop environment provided by the GNOME project.
  • KDE — 人気のPlasmaデスクトップ環境を含む、豊富なアプリケーションを開発しているフリーソフトウェアコミュニティです。

参照

外部の情報