Web lists-archives.com

Re: Multitasking, through Multiple Text Windows

On Sat 05 Jan 2019 at 09:33:27 (-0500), Kenneth Parker wrote:
> Hello,
> I first need to Date Myself, by saying that my first Linux Distribution was
> Yggdrasil Plug and Play Linux, purchased as a CD in December, 1992.
> My first impression of Linux, was as a Multi-User Operating System, with
> different User Names.  So I organized my Working Environment that way, even
> after getting Graphical Environments to work.  And I made Usernames, based
> on Function such as, for example, devel (for Kernel Development) and
> hercules (for IBM Mainframe Emulation, such as MVS 3.8J.  Google "Plug and
> Play MVS" for more information).
> What made Linux special, in my opinion, was this Built-In Multi-User
> Multitasking Functionality.
> And it worked fine, all the way from the beginning, by having the original
> Init Process Spawning 6 Login Processes (using /bin/login), that "listen"
> on /dev/tty1 through /dev/tty7.  (And, if a Graphical Environment is
> running, it appears to be on /dev/tty7).
> If I was, simply operating in Text Mode, I would switch Virtual Terminals
> with Alt-F1 through Alt-F6.  If I start something on one of these Virtual
> Terminals (i.e.  Compiling the Linux Kernel), I would trust that it would
> continue to run, while I do something else on another Virtual Terminal
> (i.e. using emacs or nano to edit a text file).
> One "Special Function", which pointed out the "Fly in the Ointment" to my
> above description, is Background Music.  I LOVE Classical Music, so I would
> have a Symphony Movement (mp3 file) playing in the Background, through the
> play command (sox package) on one of these Virtual Text Terminals.
> The reason I am bringing this up now, is that I tried this on Stretch, with
> no Graphical Environment, only to have the Music (playing, through the play
> command /dev/tty3)  *STOP*  *COLD*  when I used alt-F4 to switch
> perspective (say, to /dev/tty4!)
> Looks like SystemD may  *NOT*   be spawning the 6 Text Login Screens, like
> the SysV Init Package did?
> What gives?

Difficult to say, as this isn't my experience. I just tried and failed
to replicate it.

I rebooted, logged in on VC1 and played a .wav file: fine.
I logged in again on VC2 and played a different track: fine, except
for the cacophony.
I logged in again on VC3 as a different user (the one I browse under)
and played yet another track: worse cacophony with all three playing.

Then I stopped the music on VC1 and started X. VCs 2 and 3 kept
playing. I played the first track in an xterm, just as I had on VC1,
and that was fine. I ^C'd each of the three soxen and started them
over, all successfully. Finally I switched to VC4, logged in and
started yet another track playing.

AIUI an installed Debian system might not allow two different users to
play at the same time without some configuration of /etc/asound.conf
so I've attached mine¹. (But that's not your problem.)

Yes, there are differences when systemd is running. By default the
X server runs on whichever VC started it, rather than using a "VC"
that lies between VCs 1 and 6. And systemd only bothers to start an
agetty when you switch to it, so on most days I'll only run the
one because I normally start X almost first thing.

¹it's the version for sound on the internal soundcard at 1,0 as
opposed to the HDMI card at 0,3.

pcm.!default {
	type plug
	slave.pcm "dmixer"

pcm.dmixer  {
	type dmix
	ipc_key 1024
	ipc_perm 0666
	slave {
		pcm "hw:1,0"
		period_time 0
		period_size 1024
		buffer_size 4096
		rate 44100
	bindings {
		0 0
		1 1

ctl.dmixer {
	type hw
	card 0