I got fed up with xinit and startx so I decided to write my own startx script. Now it mostly works great, except for one thing: Pulseaudio will only play audio on VTs I have done a text login on. So if I log into tty1 and start X on tty2, pulse refuses to play sound unless tty1 is active. I have tried the following:
- Chowning and chmodding tty2 to duncan:tty and 0600 (this is the behavior I see when I log into a tty)
- Using openvt -fuc to attempt to allocate the tty to me. This results in the behavior noticed in the previous bullet, but still does not allow audio to be played.
What can I do to fix this? It seems I need to somehow tell Pulse that tty2 is assigned to me.
I discovered that this only happens if the X server has been started at least once since boot. Even if I open another tty and log in as a different user, audio played via Pulse by the first user continues. But the moment I start the X server, these policies are applied.
Note: System-wide mode doesn't fit in my circumstances, so that's not an option (and it's strongly discouraged anyway).