You are not logged in.
Pages: 1
Note: I am on a phone, so please excuse my brevity.
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: Audio will only play on VTs I have done a text login on. So if I log into tty1 and start X on tty2, audio will only play when 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 does not fix the sound.
What can I do to fix this? It seems I need to somehow "claim" the tty but even openvt doesn't seem to be enough.
Last edited by virtualdxs (2017-02-06 04:39:50)
Offline
Afaik systemd's loginctl 'Active' flag determines whether or not the sound will play for a given session. I know this is set to 'yes' when you log in to the VT normally first (text login) or when you use a greeter such as GDM.
You can check your session information with the command below. I suspect it will say 'Active=no' for your second session.
loginctl show-session ${XDG_SESSION_ID}
I do not know how you'd make loginctl mark a session as active manually though.
Last edited by Omar007 (2017-02-06 09:43:16)
Offline
Thanks! I'll look into that today.
Offline
Update: I just 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 by the first user continues. But the moment I start the X server, these policies are applied.
Offline
Pages: 1