Difference between revisions of "CDM"

From ArchWiki
Jump to: navigation, search
(Custom commands for power operations: ConsoleKit is deprecated)
(update Pkg/AUR templates (https://github.com/lahwaacz/wiki-scripts/blob/master/update-package-templates.py))
 
(10 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 
[[Category:Display managers]]
 
[[Category:Display managers]]
 
[[cs:CDM]]
 
[[cs:CDM]]
{{Article summary start}}
+
[[ja:CDM]]
{{Article summary text|Describes installing, configuring and using CDM, minimalistic replacement for login-managers.}}
+
{{Related articles start}}
{{Article summary heading|Related articles}}
+
{{Related|Display manager}}
{{Article summary wiki|Display Manager}}
+
{{Related articles end}}
{{Article summary end}}
+
'''CDM''' is a minimalistic, yet full-featured replacement for login-managers like [[SLiM]], [[KDM]], [[GDM]] and [[qingy]] that provides a fast, dialog-based login system without the overhead of the X Window System or the instability of qingy. Written in pure bash, CDM has almost no dependencies, yet supports multiple users/sessions and can start virtually any DE/WM.
'''CDM''' is a minimalistic, yet full-featured replacement for login-managers like [[slim]], [[Automatic_login_manager_startup#Installation|kdm]], [[Automatic_login_manager_startup#Installation|gdm]] and [[qingy]] that provides a fast, dialog-based login system without the overhead of the X Window System or the instability of qingy. Written in pure bash, CDM has almost no dependencies, yet supports multiple users/sessions and can start virtually any DE/WM.
+
  
 
==Installation==
 
==Installation==
  
Install the {{AUR|cdm-git}} package which is available in the [https://aur.archlinux.org/ AUR].
+
[[Install]] the {{AUR|cdm-git}} package.
  
Now ensure no other other display managers get started by disabling their systemd services with {{ic|systemctl disable}}.
+
Now ensure no other display managers get started by disabling their systemd services with {{ic|systemctl disable}}.
  
 
For example, if you were using the Gnome Display Manager, you would stop it from starting at boot by running
 
For example, if you were using the Gnome Display Manager, you would stop it from starting at boot by running
Line 18: Line 17:
 
  # systemctl disable gdm.service
 
  # systemctl disable gdm.service
  
There is no need to enable a systemd service for CDM. Rather, a script called zzz-cdm.sh will be placed into {{ic|/etc/profile.d}}. This script (along with the rest of the scripts in /etc/profile.d) is run when you login to a login shell. However, in order to prevent a sceanario where a broken configuration prevents a user from accessing both their desktop and a virtual terminal, the script checks to see which virtual terminal it is being run on, and will by default only run on tty1.
+
There is no need to enable a systemd service for CDM. Rather, a script called zzz-cdm.sh will be placed into {{ic|/etc/profile.d}}. This script (along with the rest of the scripts in /etc/profile.d) is run when you login to a login shell. However, in order to prevent a scenario where a broken configuration prevents a user from accessing both their desktop and a virtual terminal, the script checks to see which virtual terminal it is being run on, and will by default only run on tty1.
  
 
Since the script is placed in the global {{ic|/etc/profile.d}} directory, CDM will be run for all users who login on tty1. If you would rather it only run for you, take away executable permissions from {{ic|/etc/profile.d/zzz-cdm.sh}} and copy the contents of that file into your {{ic|~/.bash_profile}} for bash, or {{ic|~/.zprofile}} for zsh.
 
Since the script is placed in the global {{ic|/etc/profile.d}} directory, CDM will be run for all users who login on tty1. If you would rather it only run for you, take away executable permissions from {{ic|/etc/profile.d/zzz-cdm.sh}} and copy the contents of that file into your {{ic|~/.bash_profile}} for bash, or {{ic|~/.zprofile}} for zsh.
Line 49: Line 48:
 
===Starting X===
 
===Starting 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.
+
You can affect the process of starting X server in several ways - 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.
  
 
==Custom commands for power operations==
 
==Custom commands for power operations==
Line 58: Line 57:
 
*[https://bbs.archlinux.org/viewtopic.php?id=84408 The Console Display Manager] - Archlinux Forums thread about CDM
 
*[https://bbs.archlinux.org/viewtopic.php?id=84408 The Console Display Manager] - Archlinux Forums thread about CDM
 
*[https://github.com/ghost1227/cdm GitHub page]
 
*[https://github.com/ghost1227/cdm GitHub page]
 +
*[https://github.com/pale3/cdm GitHub page of an updated fork]

Latest revision as of 21:25, 9 September 2015

Related articles

CDM is a minimalistic, yet full-featured replacement for login-managers like SLiM, KDM, GDM and qingy that provides a fast, dialog-based login system without the overhead of the X Window System or the instability of qingy. Written in pure bash, CDM has almost no dependencies, yet supports multiple users/sessions and can start virtually any DE/WM.

Installation

Install the cdm-gitAUR package.

Now ensure no other display managers get started by disabling their systemd services with systemctl disable.

For example, if you were using the Gnome Display Manager, you would stop it from starting at boot by running

# systemctl disable gdm.service

There is no need to enable a systemd service for CDM. Rather, a script called zzz-cdm.sh will be placed into /etc/profile.d. This script (along with the rest of the scripts in /etc/profile.d) is run when you login to a login shell. However, in order to prevent a scenario where a broken configuration prevents a user from accessing both their desktop and a virtual terminal, the script checks to see which virtual terminal it is being run on, and will by default only run on tty1.

Since the script is placed in the global /etc/profile.d directory, CDM will be run for all users who login on tty1. If you would rather it only run for you, take away executable permissions from /etc/profile.d/zzz-cdm.sh and copy the contents of that file into your ~/.bash_profile for bash, or ~/.zprofile for zsh.

Configuration

You can configure CDM by editing /etc/cdmrc. It is fully documented and should be relatively easy to figure out. You can also have user specific config files by copying /etc/cdmrc to $HOME/.cdmrc.

Menu items

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)

Theming

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.

Starting X

You can affect the process of starting X server in several ways - 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.

Custom commands for power operations

If you want to add entries for power operations, like shutdown, reboot etc., you can include them in binlist array. See systemd#Power management for details.

More resources