Re: System freeze with multiple ttys in Debian Jessie
> Systemd handles the terminals [...]
... and all of the mucking around that you two and participants in some
other Debian bugs are doing, laudable as it is, is to tweak something
that is in fact already superseded by TTYVTDisallocate=yes in
autovt@.service . (-:
> According to the man page, clear_console "changes the foreground
virtual terminal to another terminal and then back to the original
... and it picks VT#2 as that other if you are on VT#1, and VT#1 otherwise.
Ironically, this way of doing this has been unnecessary since a change
to the kernel that happened in 2011. There's a non-standard control
sequence, but common to xterm, PuTTY, the Linux kernel terminal
emulator, and my console-terminal-emulator, that just erases the
scrollback buffer. No ioctl()s required at all; terminal switching,
disallocating, or otherwise. I added console-clear (a.k.a.
clear_console) to nosh version 1.19, just announced. But note, on the
gripping hand, that one doesn't really need *either* version if (a) one
is using autovt@ systemd services with TTYVTDisallocate=yes or (b) if
one is using console-terminal-emulator on Linux or PC-BSD/FreeBSD. In
(a) process #1 clears the scrollback buffers; and in (b) the terminal
emulator clears its display buffer at terminal hangup as standard.
So the first thing for you, as systemd Linux users, to try is just
excising the use of "clear_console" from your .bash_logout (and
skeleton, and equivalents for your other login shells) entirely.