why does the terminal start pulseaudio?
This issue was reported on the XFCE mailing list on 7/July/2020 on a thread with the same subject as the title of this issue. What follows was copied from this thread.
I would like to control when pulseaudio runs, and noticed that it was being started by unknown parties. Digging into that I came up with a simple test case as follows:
- I disabled pulseaudio autostart in /etc/xdg/autostart/pulseaudio.desktop
- on lightdm logged into an openbox session
- started urxvt
- confirmed that pulseaudio was not running
- started the xfce terminal
- pulseaudio immediately started running.
[bob@arch-tornado ~]$ ps -e | grep xfc [bob@arch-tornado ~]$ ps -e | grep pulse [bob@arch-tornado ~]$ xfce4-terminal &  720 [bob@arch-tornado ~]$ Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
[bob@arch-tornado ~]$ ps -e | grep pulse 727 ? 00:00:00 pulseaudio [bob@arch-tornado ~]$ ps -e | grep xfc 720 pts/0 00:00:00 xfce4-terminal
If I log into a xfce session then pulseaudio also gets started even if I don't start the xfce terminal. In the xfce panel I have a bunch of xfce plugins configured.
My test was with the bells disabled in xfce terminal (audible and visible). I do not have the xfce pulseaudio plugin installed. Pulseaudio gets started even if I start the terminal with the --disable-server option.
I tried 5 other VTE based terminals: lxterminal, tilix, termite, terminator and gnome. Gnome was the only one that did not start pulseaudio, and also the only one that started nearly instantaneously. All the others, including xfce-terminal, took a second or two to start. It seems from my tests that the reason pulseaudio gets started is systemd socket activation.
I am on Arch Linux.
Although I think this is a minor issue, there may be advantages in fixing it.