Start after a normal login

Use this when your existing login(1)/getty has already authenticated you. Run gocdm -mode=user manually on a virtual console first. A chosen desktop or shell inherits your user session environment and does not repeat PAM authentication.

After checking that launch and logout work, add an opt-in block to your login profile:

if [ -z "${GOCDM_SPAWN:-}${DISPLAY:-}${WAYLAND_DISPLAY:-}${SSH_TTY:-}" ] &&
   [ "$(tty)" = /dev/tty1 ]; then
    exec /usr/local/bin/gocdm -mode=user
fi

Choose the profile your shell actually reads (~/.profile, ~/.bash_profile, or ~/.zprofile). Read the installed profile.sh example before copying anything; installation never edits your dotfiles. Keep another VT available for recovery. The GOCDM_SPAWN check prevents reentry from a shell launched by GoCDM.

Console shells selected in user mode are not login shells, so an existing login profile is not run a second time. Graphical entries do not source interactive shell profiles. Set desktop environment through the appropriate session setup instead.

To undo autostart, remove the block from your profile using another console. See recovery if the selector exits repeatedly.