命令在Ubuntu终端中运行,但不在vscode终端中运行

时间:2020-11-04 19:53:19

标签: visual-studio-code

Ubuntu终端和vscode终端的行为至少在以下命令中有所不同。 为什么以及如何解决?

paplay /usr/share/sounds/freedesktop/stereo/phone-outgoing-calling.oga

在Ubuntu终端中发出声音。

在vscode终端中,出现以下错误:

Connection failure: Connection refused
pa_context_connect() failed: Connection refused

1 个答案:

答案 0 :(得分:0)

检查/etc/pulse/client.conf是否包含:

; autospawn = yes

如果是这种情况,请尝试清除并重新安装

sudo apt-get --purge --reinstall install pulseaudio
相关问题