Cdm: Difference between revisions

From wikinotes
No edit summary
Line 32: Line 32:
|-
|-
| <code>/usr/share/doc/cdm/themes/*</code> || themes
| <code>/usr/share/doc/cdm/themes/*</code> || themes
|-
| <code>/usr/share/xsessions/*.desktop</code> || default installed xsessions
|-
|-
|}
|}
</blockquote><!-- Locations -->
</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.
cdm automatically loads entries from <code>/usr/share/xsessions/*.desktop</code>, but you can provide your own instructions.
</blockquote><!-- Default -->
== Manual ==
<blockquote>
<syntaxhighlight lang="bash">
cdm ${rcfile}  # test cdm interactively
</syntaxhighlight>
</blockquote><!-- Manual -->
</blockquote><!-- Usage -->


= Configuration =
= Configuration =
<blockquote>
<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 -->
== Menu Choices ==
<blockquote>
</blockquote><!-- Menu Choices -->
cdm is configured with 3x arrays.<br>
cdm is configured with 3x arrays.<br>
entries in each array at the same index refer to the same login choice.
entries in each array at the same index refer to the same login choice.

Revision as of 00:46, 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..

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.

cdm automatically loads entries from /usr/share/xsessions/*.desktop, but you can provide your own instructions.

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 ~/.profile

Or 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
fi

Menu Choices

cdm is configured with 3x arrays.
entries in each array at the same index refer to the same login choice.

# (~/.config/cdm|/etc/)cdmrc

# startx ${THIS_COMMAND}
binlist=(
    "/bin/zsh -i"  # console
)

# name of each choice
namelist=(
    "tty" 
    "i3" 
    "openbox"
)

# if choice requires an X-session, or is a console
flaglist=(
    C
    X
    X
)