Cdm: Difference between revisions
From wikinotes
No edit summary |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
{{ NOTE | | {{ NOTE | | ||
interestingly, since [[xorg]] is not running yet, you may be able to change the <code>xorg.conf</code> that is loaded for each entry.. }} | interestingly, since [[xorg]] is not running yet, you may be able to change the <code>xorg.conf</code> that is loaded for each entry.. }} | ||
{{ NOTE | | |||
this is more complicated than it needs to be, just write your own .zprofile }} | |||
= Documentation = | = Documentation = | ||
Line 22: | Line 24: | ||
|} | |} | ||
</blockquote><!-- Tutorials --> | </blockquote><!-- Tutorials --> | ||
= Locations = | |||
<blockquote> | |||
{| class="wikitable" | |||
|- | |||
| <code>/etc/cdmrc</code> || system config | |||
|- | |||
| <code>~/.config/cdm/cdmrc</code> || user config | |||
|- | |||
| <code>/usr/share/doc/cdm/themes/*</code> || themes | |||
|- | |||
| <code>/usr/share/xsessions/*.desktop</code> || default installed xsessions | |||
|- | |||
|} | |||
</blockquote><!-- Locations --> | |||
= Usage = | |||
<blockquote> | |||
== Default == | |||
<blockquote> | |||
After copying <code>~/.profile</code> (see below),<br> | |||
simply login on TTY1 and you will be provided with login choices. | |||
</blockquote><!-- Default --> | |||
== Manual == | |||
<blockquote> | |||
<syntaxhighlight lang="bash"> | |||
cdm ${rcfile} # test cdm interactively | |||
</syntaxhighlight> | |||
</blockquote><!-- Manual --> | |||
</blockquote><!-- Usage --> | |||
= Configuration = | |||
<blockquote> | |||
== Enable CDM == | |||
<blockquote> | |||
<syntaxhighlight lang="bash"> | |||
# copy .profile, which will run as soon as you login on the console. | |||
cp /usr/share/doc/cdm/profile.sh ~/.profile | |||
</syntaxhighlight> | |||
Or alternatively append it to your <code>.profile</code> | |||
<syntaxhighlight lang="bash"> | |||
# To avoid potential situation where cdm(1) crashes on every TTY, here we | |||
# default to execute cdm(1) on tty1 only, and leave other TTYs untouched. | |||
if [[ "$(tty)" == '/dev/tty1' ]]; then | |||
[[ -n "$CDM_SPAWN" ]] && return | |||
# Avoid executing cdm(1) when X11 has already been started. | |||
[[ -z "$DISPLAY$SSH_TTY$(pgrep xinit)" ]] && exec cdm | |||
fi | |||
</syntaxhighlight> | |||
</blockquote><!-- Enable CDM --> | |||
== cdmrc == | |||
<blockquote> | |||
=== Themes === | |||
<blockquote> | |||
<syntaxhighlight lang="bash"> | |||
# (~/.config/cdm|/etc/)cdmrc | |||
dialogrc=/usr/share/doc/cdm/themes/lime | |||
</syntaxhighlight> | |||
</blockquote><!-- Themes --> | |||
=== Menu Choices === | |||
<blockquote> | |||
You do not need to manually configure menu choices<br> | |||
cdm automatically loads entries from <code>/usr/share/xsessions/*.desktop</code> like other DMs. | |||
<syntaxhighlight lang="bash"> | |||
# (~/.config/cdm|/etc/)cdmrc | |||
# cdm is configured with 3x arrays | |||
# indexes in each array refer to the same menu-entry | |||
# startx ${THIS_COMMAND} | |||
binlist=( | |||
"/bin/i3" # i3 (default xorg.conf) | |||
"/bin/openbox-session -- -config xorg.conf-desktop" # openbox 3x 1920x1080 | |||
"/bin/openbox-session -- -config xorg.conf-widescreen-gaming" # openbox 1x 5760x1080 | |||
"/bin/zsh -i" # startx /bin/zsh -i # tty login | |||
) | |||
# name of each choice | |||
namelist=( | |||
"i3" | |||
"openbox" | |||
"tty" | |||
) | |||
# if choice requires an (X)-server, or is a (C)onsole | |||
flaglist=( | |||
X | |||
X | |||
C | |||
) | |||
</syntaxhighlight> | |||
</blockquote><!-- Menu Choices --> | |||
</blockquote><!-- cdmrc --> | |||
</blockquote><!-- Configuration --> |
Latest revision as of 01:22, 17 July 2021
A console based display manager for linux/bsd.
Written in bash.
NOTE:
interestingly, since xorg is not running yet, you may be able to change the xorg.conf
that is loaded for each entry..
NOTE:
this is more complicated than it needs to be, just write your own .zprofile
Documentation
github https://github.com/evertiro/cdm
Tutorials
arch wiki https://wiki.archlinux.org/title/CDM
Locations
/etc/cdmrc
system config ~/.config/cdm/cdmrc
user config /usr/share/doc/cdm/themes/*
themes /usr/share/xsessions/*.desktop
default installed xsessions
Usage
Default
After copying
~/.profile
(see below),
simply login on TTY1 and you will be provided with login choices.Manual
cdm ${rcfile} # test cdm interactively
Configuration
Enable CDM
# copy .profile, which will run as soon as you login on the console. cp /usr/share/doc/cdm/profile.sh ~/.profileOr alternatively append it to your
.profile
# To avoid potential situation where cdm(1) crashes on every TTY, here we # default to execute cdm(1) on tty1 only, and leave other TTYs untouched. if [[ "$(tty)" == '/dev/tty1' ]]; then [[ -n "$CDM_SPAWN" ]] && return # Avoid executing cdm(1) when X11 has already been started. [[ -z "$DISPLAY$SSH_TTY$(pgrep xinit)" ]] && exec cdm ficdmrc
Themes
# (~/.config/cdm|/etc/)cdmrc dialogrc=/usr/share/doc/cdm/themes/limeMenu Choices
You do not need to manually configure menu choices
cdm automatically loads entries from/usr/share/xsessions/*.desktop
like other DMs.# (~/.config/cdm|/etc/)cdmrc # cdm is configured with 3x arrays # indexes in each array refer to the same menu-entry # startx ${THIS_COMMAND} binlist=( "/bin/i3" # i3 (default xorg.conf) "/bin/openbox-session -- -config xorg.conf-desktop" # openbox 3x 1920x1080 "/bin/openbox-session -- -config xorg.conf-widescreen-gaming" # openbox 1x 5760x1080 "/bin/zsh -i" # startx /bin/zsh -i # tty login ) # name of each choice namelist=( "i3" "openbox" "tty" ) # if choice requires an (X)-server, or is a (C)onsole flaglist=( X X C )