问题描述
在只有root用户可用的无头设备中,pulse音频服务器会在启动时使用pulseaudio -D --disallow-exit自动启动.到目前为止运行良好.系统启动时,蓝牙扬声器将自动连接.给hcitool con后,我看到了设备
in a headless device where only root user is available, pulse audio server starts automatically in startup using pulseaudio -D --disallow-exit. It runs fine so far. When the system starts the bluetooth headspeaker connects automatically. upon giving hcitool con I see the device
hcitool con连接:
hcitool conconnections:
奉献太平洋列表卡我得到空输出
upon givingpactl list cardsI get empty output
请注意,在运行pulseaudio之前,我先使用以下命令启动dbus评估导出$(dbus-launch)"
Note that i start dbus with following command before i run pulseaudioeval "export $(dbus-launch)"
推荐答案
我可以按以下方式解决它:
i could solve it as follows:
1-将新用户添加到系统并分组音频附加用户piusermod -a -G音频pi
1- add a new user to the system and to group audioadduser piusermod -a -G audio pi
2-在运行pulseaudio之前我跑了评估导出$(dbus-launch --sh语法)"
2- before running pulseaudio i raneval "export $(dbus-launch --sh-syntax)"
3- DBUS_SESSION_BUS_ADDRESS = $ {DBUS_SESSION_BUS_ADDRESS}
3- DBUS_SESSION_BUS_ADDRESS=${DBUS_SESSION_BUS_ADDRESS}
4- su -c'pulseaudio --start'-pi
4- su -c 'pulseaudio --start' - pi
sudo重新启动->如果它没有自动连接,请执行蓝牙列表中的pactl列表并连接到扬声器.
sudo reboot-> if it does not connect automatically, do pactl list follwed by bluetoothctl and connect to the speaker.
hcitool con->连接xx:xx:xx:xx:xx:xx
hcitool con-> connection xx:xx:xx:xx:xx:xx
pactl列表卡短我得到了输出
pactl list cards shorti get the output
这篇关于无头设备中的linux pactl卡列表,用于pulseaudio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!