I made a line:[[ -z $DISPLAY && $XDG_VTNR -le 4 ]] && exec startx(right out of the Arch Wiki) at the end of .xinitrc to start the Xserver right after login on console.Whenever I'm ending the session, daemons started in .xinitrc will not be killed when logging out, regardless of using bash or zsh.It seems as if .bash_logout/.zlogout are not being parsed, basically just holding:kill -15 -1 &&Anyone else having that problem and maybe a solution?
.bash_logout or .zlogout isn't parsed when autostarting xserver directly after login on console
shell;login;profile;logout;startx
The exec builtin replaces the shell by the specified program. After that point, the shell is no longer around to load .*logout.In any case, the shell that runs .xinitrc is not a login shell, so it wouldn't run any .*logout file  but that shell is not where you would run startx anyway, it's a file that's loaded from xinit which is executed by startx.If you want to run something after logging out of the graphical session, you need to keep the shell running and specify something to run after startx. Assuming that the exec startx line is in .profile or a similar file executed by your login shell, you need to keep the shell running while the X session is active, then exit (so as not to follow the GUI session by an interactive shell).if [[ -z $DISPLAY && $XDG_VTNR -le 4 ]]; then  if startx; then    # We just exited an X session.    exit    # If your login shell is bash, it runs ~/.logout at this point.  else    echo >&2 The X session aborted with an error, dropping to a text shell  fifi