CDM

提供: ArchWiki
2015年2月14日 (土) 17:08時点におけるKusakata (トーク | 投稿記録)による版 (ページの作成:「Category:ディスプレイマネージャ cs:CDM en:CDM {{Related articles start}} {{Related|ディスプレイマネージャ}} {{Related articles end}} '''...」)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
ナビゲーションに移動 検索に移動

関連記事

CDM はミニマルでありながら、SLiM, KDM, GDM, Qingy と同じように機能が揃っているログインマネージャです。X Window System のオーバーヘッドや Qingy のような不安定さを感じさせない、高速なダイアログベースのログインシステムを提供します。Bash だけで書かれているため、CDM の依存パッケージは非常に少なく、それでいながらあらゆる DE/WM を起動して複数のユーザー/セッションをサポートします。

インストール

AUR にある cdm-gitAUR パッケージをインストールしてください。

そして systemctl disable を使って他のディスプレイマネージャの systemd サービスは全て無効化するようにします。

例えば、GNOME ディスプレイマネージャを使っていた場合、次を実行することで停止できます:

# systemctl disable gdm.service

CDM を使うのに systemd サービスを有効にする必要はありません。代わりに、zzz-cdm.sh という名前のスクリプトを /etc/profile.d に配置します。このスクリプトはログインマネージャにログインしようとしたときに (/etc/profile.d 内の他のスクリプトと一緒に) 実行されます。ただし、設定が間違っている時にデスクトップにも仮想端末にもユーザーがアクセスできない事態にならないように、スクリプトは実行されている仮想端末をチェックしてから、それからデフォルトで tty1 でのみ動作します。

スクリプトはグローバルな /etc/profile.d ディレクトリに配置するので、CDM は tty1 でログインするユーザー全てで動作します。使用するユーザーを限定したい場合は、/etc/profile.d/zzz-cdm.sh の実行パーミッションを変更してファイルの中身を、bash なら ~/.bash_profile、zsh なら ~/.zprofile にコピーしてください。

設定

CDM は /etc/cdmrc を編集することで設定できます。完全な注釈があるので設定するのは比較的簡単です。/etc/cdmrc$HOME/.cdmrc にコピーすることでユーザー個別の設定ファイルを使うこともできます。

メニューアイテム

Menu items are configured using three arrays: binlist, namelist and flaglist. Order of items in these arrays is important, items with the same index describe the same menu item. binlist contains commands which are executed, namelist contains names which are shown in the menu and flaglist contains type of the programs specified in binlist, either 'X' for X sessions or 'C' for console programs. Basically X sessions are started using startx (the item in binlist is argument of startx command) and console programs are started using exec.

There is a sample configuration:

binlist=(
  "~/.xsession"                                   # Launch your X session,
  "/bin/bash --login"                           # or just execute your shell,
  "/usr/bin/fbterm"                             # or start a frame buffer console,
  "/usr/bin/cdm ~/.submenu.cdmrc"  # or go to a submenu :)
)
namelist=("X session" Console FBTerm "Sub menu")
flaglist=(X C C C)

テーマ

Themes are located in /usr/share/cdm/themes, all you have to do is pass full path of the theme file to dialogrc variable in /etc/cdmrc, for example

dialogrc=/usr/share/cdm/themes/cdm

The theme syntax is fairly self explanatory, the best way to start a new theme would be to duplicate and edit an existing theme.

X を起動

You can affect the process of starting X server in several ways - use of ConsoleKit is optional, you can specify on which tty the X server will be started (specify either number or 'keep' if you want to run X server on current tty), and finally you can specify custom X server arguments.

電源管理のカスタムコマンド

シャットダウンや再起動などの電源管理のエントリを追加したい場合は、binlist に記述してください。詳しくは systemd#電源管理 を参照。

参照